From 0f8100fdcab346643b402126ded46dc688651dd3 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Wed, 25 Mar 2026 13:58:49 +0000 Subject: [PATCH 01/36] blog: add Yjs durable streams on Electric Cloud draft Outline for release post announcing Yjs durable streams as a managed service on Electric Cloud. Published: false. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...5-yjs-durable-streams-on-electric-cloud.md | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md new file mode 100644 index 0000000000..b629dfdeae --- /dev/null +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -0,0 +1,162 @@ +--- +title: '...' +description: >- + ... +excerpt: >- + ... +authors: [balegas] +image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg +tags: [durable-streams, cloud, release, sync, collaboration] +outline: [2, 3] +post: true +published: false +--- + + + +Yjs durable streams are now available on Electric Cloud. Real-time +collaborative editing as a managed service — sync Yjs documents over HTTP +instead of WebSockets. + +Open protocol. Sub-50ms latency. Runs on the edge. Built-in compaction. No +infrastructure to manage. Create a service, point your Yjs app at it. + + + +:::info +- [Create a Yjs service on Electric Cloud](...) +- [`y-durable-streams` on GitHub](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) +- [Demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +::: + +## Context + + + +- Durable Streams is an open HTTP protocol for persistent, resumable, + real-time streams. Append-only logs with their own URL that clients can + read from any position +- `y-durable-streams` is a Yjs provider that replaces WebSocket-based sync + with plain HTTP — works with standard load balancers and CDNs, no sticky + sessions +- Electric Cloud has been running durable streams services since January. + Yjs is the latest service type + +## What's shipping + + + +- Managed Yjs sync on Electric Cloud — one click to create a service, get + an endpoint, connect your Yjs app +- Sub-50ms latency, edge-deployed, scales without you thinking about it +- Built-in server-side compaction — accumulated updates get merged into + snapshots automatically, initial loads stay fast as documents grow +- Awareness and presence out of the box — cursors, selections, user status + over the same HTTP transport +- Open protocol, no vendor lock-in — `y-durable-streams` works against any + durable streams server, self-hosted or cloud +- Just HTTP — no WebSocket servers, no sticky sessions, CDN-friendly + + + +## Get started + + + + + +- Link to create a Yjs durable streams service on Electric Cloud +- Clone the demo app and point it at your cloud endpoint: + +```typescript +import { YjsProvider } from '@durable-streams/y-durable-streams' +import * as Y from 'yjs' + +const doc = new Y.Doc() +const provider = new YjsProvider({ + doc, + baseUrl: 'https://your-service.electric-sql.cloud/v1/yjs', + docId: 'my-document', +}) +``` + + + +*** + +Next steps: + +- [Sign up for Electric Cloud](https://dashboard.electric-sql.cloud/) +- [Try the demo](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +- [Join Discord](https://discord.electric-sql.com) + +*** + + + + From 2ffd8244bf497e830c0a61a61766a8f535ec3343 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Thu, 26 Mar 2026 15:57:27 +0000 Subject: [PATCH 02/36] draft --- ...5-yjs-durable-streams-on-electric-cloud.md | 182 ++++++------------ ...rable-streams-on-electric-cloud.outline.md | 162 ++++++++++++++++ 2 files changed, 226 insertions(+), 118 deletions(-) create mode 100644 website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index b629dfdeae..32297719b8 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -1,9 +1,9 @@ --- -title: '...' +title: 'Yjs collaboration on Electric Cloud' description: >- - ... + Managed Yjs sync on Electric Cloud. Real-time collaborative editing over HTTP with sub-50ms latency, built-in compaction and presence. No WebSocket infrastructure to manage. excerpt: >- - ... + Yjs durable streams are now available on Electric Cloud. Managed real-time collaboration over HTTP — with built-in compaction, presence, and no infrastructure to manage. authors: [balegas] image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg tags: [durable-streams, cloud, release, sync, collaboration] @@ -12,68 +12,78 @@ post: true published: false --- - +Yjs durable streams are now available on [Electric Cloud](/cloud). Real-time collaborative editing, as a managed service. -Yjs durable streams are now available on Electric Cloud. Real-time -collaborative editing as a managed service — sync Yjs documents over HTTP -instead of WebSockets. +Create a service, get an endpoint, point your Yjs app at it. Sub‑50ms latency, edge‑deployed, with built‑in compaction and presence. No WebSocket servers to run. No infrastructure to manage. -Open protocol. Sub-50ms latency. Runs on the edge. Built-in compaction. No -infrastructure to manage. Create a service, point your Yjs app at it. +> [!info] 🚀  Try it now +> Sign up to [Electric Cloud](https://dashboard.electric-sql.com), create a Yjs service, and connect your app. +> See the [`y-durable-streams` source](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) and [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub. - +## Every app needs collaboration -:::info -- [Create a Yjs service on Electric Cloud](...) -- [`y-durable-streams` on GitHub](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) -- [Demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -::: +[Yjs](https://yjs.dev) is the standard library for building collaborative editing. It's a CRDT-based framework that handles conflict-free merging of concurrent edits, with bindings for every major editor: [ProseMirror](https://prosemirror.net), [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), [BlockNote](https://blocknoteeditor.org), [Lexical](https://lexical.dev) and more. If you're adding real-time collaboration to a web app today, you're almost certainly using Yjs. -## Context +The hard part isn't the client. Yjs gives you a great local editing experience. The hard part is the sync infrastructure behind it. - +## The sync problem -- Durable Streams is an open HTTP protocol for persistent, resumable, - real-time streams. Append-only logs with their own URL that clients can - read from any position -- `y-durable-streams` is a Yjs provider that replaces WebSocket-based sync - with plain HTTP — works with standard load balancers and CDNs, no sticky - sessions -- Electric Cloud has been running durable streams services since January. - Yjs is the latest service type +Most Yjs setups require a WebSocket server to relay updates between clients. That means sticky sessions, custom load balancing, and infrastructure that doesn't play nicely with modern edge deployments or CDNs. -## What's shipping +As documents grow, you also need a compaction strategy — without one, new clients joining a session have to replay the full edit history before they can render the document. That gets slow fast. And if you want presence (cursors, selections, who's online), that's another layer of state to manage and distribute. - +You can build all of this yourself. Many teams do. But it's a meaningful amount of backend work that has nothing to do with your actual product. -- Managed Yjs sync on Electric Cloud — one click to create a service, get - an endpoint, connect your Yjs app -- Sub-50ms latency, edge-deployed, scales without you thinking about it -- Built-in server-side compaction — accumulated updates get merged into - snapshots automatically, initial loads stay fast as documents grow -- Awareness and presence out of the box — cursors, selections, user status - over the same HTTP transport -- Open protocol, no vendor lock-in — `y-durable-streams` works against any - durable streams server, self-hosted or cloud -- Just HTTP — no WebSocket servers, no sticky sessions, CDN-friendly +## What we've built - +Yjs durable streams on Electric Cloud handle this for you. One managed service that covers sync, compaction, and presence — all over standard HTTP. -## Get started +**No WebSocket infrastructure.** Sync happens over [Durable Streams](/primitives/durable-streams), our open HTTP protocol for persistent, resumable, real-time streams. Plain HTTP means standard load balancers, CDN compatibility, and no sticky sessions. It works with the infrastructure you already have. + +**Built-in compaction.** As a document accumulates edits, the server automatically merges them into snapshots. Clients joining an existing document get the compacted state, not the full history. Initial loads stay fast no matter how long the document has been edited. + +**Presence out of the box.** Awareness — cursors, selections, user status — travels over the same HTTP transport. No separate channel to configure or manage. + +**Edge-deployed, auto-scaling.** Your service runs on the edge with sub‑50ms latency. It scales with your usage. You don't think about capacity planning. + +**Open protocol, no lock-in.** The [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) provider works against any durable streams server — hosted on Electric Cloud or self-hosted. Switch whenever you want. + +## How it works + +Under the hood, each Yjs document is a [Durable Stream](https://durablestreams.com) — a persistent, append-only log with its own URL. Clients POST updates to the stream and GET them back, using standard HTTP long-polling or Server-Sent Events for real-time delivery. + +This is a fundamentally different architecture from WebSocket-based Yjs sync. There's no persistent connection between client and server. Every interaction is a normal HTTP request, which means it works through load balancers, proxies, and CDNs without any special configuration. You can put a CDN in front of your sync endpoint the same way you would for any other API. + +When a client connects for the first time, it doesn't need to replay the document's entire edit history. Snapshots are a first-class concept in the protocol. The server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) accumulated updates into a snapshot — a single representation of the current document state at a specific stream offset. - +``` + Document stream (append-only log of Yjs updates) + ┌─────┬─────┬─────┬─── ─ ─ ─── ─┬─────┬─────┬─────┬─────┬─────┬╌╌╌╌╌┐ + │ 0 │ 1 │ 2 │ ... │4780 │4781 │4782 │4783 │4784 │ ... │ + └─────┴─────┴─────┴─── ─ ─ ─── ─┴─────┴─────┴──┬──┴─────┴─────┴╌╌╌╌╌┘ + │ + compacted │ + into ▼ + Client ┌──────────────────┐ + GET ?offset=snapshot ─── 307 ────▶ │ snapshot │ + │ @offset 4782 │ ← immutable URL, + │ next-offset:4783 │ cacheable + └──────────────────┘ + │ + client applies snapshot, │ + then subscribes from 4783 ▼ + GET ?offset=4783&live=sse +``` + +A new client requests `?offset=snapshot` — a sentinel value that redirects to the latest compacted snapshot at a stable, offset-addressed URL like `?offset=4782_snapshot`. The client loads the document state from there and subscribes for live updates starting from the next offset. Because each snapshot lives at an immutable URL, it's inherently cacheable — CDNs and HTTP caches can serve it directly without hitting your sync server. - +Awareness — cursors, selections, online status — flows over the same URL path as document updates, just on a separate query parameter. One URL, one auth scope, one transport for everything. Awareness streams are ephemeral with a built-in TTL, so stale presence data from disconnected clients gets pruned automatically. -- Link to create a Yjs durable streams service on Electric Cloud -- Clone the demo app and point it at your cloud endpoint: +The full protocol is [open and documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md), with a conformance test suite so anyone can implement a compatible server. + +## Get started + +Create a Yjs service on [Electric Cloud](https://dashboard.electric-sql.com) and connect your app: ```typescript import { YjsProvider } from '@durable-streams/y-durable-streams' @@ -87,76 +97,12 @@ const provider = new YjsProvider({ }) ``` - +That's it. The provider handles sync, compaction, and awareness. It works with any Yjs-compatible editor binding — ProseMirror, TipTap, CodeMirror, BlockNote, whatever you're using. -*** +Clone the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) to see it in action, or drop the provider into your existing Yjs project. -Next steps: +## Next steps -- [Sign up for Electric Cloud](https://dashboard.electric-sql.cloud/) +- [Sign up for Electric Cloud](https://dashboard.electric-sql.com) - [Try the demo](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) - [Join Discord](https://discord.electric-sql.com) - -*** - - - - diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md new file mode 100644 index 0000000000..b629dfdeae --- /dev/null +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md @@ -0,0 +1,162 @@ +--- +title: '...' +description: >- + ... +excerpt: >- + ... +authors: [balegas] +image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg +tags: [durable-streams, cloud, release, sync, collaboration] +outline: [2, 3] +post: true +published: false +--- + + + +Yjs durable streams are now available on Electric Cloud. Real-time +collaborative editing as a managed service — sync Yjs documents over HTTP +instead of WebSockets. + +Open protocol. Sub-50ms latency. Runs on the edge. Built-in compaction. No +infrastructure to manage. Create a service, point your Yjs app at it. + + + +:::info +- [Create a Yjs service on Electric Cloud](...) +- [`y-durable-streams` on GitHub](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) +- [Demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +::: + +## Context + + + +- Durable Streams is an open HTTP protocol for persistent, resumable, + real-time streams. Append-only logs with their own URL that clients can + read from any position +- `y-durable-streams` is a Yjs provider that replaces WebSocket-based sync + with plain HTTP — works with standard load balancers and CDNs, no sticky + sessions +- Electric Cloud has been running durable streams services since January. + Yjs is the latest service type + +## What's shipping + + + +- Managed Yjs sync on Electric Cloud — one click to create a service, get + an endpoint, connect your Yjs app +- Sub-50ms latency, edge-deployed, scales without you thinking about it +- Built-in server-side compaction — accumulated updates get merged into + snapshots automatically, initial loads stay fast as documents grow +- Awareness and presence out of the box — cursors, selections, user status + over the same HTTP transport +- Open protocol, no vendor lock-in — `y-durable-streams` works against any + durable streams server, self-hosted or cloud +- Just HTTP — no WebSocket servers, no sticky sessions, CDN-friendly + + + +## Get started + + + + + +- Link to create a Yjs durable streams service on Electric Cloud +- Clone the demo app and point it at your cloud endpoint: + +```typescript +import { YjsProvider } from '@durable-streams/y-durable-streams' +import * as Y from 'yjs' + +const doc = new Y.Doc() +const provider = new YjsProvider({ + doc, + baseUrl: 'https://your-service.electric-sql.cloud/v1/yjs', + docId: 'my-document', +}) +``` + + + +*** + +Next steps: + +- [Sign up for Electric Cloud](https://dashboard.electric-sql.cloud/) +- [Try the demo](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +- [Join Discord](https://discord.electric-sql.com) + +*** + + + + From d143c47ef6a200757fdb56f6e7008f6fc5fc9d77 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 00:37:31 +0000 Subject: [PATCH 03/36] docs: embed Territory Wars demo in Yjs blog post Add multiplayer territory game demo (built with Yjs CRDTs on Durable Streams) to the blog post. Players claim cells by moving over them, with Yjs LWW resolving contention. Embedded as an iframe. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...5-yjs-durable-streams-on-electric-cloud.md | 119 +++++++++--------- .../territory-wars/assets/index-Czu7vo8C.js | 42 +++++++ .../public/demos/territory-wars/index.html | 23 ++++ 3 files changed, 124 insertions(+), 60 deletions(-) create mode 100644 website/public/demos/territory-wars/assets/index-Czu7vo8C.js create mode 100644 website/public/demos/territory-wars/index.html diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 32297719b8..7f4455566a 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -1,108 +1,107 @@ --- -title: 'Yjs collaboration on Electric Cloud' +title: 'Yjs CRDTs over HTTP on Durable Streams' description: >- - Managed Yjs sync on Electric Cloud. Real-time collaborative editing over HTTP with sub-50ms latency, built-in compaction and presence. No WebSocket infrastructure to manage. + A new Yjs provider built on Durable Streams. Sync collaborative documents over plain HTTP with built-in compaction, presence, and CDN caching. Open protocol, now live on Electric Cloud. excerpt: >- - Yjs durable streams are now available on Electric Cloud. Managed real-time collaboration over HTTP — with built-in compaction, presence, and no infrastructure to manage. + We've built a new Yjs provider on Durable Streams — sync documents over plain HTTP instead of WebSockets. Open protocol with built-in compaction, now live on Electric Cloud. authors: [balegas] image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg tags: [durable-streams, cloud, release, sync, collaboration] outline: [2, 3] post: true -published: false +published: true --- Yjs durable streams are now available on [Electric Cloud](/cloud). Real-time collaborative editing, as a managed service. -Create a service, get an endpoint, point your Yjs app at it. Sub‑50ms latency, edge‑deployed, with built‑in compaction and presence. No WebSocket servers to run. No infrastructure to manage. +We've built a new Yjs provider on [Durable Streams](/primitives/durable-streams) — sync Yjs documents over plain HTTP instead of WebSockets. Open protocol with built‑in compaction, now live on [Electric Cloud](/cloud). > [!info] 🚀  Try it now > Sign up to [Electric Cloud](https://dashboard.electric-sql.com), create a Yjs service, and connect your app. > See the [`y-durable-streams` source](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) and [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub. -## Every app needs collaboration +[Yjs](https://yjs.dev) is the de facto library for collaborative editing on the web. It's battle-proven, CRDT-based, and powers tools like [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), [BlockNote](https://www.blocknotejs.org/) and more. And it's not just collaboration between humans anymore — agents are increasingly editing documents, generating code, and filling in forms alongside users. Whether it's humans or agents collaborating, they need reliable, conflict-free sync. -[Yjs](https://yjs.dev) is the standard library for building collaborative editing. It's a CRDT-based framework that handles conflict-free merging of concurrent edits, with bindings for every major editor: [ProseMirror](https://prosemirror.net), [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), [BlockNote](https://blocknoteeditor.org), [Lexical](https://lexical.dev) and more. If you're adding real-time collaboration to a web app today, you're almost certainly using Yjs. +## The problem with WebSockets -The hard part isn't the client. Yjs gives you a great local editing experience. The hard part is the sync infrastructure behind it. +Most Yjs setups are built on WebSockets to relay updates to clients. WebSockets are point-to-point connections with no fan-out distribution. They require sticky connections and content can't be cached at a CDN, which means there is a latency penalty for every user or agent that needs to retrieve the initial state of a document. -## The sync problem +There is no standardized reference implementation if you want to implement this yourself. There are hosted services you can buy, but that means vendor lock-in and a new piece of infrastructure to add to your stack. -Most Yjs setups require a WebSocket server to relay updates between clients. That means sticky sessions, custom load balancing, and infrastructure that doesn't play nicely with modern edge deployments or CDNs. +## Yjs on bare HTTP -As documents grow, you also need a compaction strategy — without one, new clients joining a session have to replay the full edit history before they can render the document. That gets slow fast. And if you want presence (cursors, selections, who's online), that's another layer of state to manage and distribute. +We've built [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) — a new Yjs provider on [Durable Streams](/primitives/durable-streams), our open HTTP protocol for persistent, resumable, real-time streams. -You can build all of this yourself. Many teams do. But it's a meaningful amount of backend work that has nothing to do with your actual product. +Instead of WebSocket relay servers, document updates flow through plain HTTP. Clients POST edits and subscribe for real-time updates via SSE or long-polling — no persistent connections, no sticky sessions. Because it's standard HTTP, it works with the infrastructure you already have: load balancers, reverse proxies, CDNs. Snapshots are cacheable at the edge, so fan-out scales without extra effort. -## What we've built - -Yjs durable streams on Electric Cloud handle this for you. One managed service that covers sync, compaction, and presence — all over standard HTTP. - -**No WebSocket infrastructure.** Sync happens over [Durable Streams](/primitives/durable-streams), our open HTTP protocol for persistent, resumable, real-time streams. Plain HTTP means standard load balancers, CDN compatibility, and no sticky sessions. It works with the infrastructure you already have. - -**Built-in compaction.** As a document accumulates edits, the server automatically merges them into snapshots. Clients joining an existing document get the compacted state, not the full history. Initial loads stay fast no matter how long the document has been edited. - -**Presence out of the box.** Awareness — cursors, selections, user status — travels over the same HTTP transport. No separate channel to configure or manage. - -**Edge-deployed, auto-scaling.** Your service runs on the edge with sub‑50ms latency. It scales with your usage. You don't think about capacity planning. - -**Open protocol, no lock-in.** The [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) provider works against any durable streams server — hosted on Electric Cloud or self-hosted. Switch whenever you want. +The provider handles document sync, server-side compaction, and awareness out of the box. It's open source, backed by an [open protocol specification](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md), and now live on [Electric Cloud](/cloud). ## How it works -Under the hood, each Yjs document is a [Durable Stream](https://durablestreams.com) — a persistent, append-only log with its own URL. Clients POST updates to the stream and GET them back, using standard HTTP long-polling or Server-Sent Events for real-time delivery. - -This is a fundamentally different architecture from WebSocket-based Yjs sync. There's no persistent connection between client and server. Every interaction is a normal HTTP request, which means it works through load balancers, proxies, and CDNs without any special configuration. You can put a CDN in front of your sync endpoint the same way you would for any other API. - -When a client connects for the first time, it doesn't need to replay the document's entire edit history. Snapshots are a first-class concept in the protocol. The server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) accumulated updates into a snapshot — a single representation of the current document state at a specific stream offset. - -``` - Document stream (append-only log of Yjs updates) - ┌─────┬─────┬─────┬─── ─ ─ ─── ─┬─────┬─────┬─────┬─────┬─────┬╌╌╌╌╌┐ - │ 0 │ 1 │ 2 │ ... │4780 │4781 │4782 │4783 │4784 │ ... │ - └─────┴─────┴─────┴─── ─ ─ ─── ─┴─────┴─────┴──┬──┴─────┴─────┴╌╌╌╌╌┘ - │ - compacted │ - into ▼ - Client ┌──────────────────┐ - GET ?offset=snapshot ─── 307 ────▶ │ snapshot │ - │ @offset 4782 │ ← immutable URL, - │ next-offset:4783 │ cacheable - └──────────────────┘ - │ - client applies snapshot, │ - then subscribes from 4783 ▼ - GET ?offset=4783&live=sse -``` - -A new client requests `?offset=snapshot` — a sentinel value that redirects to the latest compacted snapshot at a stable, offset-addressed URL like `?offset=4782_snapshot`. The client loads the document state from there and subscribes for live updates starting from the next offset. Because each snapshot lives at an immutable URL, it's inherently cacheable — CDNs and HTTP caches can serve it directly without hitting your sync server. +`y-durable-streams` uses a four-step sync protocol over HTTP. For the full wire format and details, see the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) specification. -Awareness — cursors, selections, online status — flows over the same URL path as document updates, just on a separate query parameter. One URL, one auth scope, one transport for everything. Awareness streams are ephemeral with a built-in TTL, so stale presence data from disconnected clients gets pruned automatically. +1. **Snapshot discovery** — requests `?offset=snapshot`. The server responds with a `307` redirect to the latest snapshot offset, or to `-1` if no snapshot exists. +2. **Snapshot loading** — fetches the binary Yjs snapshot and applies it to the local document. The response includes a `Stream-Next-Offset` header indicating where to continue. +3. **Live updates** — streams incremental updates from the offset via long-polling or SSE. Local edits are sent through an idempotent producer for exactly-once delivery. +4. **Awareness** — presence data (cursors, selections, user info) is delivered over the same document URL with parameter `?awareness=...` , it's just a durable stream and clients always subscribe at the tip of the stream. Awareness streams have a built-in TTL, so stale state from disconnected clients is pruned automatically. -The full protocol is [open and documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md), with a conformance test suite so anyone can implement a compatible server. +Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting the durable streams server. As documents grow, the server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) updates into a new snapshot — transparent to connected clients, fast for new ones. ## Get started -Create a Yjs service on [Electric Cloud](https://dashboard.electric-sql.com) and connect your app: +Create a Yjs document with awareness and point it at your endpoint: ```typescript import { YjsProvider } from '@durable-streams/y-durable-streams' +import { Awareness } from 'y-protocols/awareness' import * as Y from 'yjs' const doc = new Y.Doc() +const awareness = new Awareness(doc) + const provider = new YjsProvider({ doc, - baseUrl: 'https://your-service.electric-sql.cloud/v1/yjs', + awareness, + baseUrl: 'https://api.electric-sql.cloud/v1/stream/svc-your-service', docId: 'my-document', }) ``` -That's it. The provider handles sync, compaction, and awareness. It works with any Yjs-compatible editor binding — ProseMirror, TipTap, CodeMirror, BlockNote, whatever you're using. +Then wire it into your editor. Here's an example with TipTap: + +```typescript +import { useEditor, EditorContent } from '@tiptap/react' +import StarterKit from '@tiptap/starter-kit' +import Collaboration from '@tiptap/extension-collaboration' +import CollaborationCursor from '@tiptap/extension-collaboration-cursor' + +const editor = useEditor({ + extensions: [ + StarterKit.configure({ history: false }), + Collaboration.configure({ document: doc }), + CollaborationCursor.configure({ provider }), + ], +}) +``` + +The provider handles sync, compaction, and awareness. Cursors, selections, and user presence work out of the box — every client that connects to the same `docId` sees the same document, in real time. + +Clone the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) to see a working example, or drop the provider into your existing Yjs project. + +## No lock-in + +Durable Streams is [open source](https://github.com/durable-streams/durable-streams) under the MIT license. The Yjs protocol is [fully documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) with a conformance test suite — you can self-host, switch providers, or build your own compatible server at any time. + +Electric Cloud runs the same open protocol as a managed service. No proprietary APIs, no migration path to worry about — just a faster way to get started. + +## Territory Wars demo + +To show what Yjs on Durable Streams can do beyond text editing, we built a multiplayer territory game. Players claim cells by moving over them — each cell is a Yjs CRDT entry, with last-writer-wins resolving contention when two players claim the same cell. Encircle an area to fill it. -Clone the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) to see it in action, or drop the provider into your existing Yjs project. + ## Next steps -- [Sign up for Electric Cloud](https://dashboard.electric-sql.com) -- [Try the demo](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -- [Join Discord](https://discord.electric-sql.com) +- sign up to [Electric Cloud](https://dashboard.electric-sql.com) +- try the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +- any questions, let us know in [Discord](https://discord.electric-sql.com) diff --git a/website/public/demos/territory-wars/assets/index-Czu7vo8C.js b/website/public/demos/territory-wars/assets/index-Czu7vo8C.js new file mode 100644 index 0000000000..3452a1a2f3 --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-Czu7vo8C.js @@ -0,0 +1,42 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var hh={exports:{}},qa={};var E0;function U1(){if(E0)return qa;E0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return qa.Fragment=t,qa.jsx=i,qa.jsxs=i,qa}var C0;function j1(){return C0||(C0=1,hh.exports=U1()),hh.exports}var Q=j1(),dh={exports:{}},Ka={},ph={exports:{}},gh={};var x0;function N1(){return x0||(x0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],J=H+1,lt=M[J];if(0>l(Y,Z))Jl(lt,Y)?(M[at]=lt,M[J]=Z,at=J):(M[at]=Y,M[H]=Z,at=H);else if(Jl(lt,Z))M[at]=lt,M[J]=Z,at=J;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,w=!1,b=!1,E=!1,T=!1,B=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function k(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function $(M){if(E=!1,k(M),!b)if(i(p)!==null)b=!0,z||(z=!0,st());else{var q=i(g);q!==null&&ht($,q.startTime-M)}}var z=!1,I=-1,X=5,tt=-1;function F(){return T?!0:!(s.unstable_now()-ttM&&F());){var at=y.callback;if(typeof at=="function"){y.callback=null,v=y.priorityLevel;var ft=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft=="function"){y.callback=ft,k(M),q=!0;break e}y===i(p)&&r(p),k(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht($,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,w=!1}q=void 0}}finally{q?st():z=!1}}}var st;if(typeof O=="function")st=function(){O(nt)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,Kt=xt.port2;xt.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){B(nt,0)};function ht(M,q){I=B(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(R(I),I=-1):E=!0,ht($,Z-at))):(M.sortIndex=ft,t(p,M),b||w||(b=!0,z||(z=!0,st()))),M},s.unstable_shouldYield=F,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var _0;function B1(){return _0||(_0=1,ph.exports=N1()),ph.exports}var yh={exports:{}},gt={};var T0;function L1(){if(T0)return gt;T0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function w(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function B(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||b}B.prototype.isReactComponent={},B.prototype.setState=function(_,H){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,H,"setState")},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=B.prototype;function O(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||b}var k=O.prototype=new R;k.constructor=O,E(k,B.prototype),k.isPureReactComponent=!0;var $=Array.isArray;function z(){}var I={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var J=Y.ref;return{$$typeof:s,type:_,key:H,ref:J!==void 0?J:null,props:Y}}function F(_,H){return tt(_.type,H,_.props)}function nt(_){return typeof _=="object"&&_!==null&&_.$$typeof===s}function st(_){var H={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Y){return H[Y]})}var xt=/\/+/g;function Kt(_,H){return typeof _=="object"&&_!==null&&_.key!=null?st(""+_.key):H.toString(36)}function ht(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(z,z):(_.status="pending",_.then(function(H){_.status==="pending"&&(_.status="fulfilled",_.value=H)},function(H){_.status==="pending"&&(_.status="rejected",_.reason=H)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,H,Y,J,lt){var it=typeof _;(it==="undefined"||it==="boolean")&&(_=null);var St=!1;if(_===null)St=!0;else switch(it){case"bigint":case"string":case"number":St=!0;break;case"object":switch(_.$$typeof){case s:case t:St=!0;break;case m:return St=_._init,M(St(_._payload),H,Y,J,lt)}}if(St)return lt=lt(_),St=J===""?"."+Kt(_,0):J,$(lt)?(Y="",St!=null&&(Y=St.replace(xt,"$&/")+"/"),M(lt,H,Y,"",function(et){return et})):lt!=null&&(nt(lt)&&(lt=F(lt,Y+(lt.key==null||_&&_.key===lt.key?"":(""+lt.key).replace(xt,"$&/")+"/")+St)),H.push(lt)),1;St=0;var Ut=J===""?".":J+":";if($(_))for(var vt=0;vt<_.length;vt++)J=_[vt],it=Ut+Kt(J,vt),St+=M(J,H,Y,it,lt);else if(vt=w(_),typeof vt=="function")for(_=vt.call(_),vt=0;!(J=_.next()).done;)J=J.value,it=Ut+Kt(J,vt++),St+=M(J,H,Y,it,lt);else if(it==="object"){if(typeof _.then=="function")return M(ht(_),H,Y,J,lt);throw H=String(_),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return St}function q(_,H,Y){if(_==null)return _;var J=[],lt=0;return M(_,J,"","",function(it){return H.call(Y,it,lt++)}),J}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ft={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!nt(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return gt.Activity=y,gt.Children=ft,gt.Component=B,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=O,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return I.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,H,Y){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var J=E({},_.props),lt=_.key;if(H!=null)for(it in H.key!==void 0&&(lt=""+H.key),H)!X.call(H,it)||it==="key"||it==="__self"||it==="__source"||it==="ref"&&H.ref===void 0||(J[it]=H[it]);var it=arguments.length-2;if(it===1)J.children=Y;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=I1(),mh.exports}var R0;function q1(){if(R0)return Ka;R0=1;var s=B1(),t=Ud(),i=H1();function r(e){var n="https://react.dev/errors/"+e;if(1ft||(e.current=at[ft],at[ft]=null,ft--)}function Y(e,n){ft++,at[ft]=e.current,e.current=n}var J=_(null),lt=_(null),it=_(null),St=_(null);function Ut(e,n){switch(Y(it,n),Y(lt,e),Y(J,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?$m(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=$m(n),e=Ym(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(J),Y(J,e)}function vt(){H(J),H(lt),H(it)}function et(e){e.memoizedState!==null&&Y(St,e);var n=J.current,a=Ym(n,e.type);n!==a&&(Y(lt,e),Y(J,a))}function P(e){lt.current===e&&(H(J),H(lt)),St.current===e&&(H(St),Ba._currentValue=Z)}var pt,dt;function bt(e){if(pt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);pt=n&&n[1]||"",dt=-1)":-1f||x[c]!==j[f]){var K=` +`+x[c].replace(" at new "," at ");return e.displayName&&K.includes("")&&(K=K.replace("",e.displayName)),K}while(1<=c&&0<=f);break}}}finally{Dt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?bt(a):""}function $n(e,n){switch(e.tag){case 26:case 27:case 5:return bt(e.type);case 16:return bt("Lazy");case 13:return e.child!==n&&n!==null?bt("Suspense Fallback"):bt("Suspense");case 19:return bt("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return bt("Activity");default:return""}}function ze(e){try{var n="",a=null;do n+=$n(e,a),a=e,e=e.return;while(e);return n}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var ln=Object.prototype.hasOwnProperty,Cn=s.unstable_scheduleCallback,Yn=s.unstable_cancelCallback,El=s.unstable_shouldYield,Cl=s.unstable_requestPaint,Xt=s.unstable_now,Qr=s.unstable_getCurrentPriorityLevel,Ui=s.unstable_ImmediatePriority,Fr=s.unstable_UserBlockingPriority,xl=s.unstable_NormalPriority,pw=s.unstable_LowPriority,_p=s.unstable_IdlePriority,gw=s.log,yw=s.unstable_setDisableYieldValue,Jr=null,Xe=null;function ws(e){if(typeof gw=="function"&&yw(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Jr,e)}catch{}}var Ze=Math.clz32?Math.clz32:vw,mw=Math.log,Sw=Math.LN2;function vw(e){return e>>>=0,e===0?32:31-(mw(e)/Sw|0)|0}var _l=256,Tl=262144,Al=4194304;function ti(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ol(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ti(c):(S&=C,S!==0?f=ti(S):a||(a=C&~e,a!==0&&(f=ti(a))))):(C=c&~h,C!==0?f=ti(C):S!==0?f=ti(S):a||(a=c&~e,a!==0&&(f=ti(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Xr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bw(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tp(){var e=Al;return Al<<=1,(Al&62914560)===0&&(Al=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Zr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ww(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,j=e.hiddenUpdates;for(a=S&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Aw=/[\n"\\]/g;function cn(e){return e.replace(Aw,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ru(e,n,a,c,f,h,S,C){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+on(n)):e.value!==""+on(n)&&(e.value=""+on(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+on(C):e.removeAttribute("name")}function Ip(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){iu(e);return}a=a!=null?""+on(a):"",n=n!=null?""+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),iu(e)}function au(e,n,a){n==="number"&&Ml(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fu=!1;if(Jn)try{var ea={};Object.defineProperty(ea,"passive",{get:function(){fu=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{fu=!1}var Cs=null,hu=null,zl=null;function Yp(){if(zl)return zl;var e,n=hu,a=n.length,c,f="value"in Cs?Cs.value:Cs.textContent,h=f.length;for(e=0;e=ia),Wp=" ",Pp=!1;function tg(e,n){switch(e){case"keyup":return eE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function sE(e,n){switch(e){case"compositionend":return eg(n);case"keypress":return n.which!==32?null:(Pp=!0,Wp);case"textInput":return e=n.data,e===Wp&&Pp?null:e;default:return null}}function iE(e,n){if(Gi)return e==="compositionend"||!mu&&tg(e,n)?(e=Yp(),zl=hu=Cs=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=cg(a)}}function fg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function hg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ml(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ml(e.document)}return n}function bu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var hE=Jn&&"documentMode"in document&&11>=document.documentMode,$i=null,wu=null,oa=null,Eu=!1;function dg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||$i==null||$i!==Ml(c)||(c=$i,"selectionStart"in c&&bu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),oa&&la(oa,c)||(oa=c,c=Ao(wu,"onSelect"),0>=S,f-=S,zn=1<<32-Ze(n)+f|a<mt?(Tt=ot,ot=null):Tt=ot.sibling;var zt=N(D,ot,U[mt],V);if(zt===null){ot===null&&(ot=Tt);break}e&&ot&&zt.alternate===null&&n(D,ot),A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt,ot=Tt}if(mt===U.length)return a(D,ot),Rt&&Zn(D,mt),ct;if(ot===null){for(;mtmt?(Tt=ot,ot=null):Tt=ot.sibling;var $s=N(D,ot,zt.value,V);if($s===null){ot===null&&(ot=Tt);break}e&&ot&&$s.alternate===null&&n(D,ot),A=h($s,A,mt),kt===null?ct=$s:kt.sibling=$s,kt=$s,ot=Tt}if(zt.done)return a(D,ot),Rt&&Zn(D,mt),ct;if(ot===null){for(;!zt.done;mt++,zt=U.next())zt=G(D,zt.value,V),zt!==null&&(A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt);return Rt&&Zn(D,mt),ct}for(ot=c(ot);!zt.done;mt++,zt=U.next())zt=L(ot,D,mt,zt.value,V),zt!==null&&(e&&zt.alternate!==null&&ot.delete(zt.key===null?mt:zt.key),A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt);return e&&ot.forEach(function(k1){return n(D,k1)}),Rt&&Zn(D,mt),ct}function Ht(D,A,U,V){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:t:{for(var ct=U.key;A!==null;){if(A.key===ct){if(ct=U.type,ct===E){if(A.tag===7){a(D,A.sibling),V=f(A,U.props.children),V.return=D,D=V;break t}}else if(A.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===X&&fi(ct)===A.type){a(D,A.sibling),V=f(A,U.props),pa(V,U),V.return=D,D=V;break t}a(D,A);break}else n(D,A);A=A.sibling}U.type===E?(V=ai(U.props.children,D.mode,V,U.key),V.return=D,D=V):(V=Vl(U.type,U.key,U.props,null,D.mode,V),pa(V,U),V.return=D,D=V)}return S(D);case b:t:{for(ct=U.key;A!==null;){if(A.key===ct)if(A.tag===4&&A.stateNode.containerInfo===U.containerInfo&&A.stateNode.implementation===U.implementation){a(D,A.sibling),V=f(A,U.children||[]),V.return=D,D=V;break t}else{a(D,A);break}else n(D,A);A=A.sibling}V=Du(U,D.mode,V),V.return=D,D=V}return S(D);case X:return U=fi(U),Ht(D,A,U,V)}if(ht(U))return rt(D,A,U,V);if(st(U)){if(ct=st(U),typeof ct!="function")throw Error(r(150));return U=ct.call(U),ut(D,A,U,V)}if(typeof U.then=="function")return Ht(D,A,Xl(U),V);if(U.$$typeof===O)return Ht(D,A,Yl(D,U),V);Zl(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,A!==null&&A.tag===6?(a(D,A.sibling),V=f(A,U),V.return=D,D=V):(a(D,A),V=Ou(U,D.mode,V),V.return=D,D=V),S(D)):a(D,A)}return function(D,A,U,V){try{da=0;var ct=Ht(D,A,U,V);return nr=null,ct}catch(ot){if(ot===er||ot===Fl)throw ot;var kt=Pe(29,ot,null,D.mode);return kt.lanes=V,kt.return=D,kt}}}var di=Ng(!0),Bg=Ng(!1),Os=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ds(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Kl(e),bg(e,null,a),n}return ql(e,c,n,a),Kl(e)}function ga(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function ya(){if(Gu){var e=tr;if(e!==null)throw e}}function ma(e,n,a,c){Gu=!1;var f=e.updateQueue;Os=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,j=x.next;x.next=null,S===null?h=j:S.next=j,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=j:C.next=j,K.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,K=j=x=null,C=h;do{var N=C.lane&-536870913,L=N!==C.lane;if(L?(_t&N)===N:(c&N)===N){N!==0&&N===Pi&&(Gu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ut=C;N=n;var Ht=a;switch(ut.tag){case 1:if(rt=ut.payload,typeof rt=="function"){G=rt.call(Ht,G,N);break t}G=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ut.payload,N=typeof rt=="function"?rt.call(Ht,G,N):rt,N==null)break t;G=y({},G,N);break t;case 2:Os=!0}}N=C.callback,N!==null&&(e.flags|=64,L&&(e.flags|=8192),L=f.callbacks,L===null?f.callbacks=[N]:L.push(N))}else L={lane:N,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(j=K=L,x=G):K=K.next=L,S|=N;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;L=C,C=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}}while(!0);K===null&&(x=G),f.baseState=x,f.firstBaseUpdate=j,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),js|=S,e.lanes=S,e.memoizedState=G}}function Lg(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ig(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),j=M.S;if(j!==null&&j(C,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var K=wE(x,c);ba(e,n,K,rn(e))}else ba(e,n,c,rn(e))}catch(G){ba(e,n,{then:function(){},status:"rejected",reason:G},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function AE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=my(e).queue;yy(e,f,n,Z,a===null?AE:function(){return Sy(e),a(c)})}function my(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Sy(e){var n=my(e);n.next===null&&(n=e.alternate.memoizedState),ba(e,n.next.queue,{},rn())}function cf(){return Te(Ba)}function vy(){return se().memoizedState}function by(){return se().memoizedState}function OE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Ds(a);var c=Rs(n,e,a);c!==null&&(Ye(c,n,a),ga(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lo(e)?Ey(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),Cy(a,n,c)))}function wy(e,n,a){var c=rn();ba(e,n,a,c)}function ba(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lo(e))Ey(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return ql(e,n,f,0),qt===null&&Hl(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),Cy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function lo(e){var n=e.alternate;return e===yt||n!==null&&n===yt}function Ey(e,n){ir=to=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Cy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}var wa={readContext:Te,use:so,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};wa.useEffectEvent=Zt;var xy={readContext:Te,use:so,useCallback:function(e,n){return Ue().memoizedState=[e,n===void 0?null:n],e},useContext:Te,useEffect:ly,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ro(4194308,4,fy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ro(4194308,4,e,n)},useInsertionEffect:function(e,n){ro(4,2,e,n)},useMemo:function(e,n){var a=Ue();n=n===void 0?null:n;var c=e();if(pi){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=Ue();if(a!==void 0){var f=a(n);if(pi){ws(!0);try{a(n)}finally{ws(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var n=Ue();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=wy.bind(null,yt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=Ue();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=yy.bind(null,yt,e.queue,!0,!1),Ue().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=yt,f=Ue();if(Rt){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(_t&127)!==0||$g(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,ly(Qg.bind(null,c,h,e),[e]),c.flags|=2048,ar(9,{destroy:void 0},Yg.bind(null,c,h,a,n),null),a},useId:function(){var e=Ue(),n=qt.identifierPrefix;if(Rt){var a=Un,c=zn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n="_"+n+"R_"+a,a=eo++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is=="string"?S.createElement(f,{is:c.is}):S.createElement(f)}}h[xe]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Oe(h,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&ss(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&ss(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(e=it.current,Zi(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=_e,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[xe]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Vm(e.nodeValue,a)),e||Ts(n,!0)}else e=Oo(e).createTextNode(c),e[xe]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=Zi(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[xe]=n}else li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zi(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[xe]=n}else li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),ho(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return Pn(n.type),$t(n),null;case 19:if(H(ne),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ca(c,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Pl(e),h!==null){for(n.flags|=128,Ca(c,!1),e=h.updateQueue,n.updateQueue=e,ho(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)wg(a,e),a=a.sibling;return Y(ne,ne.current&1|2),Rt&&Zn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Xt()>So&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304)}else{if(!f)if(e=Pl(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,ho(n,e),Ca(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Rt)return $t(n),null}else 2*Xt()-c.renderingStartTime>So&&a!==536870912&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Xt(),e.sibling=null,a=ne.current,Y(ne,f?a&1|2:a&1),Rt&&Zn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&ho(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(ui),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Pn(le),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function UE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Pn(le),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return P(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ne),null;case 4:return vt(),null;case 10:return Pn(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(ui),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Pn(le),null;case 25:return null;default:return null}}function Fy(e,n){switch(Mu(n),n.tag){case 3:Pn(le),vt();break;case 26:case 27:case 5:P(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ne);break;case 10:Pn(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(ui);break;case 24:Pn(le)}}function xa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function zs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,j=C;try{j()}catch(K){Bt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Bt(n,n.return,K)}}function Jy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Ig(n,a)}catch(c){Bt(e,e.return,c)}}}function Xy(e,n,a){a.props=gi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function _a(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a=="function"?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function jn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Zy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break t;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;n1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Hs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Fn));else if(c!==4&&(c===27&&Hs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function po(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Hs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(po(e,n,a),e=e.sibling;e!==null;)po(e,n,a),e=e.sibling}function Py(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Oe(n,c,a),n[xe]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var is=!1,ue=!1,Of=!1,tm=typeof WeakSet=="function"?WeakSet:Set,Se=null;function jE(e,n){if(e=e.containerInfo,Jf=jo,e=hg(e),bu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,j=0,K=0,G=e,N=null;e:for(;;){for(var L;G!==a||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(L=G.firstChild)!==null;)N=G,G=L;for(;;){if(G===e)break e;if(N===a&&++j===f&&(C=S),N===h&&++K===c&&(x=S),(L=G.nextSibling)!==null)break;G=N,N=G.parentNode}G=L}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},jo=!1,Se=n;Se!==null;)if(n=Se,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Se=e;else for(;Se!==null;){switch(n=Se,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Oe(h,c,a),h[xe]=e,me(h),c=h;break t;case"link":var S=a0("link","href",f).get(c+(a.href||""));if(S){for(var C=0;CHt&&(S=Ht,Ht=ut,ut=S);var D=ug(C,ut),A=ug(C,Ht);if(D&&A&&(L.rangeCount!==1||L.anchorNode!==D.node||L.anchorOffset!==D.offset||L.focusNode!==A.node||L.focusOffset!==A.offset)){var U=G.createRange();U.setStart(D.node,D.offset),L.removeAllRanges(),ut>Ht?(L.addRange(U),L.extend(A.node,A.offset)):(U.setEnd(A.node,A.offset),L.addRange(U))}}}}for(G=[],L=C;L=L.parentNode;)L.nodeType===1&&G.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;Ca?32:a,M.T=null,a=jf,jf=null;var h=Bs,S=cs;if(de=0,fr=Bs=null,cs=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,fm(h.current),om(h,h.current,S,a),jt=C,Ma(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Jr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function Mm(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=Rs(e,n,2),e!==null&&(Zr(e,2),Nn(e))}function Bt(e,n,a){if(e.tag===3)Mm(e,e,a);else for(;n!==null;){if(n.tag===3){Mm(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ns===null||!Ns.has(c))){e=fn(a,e),a=ky(2),c=Rs(n,a,2),c!==null&&(zy(a,c,n,e),Zr(c,2),Nn(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new LE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=VE.bind(null,e,n,a),n.then(e,e))}function VE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(_t&a)===a&&(Wt===4||Wt===3&&(_t&62914560)===_t&&300>Xt()-mo?(jt&2)===0&&hr(e,0):kf|=a,ur===_t&&(ur=0)),Nn(e)}function km(e,n){n===0&&(n=Tp()),e=ri(e,n),e!==null&&(Zr(e,n),Nn(e))}function GE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),km(e,a)}function $E(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),km(e,a)}function YE(e,n){return Cn(e,n)}var xo=null,pr=null,Hf=!1,_o=!1,qf=!1,Is=0;function Nn(e){e!==pr&&e.next===null&&(pr===null?xo=pr=e:pr=pr.next=e),_o=!0,Hf||(Hf=!0,FE())}function Ma(e,n){if(!qf&&_o){qf=!0;do for(var a=!1,c=xo;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Nm(c,h))}else h=_t,h=Ol(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Xr(c,h)||(a=!0,Nm(c,h));c=c.next}while(a);qf=!1}}function QE(){zm()}function zm(){_o=Hf=!1;var e=0;Is!==0&&i1()&&(e=Is);for(var n=Xt(),a=null,c=xo;c!==null;){var f=c.next,h=Um(c,n);h===0?(c.next=null,a===null?xo=f:a.next=f,f===null&&(pr=a)):(a=c,(e!==0||(h&3)!==0)&&(_o=!0)),c=f}de!==0&&de!==5||Ma(e),Is!==0&&(Is=0)}function Um(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,G=x.initiatorType;K&&Gm(G)&&(x=x.responseEnd,S+=K*(x"u"?null:document;function n0(e,n,a){var c=gr;if(c&&typeof n=="string"&&n){var f=cn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),e0.has(f)||(e0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement("link"),Oe(n,"link",e),me(n),c.head.appendChild(n)))}}function d1(e){us.D(e),n0("dns-prefetch",e,null)}function p1(e,n){us.C(e,n),n0("preconnect",e,n)}function g1(e,n,a){us.L(e,n,a);var c=gr;if(c&&e&&n){var f='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+cn(a.imageSizes)+'"]')):f+='[href="'+cn(e)+'"]';var h=f;switch(n){case"style":h=yr(e);break;case"script":h=mr(e)}mn.has(h)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n==="style"&&c.querySelector(ja(h))||n==="script"&&c.querySelector(Na(h))||(n=c.createElement("link"),Oe(n,"link",e),me(n),c.head.appendChild(n)))}}function y1(e,n){us.m(e,n);var a=gr;if(a&&e){var c=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+cn(c)+'"][href="'+cn(e)+'"]',h=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=mr(e)}if(!mn.has(h)&&(e=y({rel:"modulepreload",href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Na(h)))return}c=a.createElement("link"),Oe(c,"link",e),me(c),a.head.appendChild(c)}}}function m1(e,n,a){us.S(e,n,a);var c=gr;if(c&&e){var f=Li(c).hoistableStyles,h=yr(e);n=n||"default";var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(ja(h)))C.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement("link");me(x),Oe(x,"link",e),x._p=new Promise(function(j,K){x.onload=j,x.onerror=K}),x.addEventListener("load",function(){C.loading|=1}),x.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Ro(S,n,c)}S={type:"stylesheet",instance:S,count:1,state:C},f.set(h,S)}}}function S1(e,n){us.X(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement("script"),me(h),Oe(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function v1(e,n){us.M(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=mn.get(f))&&ih(e,n),h=a.createElement("script"),me(h),Oe(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function s0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=yr(a.href),a=Li(f).hoistableStyles,c=a.get(n),c||(c={type:"style",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yr(a.href);var h=Li(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(ja(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,""));return S}if(n&&c!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=mr(a),a=Li(f).hoistableScripts,c=a.get(n),c||(c={type:"script",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yr(e){return'href="'+cn(e)+'"'}function ja(e){return'link[rel="stylesheet"]['+e+"]"}function i0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?c.loading=1:(n=e.createElement("link"),c.preload=n,n.addEventListener("load",function(){return c.loading|=1}),n.addEventListener("error",function(){return c.loading|=2}),Oe(n,"link",a),me(n),e.head.appendChild(n))}function mr(e){return'[src="'+cn(e)+'"]'}function Na(e){return"script[async]"+e}function r0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var c=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(c)return n.instance=c,me(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),me(c),Oe(c,"style",f),Ro(c,a.precedence,e),n.instance=c;case"stylesheet":f=yr(a.href);var h=e.querySelector(ja(f));if(h)return n.state.loading|=4,n.instance=h,me(h),h;c=i0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement("link"),me(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Oe(h,"link",c),n.state.loading|=4,Ro(h,a.precedence,e),n.instance=h;case"script":return h=mr(a.src),(f=e.querySelector(Na(h)))?(n.instance=f,me(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement("script"),me(f),Oe(f,"link",c),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Ro(c,a.precedence,e));return n.instance}function Ro(e,n,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,h=f,S=0;S title"):null)}function w1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function o0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function E1(e,n,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=yr(c.href),h=n.querySelector(ja(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ko.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,me(h);return}h=n.ownerDocument||n,c=i0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement("link"),me(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Oe(h,"link",c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ko.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var rh=0;function C1(e,n){return e.stylesheets&&e.count===0&&Uo(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function Uo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(x1,e),zo=null,ko.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=zo.get(e);if(a)var c=a.get(null);else{a=new Map,zo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=q1(),dh.exports}var V1=K1(),W=Ud();const G1="https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t",$1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0",Y1="https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw",Q1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY",lv=W.createContext(null);function jd(){const s=W.useContext(lv);if(!s)throw new Error("useServerEndpoint must be used within ServerEndpointProvider");return s}function F1(){return G1}function J1(){return Y1}function X1(){return{Authorization:`Bearer ${$1}`}}function Z1(){return{Authorization:`Bearer ${Q1}`}}function W1({children:s}){const t=F1(),i=J1(),r=W.useMemo(()=>X1(),[]),l=W.useMemo(()=>Z1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(lv.Provider,{value:o,children:s})}var Ko={exports:{}},Sh,k0;function P1(){if(k0)return Sh;k0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function tC(){if(z0)return Ko.exports;z0=1;var s=P1();function t(o,u,d){if(typeof o=="function"&&(d=u,u=o,o=null),!(d>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var p=s(r),g=null,m=null,y=0,v=null,w={push:k,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(F){if(!(F>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(d=F,!w.paused)for(;g&&y=d||w.paused?m?(m.next=st,m=st):(g=st,m=st,w.saturated()):(y++,u.call(o,st.value,st.worked))}function $(F,nt){var st=p.get();st.context=o,st.release=z,st.value=F,st.callback=nt||i,st.errorHandler=v,y>=d||w.paused?g?(st.next=g,g=st):(g=st,m=st,w.saturated()):(y++,u.call(o,st.value,st.worked))}function z(F){F&&p.release(F);var nt=g;nt&&y<=d?w.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&w.empty()):--y===0&&w.drain()}function I(){g=null,m=null,w.drain=i}function X(){g=null,m=null,w.drain(),w.drain=i}function tt(F){v=F}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o=="function"&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(B){T(null,B)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=w,g.drained=b,g;function v(E){var T=new Promise(function(B,R){m(E,function(O,k){if(O){R(O);return}B(k)})});return T.catch(i),T}function w(E){var T=new Promise(function(B,R){y(E,function(O,k){if(O){R(O);return}B(k)})});return T.catch(i),T}function b(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var B=g.drain;g.drain=function(){typeof B=="function"&&B(),T(),g.drain=B}}})});return E}}return Ko.exports=t,Ko.exports.promise=l,Ko.exports}var eC=tC();const ov=z1(eC),On="Stream-Next-Offset",Uc="Stream-Cursor",jc="Stream-Up-To-Date",In="Stream-Closed",vh="Stream-Seq",nC="Stream-TTL",sC="Stream-Expires-At",U0="Producer-Id",Vo="Producer-Epoch",j0="Producer-Seq",iC="Producer-Expected-Seq",rC="Producer-Received-Seq",bh="offset",Go="live",aC="stream-sse-data-encoding";var Xs=class cv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name="FetchError",this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(d&&d.includes("application/json"))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new cv(r,o,u,l,i)}},Nd=class extends Error{constructor(){super("Fetch with backoff aborted"),this.name="FetchBackoffAbortError"}},te=class ed extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name="DurableStreamError",this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(o&&o.includes("application/json"))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=N0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new ed(d,u,r,l)}static fromFetchError(t){const i=N0(t.status);return new ed(t.message,i,t.status,t.json??t.text)}};function N0(s){switch(s){case 400:return"BAD_REQUEST";case 401:return"UNAUTHORIZED";case 403:return"FORBIDDEN";case 404:return"NOT_FOUND";case 409:return"CONFLICT_SEQ";case 429:return"RATE_LIMITED";case 503:return"BUSY";default:return"UNKNOWN"}}var lC=class extends Error{constructor(){super("Invalid stream options: missing required url parameter"),this.name="MissingStreamUrlError"}},uv=class extends te{code="STREAM_CLOSED";status=409;streamClosed=!0;finalOffset;constructor(s,t){super("Cannot append to closed stream","STREAM_CLOSED",409,s),this.name="StreamClosedError",this.finalOffset=t}},oC=class extends Error{constructor(){super("Invalid signal option. It must be an instance of AbortSignal."),this.name="InvalidSignalError"}};const cC=[429,503],Bd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function uC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function fv(s,t=Bd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const w=await s(...p);if(w.ok)return w;throw await Xs.fromResponse(w,g.toString())}catch(w){if(u?.(),m?.signal?.aborted)throw new Nd;if(w instanceof Xs&&!cC.includes(w.status)&&w.status>=400&&w.status<500)throw w;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),w;const b=w instanceof Xs?uC(w.headers["retry-after"]):0,E=Math.random()*y,T=Math.min(E,r),B=Math.max(b,T);if(o){const R=b>0?"server+client":"client";console.log(`Retry attempt #${v} after ${B}ms (${R}, serverMin=${b}ms, clientBackoff=${T}ms)`)}await new Promise(R=>setTimeout(R,B)),y=Math.min(y*l,r)}}}}const fC=[201,204,205];function hC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||fC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Nd:new Xs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l=="string"?l:"failed to read body")}}}function dC(s){return typeof Symbol<"u"&&typeof Symbol.asyncIterator=="symbol"&&typeof s[Symbol.asyncIterator]=="function"}function pC(s){if(typeof Symbol>"u"||typeof Symbol.asyncIterator!="symbol"||typeof s[Symbol.asyncIterator]=="function")return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,"values",{configurable:!0,writable:!0,value:t})}catch{}}function wh(s){return dC(s)||pC(s),s}async function*B0(s,t){const i=s.getReader(),r=new TextDecoder;let l="",o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=l.split(` +`);l=g.pop()??"";for(const m of g)if(m===""){if(o.type&&o.data.length>0){const y=o.data.join(` +`);if(o.type==="data")yield{type:"data",data:y};else if(o.type==="control")try{const v=JSON.parse(y);yield{type:"control",streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const w=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${w}`,"PARSE_ERROR")}}o={data:[]}}else if(m.startsWith("event:")){const y=m.slice(6);o.type=y.startsWith(" ")?y.slice(1):y}else if(m.startsWith("data:")){const y=m.slice(5);o.data.push(y.startsWith(" ")?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type==="data")yield{type:"data",data:d};else if(o.type==="control")try{const p=JSON.parse(d);yield{type:"control",streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,"PARSE_ERROR")}}}finally{i.releaseLock()}}var Ld=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},hv=class nd extends Ld{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new nd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new nd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Id(this)}},Eh=class wr extends Ld{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new wr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new wr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:"healthy",state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:"fallback",state:new hv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:"reconnect",state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:"healthy",state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:"healthy",state:this}}pause(){return new Id(this)}},Id=class sd extends Ld{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new sd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new sd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const L0="PAUSE_STREAM";var gC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o="active";#u;#w;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new hv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener("abort",()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#D()}#D(){if(typeof document=="object"&&typeof document.hidden=="boolean"&&typeof document.addEventListener=="function"){const s=()=>{document.hidden?this.#R():this.#T()};document.addEventListener("visibilitychange",s),this.#w=()=>{typeof document=="object"&&document.removeEventListener("visibilitychange",s)},document.hidden&&this.#R()}}#R(){this.#o==="active"&&(this.#o="pause-requested",this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(L0))}#T(){if(this.#o==="paused"||this.#o==="pause-requested"){if(this.#l.signal.aborted)return;this.#i instanceof Id&&(this.#i=this.#i.resume().state),this.#o="active",this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new te(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,"BAD_REQUEST")}#r(){this.#w?.(),this.#h()}#_(s){this.#w?.(),this.#f(s)}#b(s){if(this.#x!==null)throw new te(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,"ALREADY_CONSUMED");this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(On)||void 0,cursor:s.headers.get(Uc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(In)?.toLowerCase()==="true"}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#z(s){this.#i=this.#i.withSSEControl(s)}#U(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action==="fallback")return this.#v.logWarnings&&console.warn("[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy."),null;if(s.action==="reconnect"){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#U(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?B0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:"continue",newIterator:r}}catch(r){return{type:"error",error:r instanceof Error?r:new Error("SSE reconnection failed")}}return{type:"closed"}}return i.type==="data"?this.#L(i.data,s):(this.#z(i),i.upToDate?{type:"response",response:mC("",i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:"continue"})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=id(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:"response",response:o,newIterator:u??void 0}}catch(u){return{type:"error",error:u instanceof Error?u:new Error("SSE reconnection failed")}}}if(l.type==="control")return this.#z(l),{type:"response",response:id(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get("content-type")?.includes("text/event-stream")??!1)&&s.body)this.#U(),this.#u=new AbortController,i=B0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case"response":l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case"closed":this.#r(),r.close();return;case"error":this.#_(l.error),r.error(l.error);return;case"continue":l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===L0){this.#o==="pause-requested"&&(this.#o="paused");return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#w?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#b("body"),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#b("json"),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||"[]";let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+"...":o;throw new te(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,"PARSE_ERROR")}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#b("text"),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join("")}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#b("bodyStream"),wh(this.#j())}jsonStream(){this.#b("jsonStream"),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||"[]";let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,"PARSE_ERROR")}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return wh(i)}textStream(){this.#b("textStream");const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return wh(t)}subscribeJson(s){this.#b("subscribeJson"),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||"[]";let v;try{v=JSON.parse(y)}catch(b){const E=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse JSON response: ${b instanceof Error?b.message:String(b)}. Data: ${E}`,"PARSE_ERROR")}const w=Array.isArray(v)?v:[v];await s({items:w,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#b("subscribeBytes");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#b("subscribeText");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#w?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(On),o=s.headers.get(Uc),u=s.headers.has(jc),d=s.headers.get(In)?.toLowerCase()==="true";return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function yC(s){const t=s.replace(/[\n\r]/g,"");if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new te(`Invalid base64 data: length ${t.length} is not a multiple of 4`,"PARSE_ERROR");try{if(typeof Buffer<"u")return new Uint8Array(Buffer.from(t,"base64"));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>yC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((b,E)=>b+E.length,0),v=new Uint8Array(y);let w=0;for(const b of m)v.set(b,w),w+=b.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith("[")&&v.endsWith("]")){const w=v.slice(1,-1).trim();w.length>0&&m.push(w)}else m.push(v)}g=`[${m.join(",")}]`}else g=s.join("");return new Response(g,{status:200,headers:p})}async function Xa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r=="function"?t[i]=await r():t[i]=r;return t}async function ds(s,t,i){const r=s.status;if(r===404)throw new te(`Stream not found: ${t}`,"NOT_FOUND",404);if(r===409){if(s.headers.get(In)?.toLowerCase()==="true"){const d=s.headers.get(On)??void 0;throw new uv(t,d)}const o=i?.operation==="create"?`Stream already exists: ${t}`:"Sequence conflict: seq is lower than last appended",u=i?.operation==="create"?"CONFLICT_EXISTS":"CONFLICT_SEQ";throw new te(o,u,409)}throw r===400?new te("Bad request (possibly content-type mismatch)","BAD_REQUEST",400):await te.fromResponse(s,t)}async function Po(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r=="function"?t[i]=await r():t[i]=r);return t}const I0=new Set;function SC(){if(!(typeof process>"u"))return"production"}function vC(){return typeof globalThis.window<"u"}function bC(){if(typeof globalThis.window<"u"&&typeof globalThis.window.location<"u")return globalThis.window.location.href}function wC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function dv(s,t){if(t===!1||SC()==="test"||!vC()||typeof console>"u"||typeof console.warn!="function")return;const r=s instanceof URL?s.toString():s,l=wC(r);l&&l.protocol==="http:"&&(I0.has(l.origin)||(I0.add(l.origin),console.warn("[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.")))}async function EC(s){if(!s.url)throw new te("Invalid stream options: missing required url parameter","BAD_REQUEST");let t=s.headers,i=s.params;for(;;)try{return await CC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function CC(s){const t=s.url instanceof URL?s.url.toString():s.url;dv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??"-1";i.searchParams.set(bh,r);const l=s.live??!0;(l==="long-poll"||l==="sse")&&i.searchParams.set(Go,l);const o=await Po(s.params);for(const[z,I]of Object.entries(o))i.searchParams.set(z,I);const u=await Xa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener("abort",()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...z)=>fetch(...z)),g=s.backoffOptions??Bd,m=fv(p,g);let y;try{y=await m(i.toString(),{method:"GET",headers:u,signal:d.signal})}catch(z){throw z instanceof Nd?new te("Stream request was aborted","UNKNOWN"):z}const v=y.headers.get("content-type")??void 0,w=y.headers.get(On)??r,b=y.headers.get(Uc)??void 0,E=y.headers.has(jc),T=y.headers.get(In)?.toLowerCase()==="true",B=s.json===!0||(v?.includes("application/json")??!1),O=y.headers.get(aC)==="base64"?"base64":void 0,k=async(z,I,X,tt)=>{const F=new URL(t);F.searchParams.set(bh,z),tt||(l==="sse"?F.searchParams.set(Go,"sse"):(l===!0||l==="long-poll")&&F.searchParams.set(Go,"long-poll")),I&&F.searchParams.set("cursor",I);const nt=await Po(s.params);for(const[Kt,ht]of Object.entries(nt))F.searchParams.set(Kt,ht);const st=await Xa(s.headers),xt=await m(F.toString(),{method:"GET",headers:st,signal:X});return xt.ok||await ds(xt,t),xt},$=l==="sse"?async(z,I,X)=>{const tt=new URL(t);tt.searchParams.set(bh,z),tt.searchParams.set(Go,"sse"),I&&tt.searchParams.set("cursor",I);const F=await Po(s.params);for(const[xt,Kt]of Object.entries(F))tt.searchParams.set(xt,Kt);const nt=await Xa(s.headers),st=await m(tt.toString(),{method:"GET",headers:nt,signal:X});return st.ok||await ds(st,t),st}:void 0;return new gC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:B,initialOffset:w,initialCursor:b,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:k,startSSE:$,sseResilience:s.sseResilience,encoding:O})}var H0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name="StaleEpochError",this.currentEpoch=s}},xC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name="SequenceGapError",this.expectedSeq=s,this.receivedSeq=t}};function q0(s){return s?s.split(";")[0].trim().toLowerCase():""}var pv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#w;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error("epoch must be >= 0");if(l<=0)throw new Error("maxBatchBytes must be > 0");if(o<=0)throw new Error("maxInFlight must be > 0");if(u<0)throw new Error("lingerMs must be >= 0");this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=ov.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener("abort",()=>{this.#A(new te("Producer aborted","ALREADY_CLOSED",void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new te("Producer is closed","ALREADY_CLOSED",void 0,void 0);let t;if(typeof s=="string")t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new te("append() requires string or Uint8Array. For objects, use JSON.stringify().","BAD_REQUEST",400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#w);return this.#u=i,i}this.#o=!0,this.#w=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??"application/octet-stream",i=q0(t)==="application/json";let r;if(s!==void 0){const g=typeof s=="string"?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[U0]:this.#e,[Vo]:this.#n.toString(),[j0]:l.toString(),[In]:"true"},d=await this.#l(this.#t.url,{method:"POST",headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===403){const g=d.headers.get(Vo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new H0(m)}throw await Xs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#D(r,i,void 0)}catch(l){throw this.#D(r,i,l),this.#d&&this.#d(l),l}}#D(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??"application/octet-stream",l=q0(r)==="application/json";let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(",")}]`;else{const y=s.reduce((b,E)=>b+E.body.length,0),v=new Uint8Array(y);let w=0;for(const b of s)v.set(b.body,w),w+=b.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[U0]:this.#e,[Vo]:i.toString(),[j0]:t.toString()},g=await this.#l(u,{method:"POST",headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:"",duplicate:!0};if(g.status===200)return{offset:g.headers.get(On)??"",duplicate:!1};if(g.status===403){const y=g.headers.get(Vo),v=y?parseInt(y,10):i;if(this.#a){const w=v+1;return this.#n=w,this.#s=1,this.#T(s,0,w)}throw new H0(v)}if(g.status===409){const y=g.headers.get(iC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(";")[0].trim().toLowerCase():""}function _C(s){return s!=null&&typeof s.then=="function"}var Ln=class $a{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){OC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=ov.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Bd},l=fv(this.#n,r);this.#e=hC(l)}static async create(t){const i=new $a(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new $a(t);return await i.head(),i}static async head(t){return new $a(t).head()}static async delete(t){return new $a(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:"HEAD",headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ds(l,this.url)}const o=l.headers.get("content-type")??void 0,u=l.headers.get(On)??void 0,d=l.headers.get("etag")??void 0,p=l.headers.get("cache-control")??void 0,g=l.headers.get(In)?.toLowerCase()==="true";return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i["content-type"]=l),t?.ttlSeconds!==void 0&&(i[nC]=String(t.ttlSeconds)),t?.expiresAt&&(i[sC]=t.expiresAt),t?.closed&&(i[In]="true");const o=TC(t?.body),u=await this.#e(r.toString(),{method:"PUT",headers:i,body:o,signal:this.#t.signal});u.ok||await ds(u,this.url,{operation:"create"});const d=u.headers.get("content-type");return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:"DELETE",headers:i,signal:t?.signal??this.#t.signal});l.ok||await ds(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l),i[In]="true";let o;t?.body!==void 0&&(xh(l)==="application/json"?o=`[${typeof t.body=="string"?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body=="string",t.body));const u=await this.#e(r.toString(),{method:"POST",headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()==="true"){const g=u.headers.get(On)??void 0;throw new uv(this.url,g)}return u.ok||await ds(u,this.url),{finalOffset:u.headers.get(On)??""}}async append(t,i){const r=_C(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)==="application/json";let d;u?d=`[${typeof t=="string"?t:new TextDecoder().decode(t)}]`:typeof t=="string"?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:"POST",headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ds(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)==="application/json";let d;if(u)d=`[${t.map(v=>typeof v.data=="string"?v.data:new TextDecoder().decode(v.data)).join(",")}]`;else{const y=t.some(w=>w.data instanceof Uint8Array),v=t.some(w=>typeof w.data=="string");if(y&&!v){const w=t.map(B=>B.data),b=w.reduce((B,R)=>B+R.length,0),E=new Uint8Array(b);let T=0;for(const B of w)E.set(B,T),T+=B.length;d=E}else if(v&&!y)d=t.map(w=>w.data).join("");else{const w=new TextEncoder,b=t.map(R=>typeof R.data=="string"?w.encode(R.data):R.data),E=b.reduce((R,O)=>R+O.length,0),T=new Uint8Array(E);let B=0;for(const R of b)T.set(R,B),B+=R.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:"POST",headers:i,body:d,signal:g});m.ok||await ds(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[vh]=i.seq);const u=AC(t),d=await this.#e(l.toString(),{method:"POST",headers:r,body:u,duplex:"half",signal:i?.signal??this.#t.signal});d.ok||await ds(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new pv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return EC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Xa(this.#t.headers)}async#f(){const t=await Xa(this.#t.headers),i=new URL(this.url),r=await Po(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function TC(s){if(s!==void 0)return typeof s=="string"?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function AC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r=="string"?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o=="string"?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function OC(s){if(!s.url)throw new lC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new oC;dv(s.url,s.warnOnHttp)}const DC="__includes_scalar__";class Ai{}class kr extends Ai{constructor(t,i){super(),this.collection=t,this.alias=i,this.type="collectionRef"}}class Sn extends Ai{constructor(t,i){super(),this.query=t,this.alias=i,this.type="queryRef"}}class Me extends Ai{constructor(t){super(),this.path=t,this.type="ref"}}class Be extends Ai{constructor(t){super(),this.value=t,this.type="val"}}class Je extends Ai{constructor(t,i){super(),this.name=t,this.args=i,this.type="func"}}class gv extends Ai{constructor(t,i){super(),this.name=t,this.args=i,this.type="agg"}}class Oi extends Ai{constructor(t,i,r,l,o,u,d="collection",p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type="includesSubquery"}}function zr(s){return s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof Oi}function Hd(s){return typeof s=="object"&&"expression"in s?s.expression:s}function K0(s){return typeof s=="object"&&"expression"in s?s.expression:s}function V0(s){return typeof s=="object"&&"expression"in s&&s.residual===!0}function RC(s){return{expression:s,residual:!0}}function MC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function el(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type==="ref")return el(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=MC(s,r);return o?o.type==="queryRef"?el(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name="TanStackDBError"}}class G0 extends En{constructor(t,i,r){const l=`${t==="insert"?"Insert":"Update"} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join("")}`;super(r||l),this.name="SchemaValidationError",this.type=t,this.issues=i}}class Di extends En{constructor(t){super(t),this.name="CollectionConfigurationError"}}class kC extends Di{constructor(){super("Collection requires a config")}}class zC extends Di{constructor(){super("Collection requires a sync config")}}class UC extends Di{constructor(){super("Schema must implement the standard-schema interface")}}class $0 extends Di{constructor(){super("Schema validation must be synchronous")}}class gl extends En{constructor(t){super(t),this.name="CollectionStateError"}}class jC extends gl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class NC extends gl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class BC extends gl{constructor(){super("Collection is in error state")}}class LC extends gl{constructor(){super("Active subscribers count is negative - this should never happen")}}class Gn extends En{constructor(t){super(t),this.name="CollectionOperationError"}}class IC extends Gn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class HC extends Gn{constructor(t,i){const r=t===null?"null":typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class qC extends Gn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class KC extends Gn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class VC extends Gn{constructor(){super("The first argument to update is missing")}}class GC extends Gn{constructor(){super("No keys were passed to update")}}class $C extends Gn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class YC extends Gn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class QC extends Gn{constructor(){super("No keys were passed to delete")}}class FC extends Gn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class qd extends En{constructor(t){super(t),this.name="MissingHandlerError"}}class JC extends qd{constructor(){super("Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.")}}class XC extends qd{constructor(){super("Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.")}}class ZC extends qd{constructor(){super("Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.")}}class ms extends En{constructor(t){super(t),this.name="TransactionError"}}class WC extends ms{constructor(){super("mutationFn is required when creating a transaction")}}class PC extends ms{constructor(){super("onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate."),this.name="OnMutateMustBeSynchronousError"}}class tx extends ms{constructor(){super("You can no longer call .mutate() as the transaction is no longer pending")}}class ex extends ms{constructor(){super("You can no longer call .rollback() as the transaction is already completed")}}class nx extends ms{constructor(){super("You can no longer call .commit() as the transaction is no longer pending")}}class _h extends ms{constructor(){super("No pending sync transaction to write to")}}class Th extends ms{constructor(){super("The pending sync transaction is already committed, you can't still write to it.")}}class sx extends ms{constructor(){super("No pending sync transaction to commit")}}class ix extends ms{constructor(){super("The pending sync transaction is already committed, you can't commit it again.")}}class Ri extends En{constructor(t){super(t),this.name="QueryBuilderError"}}class rx extends Ri{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ax extends Ri{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class lx extends Ri{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class $o extends Ri{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class ox extends Ri{constructor(){super("Join condition must be an equality expression")}}class cx extends Ri{constructor(){super("Query must have a from clause")}}class Y0 extends Ri{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name="QueryCompilationError"}}class ux extends Le{constructor(){super("DISTINCT requires a SELECT clause.")}}class fx extends Le{constructor(){super("fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().")}}class hx extends Le{constructor(){super("Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).")}}class dx extends Le{constructor(){super("HAVING clause requires GROUP BY clause")}}class px extends Le{constructor(){super("LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results")}}class yv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(", ")}`:"";super(`Input for ${l} not found in inputs map${o}`)}}class gx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(", ")}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class yx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class mx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class Sx extends Le{constructor(){super("Reference path cannot be empty")}}class vx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class Q0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Mi extends En{constructor(t){super(t),this.name="JoinError"}}class bx extends Mi{constructor(t){super(`Unsupported join type: ${t}`)}}class wx extends Mi{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Ex extends Mi{constructor(){super("Invalid join condition: expressions must reference source aliases")}}class Cx extends Mi{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class xx extends Mi{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class _x extends Mi{constructor(){super("Invalid join condition")}}class Tx extends Mi{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name="GroupByError"}}class Ax extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Ox extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Rx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class F0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name="SyncCleanupError"}}class Mx extends En{constructor(t){super(t),this.name="QueryOptimizerError"}}class kx extends Mx{constructor(){super("Cannot combine empty expression list")}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(", ")}. This indicates a bug in alias tracking.`)}}class Ux extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(", ")}. This indicates a bug in query compilation. Please report this issue.`)}}class jx extends Le{constructor(){super("setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.")}}function Hn(s,t){return tc(s,t,new Map)}function tc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&tc(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!="object"))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;otc(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s=="object"){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&tc(s[u],t[u],i));return i.delete(s),o}return!1}const Nx=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function Zs(s){if(s==null||typeof s!="object")return!1;const t=s[Symbol.toStringTag];return typeof t=="string"&&Nx.has(t)}const mv={direction:"asc",nulls:"first",stringSort:"locale"},Ah=new WeakMap;let Bx=1;function J0(s){if(Ah.has(s))return Ah.get(s);const t=Bx++;return Ah.set(s,t),t}const Kd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r==="first"?-1:1;if(t==null)return r==="first"?1:-1;if(typeof s=="string"&&typeof t=="string"&&i.stringSort==="locale")return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s=="object",o=typeof t=="object";if(l||o){if(l&&o){const u=J0(s),d=J0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Lx=(s,t,i)=>Kd(t,s,{...i,nulls:i.nulls==="first"?"last":"first"});function Za(s){return(t,i)=>s.direction==="asc"?Kd(t,i,s):Lx(t,i,s)}const Ix=Za({direction:"asc",nulls:"first",stringSort:"locale"});function Hx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case"ref":return t?$x(s):Gx(s);case"func":return Yx(s,t);default:throw new mx(s.type)}}function Gx(s){const[t,...i]=s.path;if(!t)throw new Sx;if(t==="$selected"){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function $x(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Yx(s,t){const i=s.args.map(r=>Vd(r,t));switch(s.name){case"eq":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return ve(u)||ve(d)?null:Kx(u,d)}}case"gt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u>d}}case"gte":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u>=d}}case"lt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u<=d}}case"and":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ve(u)&&(l=!0)}return l?null:!0};case"or":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ve(u)&&(l=!0)}return l?null:!1};case"not":{const r=i[0];return l=>{const o=r(l);return ve(o)?null:!o}}case"in":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return ve(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case"like":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:X0(u,d,!1)}}case"ilike":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:X0(u,d,!0)}}case"upper":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toUpperCase():o}}case"lower":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toLowerCase():o}}case"length":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"||Array.isArray(o)?o.length:0}}case"concat":return r=>i.map(l=>{const o=l(r);try{return String(o??"")}catch{try{return JSON.stringify(o)||""}catch{return"[object]"}}}).join("");case"coalesce":return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case"add":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case"subtract":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case"multiply":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case"divide":{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case"date":{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case"datetime":{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case"strftime":{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!="string")return null;const d=l(o),p=Oh(d);return p?Vx(u,p):null}}case"isUndefined":{const r=i[0];return l=>r(l)===void 0}case"isNull":{const r=i[0];return l=>r(l)===null}default:throw new vx(s.name)}}function X0(s,t,i){if(typeof s!="string"||typeof t!="string")return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return o=o.replace(/%/g,".*"),o=o.replace(/_/g,"."),new RegExp(`^${o}$`,"s").test(r)}class Qx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t==="gt"?"lt":t==="gte"?"lte":t==="lt"?"gt":t==="lte"?"gte":t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function Z0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const rd=["$synced","$origin","$key","$collectionId"];function Fx(s){return rd.includes(s)}function vv(s){return s.some(t=>Fx(t))}function yl(s,t,i){if(vv(t))return;const r=i??{...mv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Qx(l)}function Jx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split("."),u=yl(t,o);if(u&&u.supports("gt")&&u.supports("lt")){let d,p,g=!0,m=!0;for(const{operation:v,value:w}of l)switch(v){case"gt":(d===void 0||w>d)&&(d=w,g=!1);break;case"gte":(d===void 0||w>d)&&(d=w,g=!0);break;case"lt":(p===void 0||w0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Jx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function e_(s,t){if(s.type!=="func"||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=Gd(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!=="func"||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type==="ref"&&r.type==="val"&&Array.isArray(r.value)){const l=i.path,o=r.value,u=yl(t,l);if(u){if(u.supports("in"))return{canOptimize:!0,matchingKeys:u.lookup("in",o)};if(u.supports("eq")){const d=new Set;for(const p of o){const g=u.lookup("eq",p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function bv(s){return s.config.autoIndex==="eager"}function Bc(s,t,i,r,l){if(vv(t)||!bv(i))return;const o=r??{...mv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(".")}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:""}Failed to create auto-index for field path "${t.join(".")}":`,d)}}function s_(s,t){if(!bv(t))return;const i=i_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function i_(s){const t=[];function i(r){if(r.type!=="func")return;const l=r;if(l.name==="and"){for(const g of l.args)i(g);return}if(!["eq","gt","gte","lt","lte","in"].includes(l.name)||l.args.length<1||l.args[0].type!=="ref")return;const d=l.args[0].path;if(d.length===0)return;const p=d.join("_");t.push({fieldName:p,fieldPath:d})}return i(s),t}class r_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Dh=3e4;function Rh(s,t){if(t.length<=Dh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class l_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!="object"||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s=="string"?-1:1}function nl(s){return JSON.stringify(s,(t,i)=>typeof i=="bigint"?i.toString():i instanceof Date?i.toISOString():i)}const c_=Ee(),u_=Ee(),f_=Ee(),h_=Ee(),d_=Ee();function Ee(){return Math.random()*(2**31-1)>>>0}const wv=new ArrayBuffer(8),p_=new DataView(wv),Ys=new Uint8Array(wv);class ml{constructor(){this.hash=c_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case"symbol":{this.update(d_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case"string":this.update(u_);for(let i=0;i>>8&255)}return;case"number":p_.setFloat64(0,t,!0),this.writeByte(Ys[0]),this.writeByte(Ys[1]),this.writeByte(Ys[2]),this.writeByte(Ys[3]),this.writeByte(Ys[4]),this.writeByte(Ys[5]),this.writeByte(Ys[6]),this.writeByte(Ys[7]);return;case"bigint":{let i=t;for(i<0n?(i=-i,this.update(h_)):this.update(f_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const g_=Ee(),y_=Ee(),m_=Ee(),S_=Ee(),v_=Ee(),b_=Ee(),w_=Ee(),E_=Ee(),C_=Ee(),x_=Ee(),__=Ee(),T_=Ee(),A_=Ee(),O_=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function D_(s){const t=s[Symbol.toStringTag];return typeof t=="string"&&O_.has(t)}const R_=128,sl=new WeakMap;function Ne(s){const t=new ml;return Ev(t,s),t.digest()}function M_(s){const t=sl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=k_(s);else if(typeof Buffer<"u"&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=R_)i=z_(s);else return ld(s);else{if(s instanceof File)return ld(s);if(D_(s))i=U_(s);else{let r=s,l=E_;s instanceof Array&&(l=C_),s instanceof Map&&(l=x_,r=[...s.entries()]),s instanceof Set&&(l=__,r=[...s.entries()]),i=j_(r,l)}}return sl.set(s,i),i}function k_(s){const t=new ml;return t.update(w_),t.update(s.getTime()),t.digest()}function z_(s){const t=new ml;t.update(T_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new re(this.#t.filter(([i,r])=>t(i)))}negate(){return new re(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Rh(i,this.#t),Rh(i,t.getInner()),new re(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error("Expected tuple of length 2");const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!="string"&&typeof d!="number")return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+"|"+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new re(l)}#n(){const t=new r_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p=="string")r=!0;else if(typeof p=="number")l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new re(d)}extend(t){const i=t instanceof re?t.getInner():t;Rh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class L_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Mn{#t=[];sendData(t){t instanceof re||(t=new re(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new L_(t)}}class Cv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class ki extends Cv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class I_ extends Cv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class $d extends ki{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class H_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error("Graph already finalized")}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Mn;return new q_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error("Graph not finalized");for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class kn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class q_ extends kn{sendData(t){this.writer.sendData(t)}}class K_ extends ki{run(){const t=this.inputMessages();if(t.length===0)return;const i=new re;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function xv(){return s=>{const t=new kn(s.graph,new Mn),i=new K_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Ya=Symbol("NO_PREFIX");class P0 extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Wa(t),l=this.get(r);if(ec(l)){const[o,u]=l;if(Wa(o)!==r)throw new Error("Mismatching prefixes, this should never happen");if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Fs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Fs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ec(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(ec(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ec(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Wa(r);if(d!==Ya){const p=new P0;p.set(Ya,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Wa(r),p=Wa(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Ya&&d===Ya){const g=new Qa;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new P0;if(p===d){const m=new Qa;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new re(i)}}function Wa(s){return Array.isArray(s)&&(typeof s[0]=="string"||typeof s[0]=="number"||typeof s[0]=="bigint")?s[0]:Ya}function ec(s){return Array.isArray(s)}class V_ extends ki{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new re(i))}}function _v(s){return t=>{const i=new kn(t.graph,new Mn),r=new V_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class G_ extends ki{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new re(i))}}function $_(s=t=>t){return t=>{const i=new kn(t.graph,new Mn),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Y_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function gs(s){return t=>{const i=new kn(t.graph,new Mn),r=new Y_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const Q_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function xr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+" >= "+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error("trailing zero");if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(s.slice(1),null,i)}function Tv(s){if(s.length!==Av(s[0]))throw new Error("invalid integer part of order key: "+s)}function Av(s){if(s>="a"&&s<="z")return s.charCodeAt(0)-97+2;if(s>="A"&&s<="Z")return 90-s.charCodeAt(0)+2;throw new Error("invalid order key head: "+s)}function Fa(s){const t=Av(s[0]);if(t>s.length)throw new Error("invalid order key: "+s);return s.slice(0,t)}function tS(s,t){if(s==="A"+t[0].repeat(26))throw new Error("invalid order key: "+s);const i=Fa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error("invalid order key: "+s)}function eS(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i==="Z")return"a"+t[0];if(i==="z")return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>"a"?r.push(t[0]):r.pop(),o+r.join("")}else return i+r.join("")}function F_(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i==="a")return"Z"+t.slice(-1);if(i==="A")return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<"Z"?r.push(t.slice(-1)):r.pop(),o+r.join("")}else return i+r.join("")}function J_(s,t,i=Q_){if(s!=null&&tS(s,i),t!=null&&tS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+" >= "+t);if(s==null){if(t==null)return"a"+i[0];const p=Fa(t),g=t.slice(p.length);if(p==="A"+i[0].repeat(26))return p+xr("",g,i);if(p{const o=s(i,l);return o!==0?o:ad(t,r)}}class Yd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=o_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:iS(this.#t[r-1]),o=r===this.#t.length?null:iS(this.#t[r]),u=J_(l,o),d=nS(t,u);if(this.#t.splice(r,0,d),rthis.#e(sS(i),sS(r)))}}class Dv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Yd))throw new Error("Cannot move B+-tree implementation of TopK with fractional index");return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class X_ extends ki{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Ov(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Dv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new re(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new re(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function Z_(s,t){return i=>{const r=new kn(i.graph,new Mn),l=new X_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class W_ extends I_{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l,o="inner"){super(t,i,r,l),this.#n=o}run(){const t=Fs.fromMultiSets(this.inputAMessages()),i=Fs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new re;this.#n!=="anti"&&this.emitInnerResults(t,i,r),(this.#n==="left"||this.#n==="full"||this.#n==="anti")&&this.emitLeftOuterResults(t,i,r),(this.#n==="right"||this.#n==="full")&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function Rv(s,t="inner"){return i=>{if(i.graph!==s.graph)throw new Error("Cannot join streams from different graphs");const r=new kn(i.graph,new Mn),l=new W_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class P_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function fe(s){return t=>{const i=new kn(t.graph,new Mn),r=new P_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class tT extends ki{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function od(s){return t=>{const i=new kn(t.graph,new Mn),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function nT(s){return t=>{const i=new kn(t.graph,new Mn),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class sT extends ki{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Ov(l));this.#t=new Dv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new re(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new re(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function iT(s,t){const i=t||{};return r=>{const l=new kn(r.graph,new Mn),o=new sT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function rS(s){return"pipe"in s}function aS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!rS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>rS(l))),r=>{const l="__original_key__";return r.pipe(fe(d=>{const p=s(d),g=nl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(_v(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const w=d.map(([b,E])=>[b[y],E]);g[y]=v.reduce(w)}return[[g,1]]})).pipe(fe(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function rT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function aT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function oT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const uT={sum:rT,count:aT,avg:lT,min:oT,max:cT};function fT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Z_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),xv())}function hT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),xv())}function dT(s,t){return hT(iT,s,t)}const kh="__virtual_synced__",zh="__virtual_has_local__";function lS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l==="$selected")continue;const u=o,d="$synced"in u,p="$origin"in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin==="local"&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:pT,count:gT,avg:yT,min:mT,max:ST}=uT;function vT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type==="agg"||Ur(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ax(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function oS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,b])=>lS(b).synced,reduce:b=>{for(const[E,T]of b)if(!E&&T>0)return!1;return!0}},[zh]:{preMap:([,b])=>lS(b).hasLocal,reduce:b=>{for(const[E,T]of b)if(E&&T>0)return!0;return!1}}};if(t.length===0){const b=d,E={},T={value:0};if(r){for(const[R,O]of Object.entries(r))if(O.type==="agg")b[R]=Qo(O);else if(Ur(O)){const{transformed:k,extracted:$}=cd(O,T);for(const[z,I]of Object.entries($))b[z]=Qo(I);E[R]=pe(k)}}const B=u?([,R])=>({__singleGroup:!0,__correlationKey:R?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(aS(B,b)),s=s.pipe(fe(([,R])=>{const k={...R.$selected||{}};if(r){for(const[F,nt]of Object.entries(r))nt.type==="agg"&&(k[F]=R[F]);cS(k,R,E)}const $=u?R.__correlationKey:void 0,z=$!==void 0?`single_group_${nl($)}`:"single_group",I={...R,$selected:k},X=R[kh],tt=R[zh];return I.$synced=X??!0,I.$origin=tt?"local":"remote",I.$key=z,I.$collectionId=o??I.$collectionId,u&&$!==void 0&&(I[u]={__correlationKey:$}),[z,I]})),i&&i.length>0)for(const R of i){const O=K0(R),k=gc(O,r||{},"$selected"),$=pe(k);s=s.pipe(gs(([,z])=>{const I={$selected:z.$selected};return Tr($(I))}))}if(l&&l.length>0)for(const R of l)s=s.pipe(gs(([,O])=>{const k={$selected:O.$selected};return Tr(R(k))}));return s}const p=vT(t,r),g=t.map(b=>pe(b)),m=([,b])=>{const E={...b};delete E.$selected;const T={};for(let B=0;B{const E=b.$selected||{},T={};if(r){for(const[I,X]of Object.entries(r))if(X.type==="agg")T[I]=b[I];else if(!v[I]){const tt=p.selectToGroupByIndex.get(I);tt!==void 0?T[I]=b[`__key_${tt}`]:T[I]=E[I]}cS(T,b,v)}else for(let I=0;I0)for(const b of i){const E=K0(b),T=gc(E,r||{}),B=pe(T);s=s.pipe(gs(([,R])=>{const O={$selected:R.$selected};return B(O)}))}if(l&&l.length>0)for(const b of l)s=s.pipe(gs(([,E])=>{const T={$selected:E.$selected};return Tr(b(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case"ref":return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case"val":return s.value===t.value;case"func":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case"agg":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Qo(s){const t=pe(s.args[0]),i=([,o])=>{const u=t(o);return typeof u=="number"?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u=="number"||typeof u=="string"||typeof u=="bigint"||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case"sum":return pT(i);case"count":return gT(l);case"avg":return yT(i);case"min":return mT(r);case"max":return ST(r);default:throw new Ox(s.name)}}function gc(s,t,i="$selected"){switch(s.type){case"agg":{const r=s;for(const[l,o]of Object.entries(t))if(o.type==="agg"&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case"func":{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case"ref":return s;case"val":return s;default:throw new Rx(s.type)}}function cS(s,t,i){for(const r of Object.keys(t))r.startsWith("__agg_")&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith("__agg_")&&delete s[r]}function Ur(s){return zr(s)?s.type==="agg"?!0:s.type==="func"&&"args"in s?s.args.some(t=>Ur(t)):!1:!1}function cd(s,t){if(s.type==="agg"){const i=`__agg_${t.value++}`;return{transformed:new Me(["$selected",i]),extracted:{[i]:s}}}if(s.type==="func"){const i={},r=s.args.map(l=>{const o=cd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function wT(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,"$selected");return{compiledExpression:pe(T),compareOptions:ud(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(B=>B.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const B=E,R=T;for(let O=0;O1?String(k.path[0]):s.from.alias}}if(B){const z=i.every(F=>F.expression.type==="ref")?i.map(F=>{const nt=F.expression,st=el(s,nt,l);return pe(st?new Me(st.path):F.expression,!0)}):void 0;b={alias:R,offset:p??0,limit:d,comparator:(F,nt)=>{if(i.length===1){const st=F&&B(F),xt=nt&&B(nt);return v(st,xt)}if(z){const st=xt=>xt&&z.map(Kt=>Kt(xt));return v(st(F),st(nt))}return 0},valueExtractorForRawRow:F=>{if(i.length===1)return B(F);if(z)return z.map(nt=>nt(F))},firstColumnValueExtractor:B,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=b,w=F=>{o[tt].dataNeeded=()=>{const nt=F();return Math.max(0,b.limit-nt)}}}}return g?t.pipe(fT(y,{limit:d,offset:p,comparator:v,setSizeCallback:w,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),b&&(b.offset=T.offset??b.offset,b.limit=T.limit??b.limit)})}})):t.pipe(dT(y,{limit:d,offset:p,comparator:v,setSizeCallback:w,setWindowFn:E=>{u(T=>{E(T),b&&(b.offset=T.offset??b.offset,b.limit=T.limit??b.limit)})}}))}function ud(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function ET(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:"insert",key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error("limit cannot be used without orderBy");if(t.orderBy){const r=t.where?Pa(t.where):void 0,l=xT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Zx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=Pa(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:""}Error processing where clause, falling back to full scan:`,r);const l=Pa(t.where);return t.optimizedOnly?void 0:i(l)}}function Pa(s){const t=Sv(s);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function CT(s,t){const i=Pa(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type==="insert")i(o.value)&&l.push(o);else if(o.type==="update"){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:"insert"}):!u&&d&&l.push({...o,type:"delete",value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function xT(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type==="ref"){const y=g.path,v=ud(p,s);Bc(y[0],y,s,v);const w=yl(s,y,v);if(w&&w.supports("gt")){const b=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return w.takeFromStart(i??w.keyCount,b)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Za(m.compareOptions),v=uS(p.value,m.expression),w=uS(g.value,m.expression),b=y(v,w);if(b!==0)return b}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function uS(s,t){if(t.type==="ref"){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type==="val"?t.value:Sv(t)(s)}class fS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ad(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const nc="__tanstack_db_direct";class _T{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state==="persisting"){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(R=>R.truncate)?.optimisticSnapshot:null;let y,v;const w=new Set;for(const R of r){for(const O of R.operations)w.add(O.key);for(const[O]of R.rowMetadataWrites)w.add(O)}let b=this.preSyncVisibleState;if(b.size===0){b=new Map;for(const R of w){const O=this.get(R);O!==void 0&&b.set(R,O)}}const E=[],T=this.config.sync.rowUpdateMode||"partial",B=new Map;for(const R of this.transactions.values())if(R.state==="completed")for(const O of R.mutations)this.isThisCollection(O.collection)&&O.optimistic&&B.set(O.key,{type:O.type,value:O.modified});for(const R of r){if(R.truncate){const O=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const k of O){if(m?.deletes.has(k))continue;const $=m?.upserts.get(k)||this.syncedData.get(k);$!==void 0&&E.push({type:"delete",key:k,value:$})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const k of w)b.delete(k);this._events.emit("truncate",{type:"truncate",collection:this.collection})}for(const O of R.operations){const k=O.key;this.syncedKeys.add(k);const $=this.isLocalOnly||this.pendingLocalChanges.has(k)||this.pendingLocalOrigins.has(k)||y?.has(k)===!0||v?.has(k)===!0?"local":"remote";switch(O.type){case"insert":this.syncedData.set(k,O.value),this.rowOrigins.set(k,$),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break;case"update":{if(T==="partial"){const z=Object.assign({},this.syncedData.get(k),O.value);this.syncedData.set(k,z)}else this.syncedData.set(k,O.value);this.rowOrigins.set(k,$),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break}case"delete":this.syncedData.delete(k),this.syncedMetadata.delete(k),this.rowOrigins.delete(k),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break}}for(const[O,k]of R.rowMetadataWrites){if(k.type==="delete"){this.syncedMetadata.delete(O);continue}this.syncedMetadata.set(O,k.value)}for(const[O,k]of R.collectionMetadataWrites){if(k.type==="delete"){this.syncedCollectionMetadata.delete(O);continue}this.syncedCollectionMetadata.set(O,k.value)}}if(o){const R=new Set;for(const $ of r)for(const z of $.operations)(z.type==="insert"||z.type==="update")&&R.add(z.key);const O=new Map(m.upserts),k=new Set(m.deletes);for(const[$,z]of O)if(!k.has($))if(R.has($)){let I=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===$&&tt.type==="insert"){tt.value=z,I=!0;break}}I||E.push({type:"insert",key:$,value:z})}else E.push({type:"insert",key:$,value:z});if(E.length>0&&k.size>0){const $=[];for(const z of E)z.type==="insert"&&k.has(z.key)||$.push(z);E.length=0,E.push(...$)}this.lifecycle.status!=="ready"&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[R,O]of m.upserts)this.optimisticUpserts.set(R,O);for(const R of m.deletes)this.optimisticDeletes.add(R)}for(const R of this.transactions.values())if(!["completed","failed"].includes(R.state)){for(const O of R.mutations)if(this.isThisCollection(O.collection)&&O.optimistic)switch(O.type){case"insert":case"update":this.optimisticUpserts.set(O.key,O.modified),this.optimisticDeletes.delete(O.key);break;case"delete":this.optimisticUpserts.delete(O.key),this.optimisticDeletes.add(O.key);break}}for(const R of w){const O=b.get(R),k=this.get(R),$=this.getVirtualPropsSnapshotForState(R,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:B}),z=this.getVirtualPropsSnapshotForState(R),I=$.$synced!==z.$synced||$.$origin!==z.$origin,X=O!==void 0?Z0(O,R,this.collection.id,()=>$.$synced,()=>$.$origin):void 0,tt=B.get(R);let F=!1;tt&&(tt.type==="delete"&&O!==void 0&&k===void 0&&Hn(tt.value,O)||k!==void 0&&Hn(tt.value,k))&&(F=!0);const nt=I&&O!==void 0&&k!==void 0&&Hn(O,k);if(!(F&&!nt))if(O===void 0&&k!==void 0){const st=B.get(R);if(st){const xt=st.value,Kt=Z0(xt,R,this.collection.id,()=>$.$synced,()=>$.$origin);E.push({type:"update",key:R,value:k,previousValue:Kt})}else E.push({type:"insert",key:R,value:k})}else O!==void 0&&k===void 0?E.push({type:"delete",key:R,value:X??O}):O!==void 0&&k!==void 0&&(!Hn(O,k)||nt)&&E.push({type:"update",key:R,value:k,previousValue:X??O})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new fS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new fS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?"local":this.rowOrigins.get(t)??"remote"}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:"local"});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?"local":(i?.rowOrigins??this.rowOrigins).get(t)??"remote"})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[nc]===!0;if(y.state==="completed"){for(const w of y.mutations)if(this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.add(w.key),!!w.optimistic))switch(w.type){case"insert":case"update":this.pendingOptimisticUpserts.set(w.key,w.modified),this.pendingOptimisticDeletes.delete(w.key),v?(this.pendingOptimisticDirectUpserts.add(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break;case"delete":this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.add(w.key),v?(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.add(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break}}else if(y.state==="failed")for(const w of y.mutations)this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.delete(w.key),w.optimistic&&(this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.delete(w.key),this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())["completed","failed"].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case"insert":case"update":this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case"delete":this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const w of this.pendingSyncedTransactions)for(const b of w.operations)y.add(b.key);const v=m.filter(w=>!(w.type==="delete"&&y.has(w.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===w.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:"delete",key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:"insert",key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:"update",key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state==="completed"){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Mv(){const s=new Map;function t(i){const r=i.join(".");if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return i;if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Si(s){const t=new Map;let i=0;function r(o){const u=o.join(".");if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return o;if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(".")}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return[];if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"||typeof u=="string"&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,"__refProxy","__path","__type"]},getOwnPropertyDescriptor(o,u){if(u==="__refProxy"||u==="__path"||u==="__type")return{enumerable:!1,configurable:!0};if(typeof u=="string"&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function hS(s){const t=Si(s),i=new Map;function r(o){const u=o.join(".");if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return["$selected",...o];if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u==="$selected"?l:Reflect.get(o,u,d)},has(o,u){return u==="$selected"?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),"$selected"]},getOwnPropertyDescriptor(o,u){return u==="$selected"?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ae(s){return sc(s)?new Me(s.__path):s&&typeof s=="object"&&"type"in s&&(s.type==="func"||s.type==="ref"||s.type==="val"||s.type==="agg")?s:new Be(s)}function sc(s){return s&&typeof s=="object"&&s.__refProxy===!0}function fd(s,t){return new Je("eq",[ae(s),ae(t)])}function dS(s,t){return new Je("gt",[ae(s),ae(t)])}function TT(s,t){return new Je("gte",[ae(s),ae(t)])}function hd(s,t){return new Je("lt",[ae(s),ae(t)])}function dd(s,t,...i){const r=[s,t,...i];return new Je("and",r.map(l=>ae(l)))}function AT(s,t,...i){const r=[s,t,...i];return new Je("or",r.map(l=>ae(l)))}function OT(s,t){return new Je("in",[ae(s),ae(t)])}class DT{constructor(t){this.query=t}}class RT{constructor(t){this.query=t}}class kv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function MT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction==="asc"?dS:hd)(r,new Be(t[0]))}const i=[];for(let r=0;rdd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>AT(r,l))}class kT extends kv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status="ready",this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on("unsubscribed",o=>r.onUnsubscribe(o)),r.whereExpression&&s_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?CT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on("truncate",()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner("status:change",{type:"status:change",subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus("loadingSubset"),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus("ready")}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if("where"in t){const p=t.where;if(i.where){const g=i.where,m=dd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error("limit is required");if(!this.orderByIndex)throw new Error("Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.");const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?Pa(y):void 0,w=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const F=this.collection.get(tt);return F===void 0?!1:v?.(F)??!0};let b=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],F=this.collection.currentStateAsChanges({where:fd(tt,new Be(g))});if(F){const nt=F.map(xt=>xt.key).filter(xt=>!this.sentKeys.has(xt)&&w(xt));T.push(...nt);const st=m.take(i-T.length,g,w);T.push(...st)}else T=m.take(i,g,w)}else T=m.takeFromStart(i,w);const B=()=>Math.max(i-E.length,0),R=()=>T.length===0,O=t[0].expression,k=O.type==="ref"?pe(new Me(O.path),!0):null;for(;B()>0&&!R();){const tt=new Set;for(const F of T){const nt=this.collection.get(F);E.push({type:"insert",key:F,value:nt}),b=k?k(nt):nt,tt.add(F)}T=m.take(B(),b,w)}const $=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let z;if(r!==void 0&&r.length>0){const tt=MT(t,r);if(tt){const{expression:F}=t[0],nt=r[0];let st;if(nt instanceof Date){const xt=new Date(nt.getTime()+1);st=dd(TT(F,new Be(nt)),hd(F,new Be(xt)))}else st=fd(F,new Be(nt));z={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const I={where:y,limit:i,orderBy:t,cursor:z,offset:l??$,subscription:this},X=this.collection._sync.loadSubset(I);u?.(X),this.loadedSubsets.push(I),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type==="insert")continue;l.type==="delete"&&this.sentKeys.delete(l.key)}else{if(l.type==="update")o={...l,type:"insert",previousValue:void 0};else if(l.type==="delete"&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type==="delete"?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner("unsubscribed",{type:"unsubscribed",subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error("Cannot specify both 'where' and 'whereExpression' options. Use one or the other.");const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Mv(),p=r(d);o=ae(p)}const u=new kT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on("status:change",i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status==="cleaned-up"||this.lifecycle.status==="idle")&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new LC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const UT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),jT=s=>{clearTimeout(s)},NT=typeof window<"u"&&"requestIdleCallback"in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>UT(s),Uh=typeof window<"u"&&"cancelIdleCallback"in window?s=>window.cancelIdleCallback(s):jT,zv=class hs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return hs.instance||(hs.instance=new hs),hs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error("Error in CleanupQueue task:",l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){hs.instance&&(hs.instance.timeoutId!==null&&clearTimeout(hs.instance.timeoutId),hs.instance=null)}};zv.instance=null;let jh=zv;class BT{constructor(t,i){this.status="idle",this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:["loading","error","cleaned-up"],loading:["ready","error","cleaned-up"],ready:["cleaned-up","error"],error:["cleaned-up","idle"],"cleaned-up":["loading","error"]}[t].includes(i))throw new NC(t,i,this.id)}setStatus(t,i=!1){if(t==="ready"&&!i)throw new gl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case"error":throw new jC(t,this.id);case"cleaned-up":this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,"ready"),this.status==="loading"){if(this.setStatus("ready",!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Uh(this.idleCallbackId),this.idleCallbackId=NT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:""}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus("cleaned-up"),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Qd=Symbol("liveQueryInternal");class LT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??"eager"}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!=="idle"&&this.lifecycle.status!=="cleaned-up")){this.lifecycle.setStatus("loading");try{const t=IT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;"key"in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type==="insert"){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o="update";else{const w=this.config.utils[Qd];throw new KC(l,this.id,{hasCustomGetKey:w?.hasCustomGetKey??!1,hasJoins:w?.hasJoins??!1,hasDistinct:w?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o==="delete"?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:"delete"})):o==="insert"?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:"set",value:u.metadata}):r.rowMetadataWrites.set(l,{type:"delete"}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:"set",value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new sx;if(i.committed)throw new ix;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode==="on-demand"&&!this.syncLoadSubsetFn)throw new Di(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus("error"),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type==="delete"?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"delete"})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type==="delete"?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"delete"})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type==="delete"?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode==="on-demand"&&console.warn(`${this.id?`[${this.id}] `:""}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status==="ready"){t();return}if(this.lifecycle.status==="error"){i(new BC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status==="idle"||this.lifecycle.status==="cleaned-up")try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:"start"}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:"end"})})}loadSubset(t){if(this.syncMode==="eager")return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new F0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new F0(this.id,t)})}this.preloadPromise=null}}function IT(s){if(typeof s=="function")return{cleanup:s};if(typeof s=="object")return s}const pS=1;function ic(s,t){return s===t?0:sQs(r)??null);if(s instanceof Date)return{__type:"date",value:s.toISOString()};if(s instanceof Set)return{__type:"set",values:Array.from(s).map(l=>Qs(l)??null).sort((l,o)=>ic(bi(l),bi(o)))};if(s instanceof Map)return{__type:"map",entries:Array.from(s.entries()).map(([l,o])=>({key:Qs(l)??null,value:Qs(o)??null})).sort((l,o)=>ic(bi(l.key),bi(o.key)))};if(s instanceof RegExp)return{__type:"regexp",value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>ic(r,l));for(const[r,l]of i){const o=Qs(l);o!==void 0&&(t[r]=o)}return t}function bi(s){return s===null?"null":Array.isArray(s)?`[${s.map(bi).join(",")}]`:typeof s!="object"?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>ic(r,l)).map(r=>`${JSON.stringify(r)}:${bi(s[r])}`).join(",")}}`}function qT(s,t,i,r,l){const o=HT(r),u=Qs(t)??null,d=Qs(l),g=Qs({signatureVersion:pS,expression:u,options:d??null})??null,m=bi(g);return{signatureVersion:pS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function pd(s){if(s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(i=>pd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=pd(r);return t}function KT(s){return JSON.parse(JSON.stringify(s))}class VT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable("createIndex");const r=++this.indexCounter,l=Mv(),o=t(l),u=ae(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Di(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=qT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable("removeIndex");const i=typeof t=="number"?t:t.id,r=this.indexes.get(i);if(!r||typeof t!="number"&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:KT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:pd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case"insert":i.add(r.key,r.value);break;case"update":r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case"delete":i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var GT={};const $T=new Set(["find","findLast","findIndex","findLastIndex","filter","map","flatMap","forEach","some","every","reduce","reduceRight"]),YT=new Set(["pop","push","shift","unshift","splice","sort","reverse","fill","copyWithin"]),QT=new Set(["set","delete","clear","add"]),FT=new Set(["entries","keys","values","forEach"]);function Fd(s){return s!==null&&typeof s=="object"&&!(s instanceof Date)&&!(s instanceof RegExp)&&!Zs(s)}function JT(s,t,i,r){if($T.has(s))return function(...l){const o=l[0];if(typeof o!="function")return t.apply(i.copy_,l);const u=(g,m)=>{if(Fd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s==="reduce"||s==="reduceRight"){const g=function(m,y,v,w){const b=u(y,v);return o.call(this,m,b,v,w)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s==="find"||s==="findLast")&&p&&typeof p=="object"){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s==="filter"&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function XT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Fd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function gS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function ZT(s,t,i,r,l,o,u){if(FT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s==="forEach"){const y=p[0];if(typeof y=="function"){const v=function(w,b,E){const T=y.call(this,w,b,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s==="entries"||s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s==="values"&&r instanceof Map)for(const[b,E]of l.copy_.entries())v.set(E,b);const w=new Map;if(r instanceof Set)for(const b of l.copy_.values())w.set(b,b);return{next(){const b=y.next();if(!b.done&&b.value&&typeof b.value=="object"){if(s==="entries"&&Array.isArray(b.value)&&b.value.length===2){if(b.value[1]&&typeof b.value[1]=="object"){const E=b.value[0],T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:B}=o(b.value[1],T);b.value[1]=B}}else if(s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s==="values"&&r instanceof Map){const E=v.get(b.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:B}=o(b.value,T);b.value=B}}else if(r instanceof Set){const E=b.value,T={tracker:l,prop:E,updateSet:R=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(R),w.set(E,R))}},{proxy:B}=o(b.value,T);b.value=B}else{const E=Symbol("iterator-value"),{proxy:T}=o(b.value,{tracker:l,prop:E});b.value=T}}return b},[Symbol.iterator](){return this}}}return g}}function At(...s){const t=typeof window<"u"&&typeof localStorage<"u";t&&localStorage.getItem("DEBUG")==="true"?console.log("[proxy]",...s):!t&&typeof process<"u"&>.DEBUG==="true"&&console.log("[proxy]",...s)}function ps(s,t=new WeakMap){if(s==null||typeof s!="object")return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=ps(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,ps(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(ps(o,t))}),l}if(Zs(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=ps(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=ps(s[l],t);return i}let yS=0;function WT(){return yS+=1,yS}function Jd(s,t){const i=new Map;function r(y,v){if(At("Object ID:",y.constructor.name),i.has(y))return i.get(y);{const w=Jd(y,v);return i.set(y,w),w}}const l=new Map,o={copy_:ps(s),originalObject:ps(s),proxyCount:WT(),modified:!1,assigned_:{},parent:t,target:s};At("createChangeProxy called for target",s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At("propagating change to parent"),"updateMap"in y.parent?y.parent.updateMap(y.copy_):"updateSet"in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At("checkIfReverted called with assigned keys:",Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At("No assigned properties, returning true"),!0;for(const w in y.assigned_)if(y.assigned_[w]===!0){const b=y.copy_[w],E=y.originalObject[w];if(At(`Checking property ${String(w)}, current:`,b,"original:",E),!Hn(b,E))return At(`Property ${String(w)} is different, returning false`),!1}else if(y.assigned_[w]===!1)return At(`Property ${String(w)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const w of v)if(y.assigned_[w]===!0){const b=y.copy_[w],E=y.originalObject[w];if(!Hn(b,E))return At("Symbol property is different, returning false"),!1}else if(y.assigned_[w]===!1)return At("Symbol property was deleted, returning false"),!1;return At("All properties match original values, returning true"),!0}function p(y,v){At("checkParentStatus called for child prop:",v);const w=d(y);At("Parent checkIfReverted returned:",w),w&&(At("Parent is fully reverted, clearing tracking"),y.modified=!1,y.assigned_={},y.parent&&(At("Continuing up the parent chain"),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At("createObjectProxy",y),l.has(y))return At("proxyCache found match"),l.get(y);const v=new Proxy(y,{get(w,b){At("get",w,b);const E=o.copy_[b]??o.originalObject[b],T=o.originalObject[b];if(At("value (at top of proxy get)",E),Object.getOwnPropertyDescriptor(w,b)?.get)return E;if(typeof E=="function"){if(Array.isArray(w)){const R=b.toString();if(YT.has(R))return gS(E,o,u);const O=JT(R,E,o,r);if(O)return O;if(b===Symbol.iterator)return XT(o,r)}if(w instanceof Map||w instanceof Set){const R=b.toString();if(QT.has(R))return gS(E,o,u);const O=ZT(R,b,E,w,o,r,u);if(O)return O}return E.bind(w)}if(Fd(E)){const R={tracker:o,prop:String(b)},{proxy:O}=r(T,R);return l.set(E,O),O}return E},set(w,b,E){const T=o.copy_[b];if(At(`set called for property ${String(b)}, current:`,T,"new:",E),Hn(T,E))At("Value unchanged, not tracking");else{const B=o.originalObject[b],R=Hn(E,B);if(At("value:",E,"original:",B,"isRevertToOriginal:",R),R){At(`Reverting property ${String(b)} to original value`),delete o.assigned_[b.toString()],At(`Updating copy with original value for ${String(b)}`),o.copy_[b]=ps(B),At("Checking if all properties reverted");const O=d(o);At("All reverted:",O),O?(At("All properties reverted, clearing tracking"),o.modified=!1,o.assigned_={},t&&(At("Updating parent for property:",t.prop),p(t.tracker,t.prop))):(At("Some properties still changed, keeping modified flag"),o.modified=!0)}else At(`Setting new value for property ${String(b)}`),o.copy_[b]=E,o.assigned_[b.toString()]=!0,At("Marking object and ancestors as modified",o),u(o)}return!0},defineProperty(w,b,E){const T=Reflect.defineProperty(w,b,E);return T&&"value"in E&&(o.copy_[b]=ps(E.value),o.assigned_[b.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(w,b){return Reflect.getOwnPropertyDescriptor(w,b)},preventExtensions(w){return Reflect.preventExtensions(w)},isExtensible(w){return Reflect.isExtensible(w)},deleteProperty(w,b){At("deleteProperty",w,b);const E=typeof b=="symbol"?b.toString():b;if(E in w){const T=E in o.originalObject,B=Reflect.deleteProperty(w,b);return B&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),B}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At("getChanges called, modified:",o.modified),At(o),!o.modified)return At("Object not modified, returning empty object"),{};if(typeof o.copy_!="object"||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At("Returning copy:",y),y}}}function PT(s){const t=s.map(i=>Jd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function tA(s,t){const{proxy:i,getChanges:r}=Jd(s);return t(i),r()}function eA(s,t){const{proxies:i,getChanges:r}=PT(s);return t(i),r()}function nA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function sA(s){return typeof s=="object"&&s!==null&&typeof s.hasPendingGraphRun=="function"}class iA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>"u"){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new iA,mc=[];let il=[],rA=0;function aA(s,t){switch(`${s.type}-${t.type}`){case"insert-update":return{...s,type:"insert",original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case"insert-delete":return null;case"update-delete":return t;case"update-update":return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case"delete-delete":case"insert-insert":return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(s){const t=new uA(s);return mc.push(t),t}function rc(){if(il.length>0)return il.slice(-1)[0]}function lA(s){yc.clear(s.id),il.push(s)}function oA(s){try{yc.flush(s.id)}finally{il=il.filter(t=>t.id!==s.id)}}function cA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let uA=class{constructor(t){if(typeof t.mutationFn>"u")throw new WC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state="pending",this.mutations=[],this.isPersisted=nA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=rA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t==="completed"||t==="failed")&&cA(this)}mutate(t){if(this.state!=="pending")throw new tx;lA(this);try{t()}finally{oA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=aA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state==="completed")throw new ex;if(this.setState("failed"),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state==="pending"&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!=="pending")throw new nx;if(this.setState("persisting"),this.mutations.length===0)return this.setState("completed"),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState("completed"),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class fA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable("insert");const o=this.state,u=rc();if(!u&&!this.config.onInsert)throw new JC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,"insert"),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new qC(v);g.add(v);const w=this.generateGlobalKey(v,m),b={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:w,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:"insert",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(b)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[nc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable("delete");const u=rc();if(!u&&!this.config.onDelete)throw new ZC;if(Array.isArray(r)&&r.length===0)throw new QC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new FC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:"delete",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[nc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&"~standard"in t)return t;throw new UC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i==="update"&&r){const u=this.state.get(r);if(u&&t&&typeof t=="object"&&typeof u=="object"){const d=Object.assign({},u,t),p=l["~standard"].validate(d);if(p instanceof Promise)throw new $0;if("issues"in p&&p.issues){const v=p.issues.map(w=>({message:w.message,path:w.path?.map(b=>String(b))}));throw new G0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l["~standard"].validate(t);if(o instanceof Promise)throw new $0;if("issues"in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new G0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!="string"&&typeof t!="number")throw typeof t>"u"?new IC(i):new HC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>"u")throw new VC;const l=this.state;this.lifecycle.validateCollectionUsable("update");const o=rc();if(!o&&!this.config.onUpdate)throw new XC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new GC;const p=typeof i=="function"?i:r,g=typeof i=="function"?{}:i,m=d.map(b=>{const E=this.state.get(b);if(!E)throw new $C(b);return E});let y;u?y=eA(m,p):y=[tA(m[0],p)];const v=d.map((b,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const B=m[E],R=this.validateData(T,"update",b),O=Object.assign({},B,R),k=this.config.getKey(B),$=this.config.getKey(O);if(k!==$)throw new YC(k,$);const z=this.generateGlobalKey($,O);return{mutationId:crypto.randomUUID(),original:B,modified:O,changes:Object.fromEntries(Object.keys(T).map(I=>[I,O[I]])),globalKey:z,key:b,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(b)||{},optimistic:g.optimistic??!0,type:"update",createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const b=Ja({mutationFn:async()=>{}});return b.commit().catch(()=>{}),l.scheduleTransactionCleanup(b),b}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const w=Ja({metadata:{[nc]:!0},mutationFn:async b=>this.config.onUpdate({transaction:b.transaction,collection:this.collection})});return w.applyMutations(v),this.markPendingLocalOrigins(v),w.commit().catch(()=>{}),l.transactions.set(w.id,w),l.scheduleTransactionCleanup(w),l.recomputeOptimisticState(!0),w}}class hA extends kv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit("status:change",{type:"status:change",collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit("subscribers:change",{type:"subscribers:change",collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit("index:added",{type:"index:added",collection:this.collection,index:t})}emitIndexRemoved(t){this.emit("index:removed",{type:"index:removed",collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Xd(s){const t=new Zd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Zd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new kC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??"off"},this.config.autoIndex==="eager"&&!t.defaultIndexType)throw new Di(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new hA,this._indexes=new VT,this._lifecycle=new BT(t,this.id),this._mutations=new fA(t,this.id),this._state=new _T(t),this._sync=new LT(t,this.id),this.comparisonOpts=dA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status==="ready"}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return ET(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function dA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??"locale",locale:t.stringSort==="locale"?t.locale:void 0,localeOptions:t.stringSort==="locale"?t.localeOptions:void 0}}else return{stringSort:"locale"}}function pA(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function gA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(pA(u))throw new PC}),o}}function yA(s){const t=mA(s);let i=s,r,l=0;const o=10;for(;lNv(u)),l=Bv(r),o=Uv(s);for(const[u,d]of l.singleSource)SA(s,u)&&!o.has(u)&&t.set(u,d);return t}function SA(s,t){if(s.from.alias===t)return s.from.type==="collectionRef";if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type==="collectionRef"}return!1}function Uv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type==="left"||r.type==="full")&&t.add(l),(r.type==="right"||r.type==="full")&&t.add(i)}}return t}function gd(s){const t={...s,from:s.from.type==="queryRef"?new Sn(gd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type==="queryRef"?new Sn(gd(i.from.query),i.from.alias):i.from}))};return vA(t)}function vA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=md(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!V0(d)),r=md(t).map(d=>Nv(d)),l=Bv(r),o=wA(s,l),u=s.where.filter(d=>V0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function jv(s){return{...s,from:yd(s.from),join:s.join?.map(t=>({...t,from:yd(t.from)}))}}function yd(s){if(s.type==="collectionRef")return s;const t=jv(s.query);if(bA(t)){const i=yd(t.from);return i.type==="collectionRef"?new kr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function md(s){const t=[];for(const i of s){const r=Hd(i);t.push(...Wd(r))}return t}function Wd(s){if(s.type==="func"&&s.name==="and"){const t=[];for(const i of s.args)t.push(...Wd(i));return t}else return[s]}function Nv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case"ref":if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case"func":l.args&&l.args.forEach(r);break;case"val":break;case"agg":l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Bv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function wA(s,t){const i=new Set,r=Uv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=mS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:mS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(RC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Wd(Hd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(s){return{from:s.from.type==="collectionRef"?new kr(s.from.collection,s.from.alias):new Sn(_r(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type==="collectionRef"?new kr(t.from.collection,t.from.alias):new Sn(_r(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function mS(s,t,i){const r=t.get(s.alias);if(!r)return s.type==="collectionRef"?new kr(s.collection,s.alias):new Sn(_r(s.query),s.alias);if(s.type==="collectionRef"){const u={from:new kr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!AA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);const l=s.query.where||[],o={..._r(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function EA(s,t,i){return s.select?Lv(s.select)||OA(s.select,t,i):!1}function CA(s){return s.groupBy&&s.groupBy.length>0}function xA(s){return s.having&&s.having.length>0}function _A(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function TA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function AA(s,t,i){return!(EA(s,t,i)||CA(s)||xA(s)||_A(s)||TA(s))}function Lv(s){for(const t of Object.values(s))if(typeof t=="object"){const i=t;if(i.type==="agg"||!("type"in i)&&Lv(i))return!0}return!1}function Pd(s){const t=[];if(s==null||typeof s!="object")return t;switch(s.type){case"ref":t.push(s);break;case"func":case"agg":for(const i of s.args??[])t.push(...Pd(i));break}return t}function OA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith("__SPREAD_SENTINEL__")||u instanceof Me||r.add(o);const l=Pd(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=Pd(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new kx;return s.length===1?s[0]:new Je("and",s)}function RA(s,t,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R){let O=s;for(const k of t)O=MA(O,k,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R);return O}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R){const O=t.from.type==="collectionRef",{alias:k,input:$,collectionId:z}=zA(t.from,o,p,g,m,y,v,w,u,d,E,T,B,R);i[k]=$,O&&(T[k]=z);const I=p[r],X=p[z];if(!I)throw new Q0(r);if(!X)throw new Q0(z);const{activeSource:tt,lazySource:F}=jA(t.type,I,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:xt}=kA(t.left,t.right,nt,k),Kt=pe(st),ht=pe(xt);let M=s.pipe(fe(([Z,at])=>[Cr(Kt(at)),[Z,at]])),q=$.pipe(fe(([Z,at])=>{const ft={[k]:at};return[Cr(ht(ft)),[Z,ft]]}));if(!["inner","left","right","full"].includes(t.type))throw new bx(t.type);if(tt){const Z=tt==="main"?t.from:b.from,at=Z.type==="queryRef"&&(Z.query.limit||Z.query.offset),ft=st.type==="func"||xt.type==="func";if(!at&&!ft){const _=tt==="main"?k:l;y.add(_);const H=tt==="main"?M:q,J=el(b,tt==="main"?xt:st,F),lt=J.collection,it=J.path[0];it&&Bc(it,J.path,lt);const St=H.pipe(nT(Ut=>{const vt=B[_]||_,et=g[vt];if(!et)throw new zx(vt,_,F.id,Object.keys(g));if(et.hasLoadedInitialState())return;const P=Ut.getInner().map(([[bt]])=>bt),pt=new Me(J.path);et.requestSnapshot({where:OT(pt,P),optimizedOnly:!0})||et.requestSnapshot()}));tt==="main"?M=St:q=St}}return M.pipe(Rv(q,t.type),UA(t.type))}function kA(s,t,i,r){const l=i.filter(d=>d!==r),o=Sd(s),u=Sd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Ex:o===u?new wx(o):l.includes(o)?u!==r?new xx(r):new _x:new Cx(o)}function Sd(s){switch(s.type){case"ref":return s.path[0]||null;case"func":{const t=new Set;for(const i of s.args){const r=Sd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,w){switch(s.type){case"collectionRef":{const b=t[s.alias];if(!b)throw new yv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case"queryRef":{const b=g.get(s.query)||s.query,E=m(b,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),B=s.query.from.alias;if(!(!T&&s.alias===B))for(const[z,I]of E.sourceWhereClauses)w.set(z,I);const O=Object.keys(E.aliasToCollectionId).find(z=>E.aliasToCollectionId[z]===E.collectionId);O&&O!==s.alias&&(v[s.alias]=O);const $=E.pipeline.pipe(fe(z=>{const[I,[X,tt]]=z;return[I,X]}));return{alias:s.alias,input:$,collectionId:E.collectionId}}default:throw new Tx(s.type)}}function UA(s){return function(t){return t.pipe(gs(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s==="inner"?!!(u&&d):s==="left"?!!u:s==="right"?!!d:!0}),fe(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function jA(s,t,i){switch(s){case"left":return{activeSource:"main",lazySource:i};case"right":return{activeSource:"joined",lazySource:t};case"inner":return t.sizeLA(l,r)))}function HA(s){return s.type==="agg"}function qA(s){return s&&typeof s=="object"&&!zr(s)}function Iv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith("__SPREAD_SENTINEL__")){const u=r.slice(19),d=u.lastIndexOf("__"),p=d>=0?u.slice(0,d):u,g=l&&typeof l=="object"&&"type"in l&&l.type==="ref";if(p.includes(".")||g){const m=[...s],y=g?l:new Me(p.split(".")),v=pe(y);i.push({kind:"merge",targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:"merge",targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type==="includesSubquery"){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});continue}if(qA(o)){Iv([...s,r],o,i);continue}if(HA(o)||Ur(o))i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});else{if(o===void 0||!zr(o)){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>u})}else i.push({kind:"field",alias:[...s,r].join("."),compiled:pe(o)})}}}const Ar=Symbol("includesRouting");function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:w,sourceWhereClauses:b}=yA(s);let E=w;g.set(E,s),Ed(E,s,g);const T={...t},B={},R={},O={},{alias:k,input:$,collectionId:z}=VA(E.from,T,i,r,l,o,u,d,p,g,B,R,b);O[k]=$;let I=$;if(m&&y){const ht=y.path.slice(1);I=$.pipe(fe(([Z,at])=>[QA(at,ht),[Z,at]])).pipe(Rv(m,"inner")).pipe(gs(([Z,[at]])=>at!=null),fe(([Z,[at,ft]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),O[k]=I}let X=I.pipe(fe(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[k]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=RA(X,E.join,O,z,k,T,p,g,i,r,l,o,u,d,s,vc,B,R,b)),E.where&&E.where.length>0)for(const ht of E.where){const M=Hd(ht),q=pe(M);X=X.pipe(gs(([Z,at])=>Tr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(gs(([M,q])=>Tr(ht(q))));const tt=[],F=[];if(E.select){const ht=$A(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=pe(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:pe(Y)}));at=X.pipe(fe(([Y,J])=>{const lt={};for(const it of H){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(J);let Ut=lt[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(_v(H=>H.map(([Y,J])=>[Y,J>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ft,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(B,_.aliasToCollectionId),Object.assign(R,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(J=>({alias:J.path[0],field:J.path.slice(1),compiled:pe(J)})),Y=Z;F.push({fieldName:q.fieldName,getRouting:J=>{const lt={};for(const it of H){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(J);let Ut=lt[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});YA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new ux;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new fx;E.fnSelect?X=X.pipe(fe(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=IA(X,E.select):X=X.pipe(fe(([ht,M])=>{const q=!E.join&&!E.groupBy?M[k]:M;return[ht,{...M,$selected:q}]})),F.length>0&&(X=X.pipe(fe(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of F)q[Z]=at(M);return M.$selected[Ar]=q,[ht,M]})));const nt=m?k:void 0;if(E.groupBy&&E.groupBy.length>0?X=oS(X,E.groupBy,E.having,E.select,E.fnHaving,z,nt):E.select&&Object.values(E.select).some(M=>M.type==="agg"||Ur(M))&&(X=oS(X,[],E.having,E.select,E.fnHaving,z,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type==="agg"):!1))throw new dx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(gs(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe($_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const H=_?.[k]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=wT(s,X,E.orderBy,E.select||{},i[z],u,d,E.limit,E.offset,ht).pipe(fe(([ft,[_,H]])=>{const Y=_.$selected,J=SS(wd(Y),_);if(m){const lt=_[k]?.__correlationKey,it=_.__parentContext??null;return delete J.__correlationKey,delete J.__parentContext,[ft,[J,H,lt,it]]}return[ft,[J,H]]})),at={collectionId:z,pipeline:Z,sourceWhereClauses:b,aliasToCollectionId:B,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new px;const xt=X.pipe(fe(([ht,M])=>{const q=M.$selected,Z=SS(wd(q),M);if(m){const at=M[k]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ft]]}return[ht,[Z,void 0]]})),Kt={collectionId:z,pipeline:xt,sourceWhereClauses:b,aliasToCollectionId:B,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function KA(s){const t=new Set;if(s.from.type==="collectionRef"&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type==="collectionRef"&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=KA(s);for(const l of i)if(t.has(l))throw new gx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type==="queryRef"&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type==="queryRef"&&bd(l.from.query,r)}function VA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case"collectionRef":{const w=t[s.alias];if(!w)throw new yv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case"queryRef":{const w=g.get(s.query)||s.query,b=vc(w,t,i,r,l,o,u,d,p,g);Object.assign(m,b.aliasToCollectionId),Object.assign(y,b.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[$,z]of b.sourceWhereClauses)v.set($,z);const R=Object.keys(b.aliasToCollectionId).find($=>b.aliasToCollectionId[$]===b.collectionId);R&&R!==s.alias&&(y[s.alias]=R);const k=b.pipeline.pipe(fe($=>{const[z,[I,X]]=$,tt=wd(I);return[z,tt]}));return{alias:s.alias,input:k,collectionId:b.collectionId}}default:throw new yx(s.type)}}function GA(s){return s instanceof Be||s&&typeof s=="object"&&"type"in s&&s.type==="val"}function wd(s){return GA(s)?s.value:s}function SS(s,t){if(!s||typeof s!="object")return s;let i=!1;for(const r of rd)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of rd)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Ed(s,t,i){if(s.from.type==="queryRef"&&t.from.type==="queryRef"&&(i.set(s.from.query,t.from.query),Ed(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=tp(l,t);r.push(o)}return new Je(s.name,r)}}function ep(s,t){return s.map(r=>{const l=tp(r.expression,t);return{...r,expression:l}})}const Kv=new WeakMap;function FA(s){return s.utils?.[Qd]?.getBuilder?.()}function JA(s,t){Kv.set(s,t)}function XA(s){return Kv.get(s)}class Pt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?"null":"undefined";throw new $o(i,d)}if(Array.isArray(t))throw new $o(i,"array");if(r.length!==1)throw r.length===0?new $o(i,"empty object"):r.every(d=>!isNaN(Number(d)))?new $o(i,"string"):new rx(i);const l=r[0],o=t[l];let u;if(o instanceof Zd)u=new kr(o,l);else if(o instanceof Pt){const d=o._getQuery();if(!d.from)throw new ax(i);u=new Sn(d,l)}else throw new lx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,"from clause");return new Pt({...this.query,from:i})}join(t,i,r="left"){const[l,o]=this._createRefForSource(t,"join clause"),d=[...this._getCurrentAliases(),l],p=Si(d),g=i(p);let m,y;if(g.type==="func"&&g.name==="eq"&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new ox;const v={from:o,type:r,left:m,right:y},w=this.query.join||[];return new Pt({...this.query,join:[...w,v]})}leftJoin(t,i){return this.join(t,i,"left")}rightJoin(t,i){return this.join(t,i,"right")}innerJoin(t,i){return this.join(t,i,"inner")}fullJoin(t,i){return this.join(t,i,"full")}where(t){const i=this._getCurrentAliases(),r=Si(i),l=t(r),o=sc(l)?ae(l):l;if(!zr(o))throw new Y0(vS(o));const u=this.query.where||[];return new Pt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?hS(i):Si(i),l=t(r),o=sc(l)?ae(l):l;if(!zr(o))throw new Y0(vS(o));const u=this.query.having||[];return new Pt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Si(i);let l=t(r);sc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Gv(l,i);return new Pt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i="asc"){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?hS(r):Si(r),o=t(l),u=typeof i=="string"?{direction:i,nulls:"first"}:{direction:i.direction??"asc",nulls:i.nulls??"first",stringSort:i.stringSort,locale:i.stringSort==="locale"?i.locale:void 0,localeOptions:i.stringSort==="locale"?i.localeOptions:void 0},d=m=>({expression:ae(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Pt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Si(i),l=t(r),o=Array.isArray(l)?l.map(d=>ae(d)):[ae(l)],u=this.query.groupBy||[];return new Pt({...this.query,groupBy:[...u,...o]})}limit(t){return new Pt({...this.query,limit:t})}offset(t){return new Pt({...this.query,offset:t})}distinct(){return new Pt({...this.query,distinct:!0})}findOne(){return new Pt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Pt({...t.query,select:void 0,fnSelect:i})},where(i){return new Pt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Pt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new cx;return this.query}}function vS(s){return s===null?"null":s===void 0?"undefined":typeof s=="object"?"object":typeof s}function ZA(s){return s===void 0?ae(null):s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be?s:ae(s)}function Vv(s){return s!==null&&typeof s=="object"&&!zr(s)&&!s.__refProxy}function Gv(s,t=[]){if(!Vv(s))return ZA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r=="string"&&r.startsWith("__SPREAD_SENTINEL__")){i[r]=l;continue}if(l instanceof Pt){i[r]=Nh(l,r,t,"collection");continue}if(l instanceof DT){if(!(l.query instanceof Pt))throw new Error("toArray() must wrap a subquery builder");i[r]=Nh(l.query,r,t,"array");continue}if(l instanceof RT){if(!(l.query instanceof Pt))throw new Error("concat(toArray(...)) must wrap a subquery builder");i[r]=Nh(l.query,r,t,"concat");continue}i[r]=Gv(l,t)}return i}function np(s){const t=[];switch(s.type){case"ref":t.push(s);break;case"func":for(const i of s.args??[])t.push(...np(i));break}return t}function WA(s,t){const i=typeof s=="object"&&"expression"in s?s.expression:s;return np(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const O of l.join)o.push(O.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let O=0;O=2){for(let z=0;z<$.args.length;z++){const I=$.args[z];if(I.type==="func"&&I.name==="eq"&&I.args.length===2){const X=bS(I.args[0],I.args[1],i,o);if(X){u=X.parentRef,d=X.childRef,p=O,g=z;break}}}if(u)break}}if(!u||!d||p===-1)throw new Error(`Includes subquery for "${t}" must have a WHERE clause with an eq() condition that correlates a parent field with a child field. Example: .where(({child}) => eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const O=m[p],$=(typeof O=="object"&&"expression"in O?O.expression:O).args.filter((z,I)=>I!==g);if($.length===1){const z=typeof O=="object"&&"expression"in O&&O.residual;m[p]=z?{expression:$[0],residual:!0}:$[0]}else{const z=new Je("and",$),I=typeof O=="object"&&"expression"in O&&O.residual;m[p]=I?{expression:z,residual:!0}:z}}else m.splice(p,1);const y=[],v=[];for(const O of m)WA(O,i)?v.push(O):y.push(O);let w;if(v.length>0){const O=new Set;w=[];for(const k of v){const $=typeof k=="object"&&"expression"in k?k.expression:k;for(const z of np($))z.path[0]!=null&&i.includes(z.path[0])&&!O.has(z.path.join("."))&&(O.add(z.path.join(".")),w.push(z))}}const b={...l,where:y.length>0?y:void 0},E=b.select,T=E===void 0||Vv(E);let B=b,R;if(r==="concat"&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r==="collection")throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);R=DC,B={...b,select:{[R]:E}}}return new Oi(B,u,d,t,v.length>0?v:void 0,w,r,R)}function bS(s,t,i,r){if(s.type==="ref"&&t.type==="ref"){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function PA(s){const t=s(new Pt);return $v(t)}function $v(s){return s._getQuery()}function tO(s){const t={};function i(o){o.type==="collectionRef"?t[o.collection.id]=o.collection:o.type==="queryRef"&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Oi?r(d.query):sp(d)&&l(d))}return r(s),t}function Yv(s){const t=s.from;if(t.type==="collectionRef")return t.collection;if(t.type==="queryRef")return Yv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function eO(s){const t=new Map;function i(o){if(o)if(o.type==="collectionRef"){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type==="queryRef"&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Oi?l(d.query):sp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function sp(s){return!(s===null||typeof s!="object"||s instanceof Oi||"type"in s&&typeof s.type=="string"||s.__refProxy)}function nO(s){const t=typeof s.query=="function"?PA(s.query):$v(s.query);if(t.select&&!sp(t.select))throw new hx;return t}function sO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type==="insert"?r.push([[o,l.value],1]):l.type==="update"?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new re(r)),r.length}function*iO(s){for(const t of s)t.type==="update"?(yield{type:"delete",key:t.key,value:t.previousValue},yield{type:"insert",key:t.key,value:t.value}):yield t}function rO(s,t){const i=[];for(const r of s){if(r.type==="insert"){if(t.has(r.key))continue;t.add(r.key)}else r.type==="delete"&&t.delete(r.key);i.push(r)}return i}function aO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type==="delete")continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function lO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?ep(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!=="ref")return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function oO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=nl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=ep(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const wS=Symbol.for("@tanstack/db.collection-config-builder");class cO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=tp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status==="loadingSubset")this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status==="loadingSubset"&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=rO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=sO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=lO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const B=iO(T);this.sendChangesToPipelineWithTracking(B,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const w=this.collection.on("truncate",()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on("unsubscribed",()=>{w()});const b=ep(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:b,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:b,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[wS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[wS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=oO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=aO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let uO=0;class fO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++uO}`,this.query=nO({query:t.query}),this.collections=tO(this.query);const i=eO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Qv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Yv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type==="queryRef"&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Qd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new jx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on("loadingSubset:change",l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("maybeRunGraph called without active sync session. This should not happen.");this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??rc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun=="function"&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("scheduleGraphRun called without active sync session. This should not happen.");let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:"full",sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on("loadingSubset:change",u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new H_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new Ux(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(od(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(SO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=yO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const w=new Map;for(const[,b]of p){const E=this.config.getKey(b.value),T=w.get(E);T?(T.inserts+=b.inserts,T.deletes+=b.deletes,b.inserts>0&&(T.value=b.value,b.orderByIndex!==void 0&&(T.orderByIndex=b.orderByIndex))):w.set(E,{...b})}v=w}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Cd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(od(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,w]=p,b=jr(v,w);let E=l.pendingChildChanges.get(b);E||(E=new Map,l.pendingChildChanges.set(b,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Fv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:"insert"});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:"update"});else if(u>0)l({value:p,type:"delete"});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l==="error"){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l==="cleaned-up"){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus("error")}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=XA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new cO(u,d,p,this),y=p.on("status:change",b=>{this.handleSourceStatusChange(t,d,b)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Qv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function ES(s){return s.materialization!=="collection"}function CS(s,t){if(!t)return s.materialization==="array"?[]:s.materialization==="concat"?"":void 0;if(s.materialization==="collection")return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization==="array"?r:r.map(l=>String(l??"")).join("")}function Fv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(od(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,w]=p,b=jr(v,w);let E=r.get(b);E||(E=new Map,r.set(b,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Fv(i.childCompilationResult.includes,t)),l})}function hO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function dO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(w.value=y.value,y.orderByIndex!==void 0&&(w.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function pO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function gO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Jv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function jr(s,t){return t==null?s:JSON.stringify([s,t])}function xS(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Qv(u):void 0,m={collection:Xd({id:`__child-collection:${s}-${t}-${nl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:"full",sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=hO(l)),m}function Cd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,w=v[Ar]?.[o.fieldName],b=w?.correlationKey,E=w?.parentContext??null,T=jr(b,E);if(b!=null){if(!o.childRegistry.has(T)){const k=xS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,k)}let B=o.correlationToParentKeys.get(T);B||(B=new Set,o.correlationToParentKeys.set(T,B)),B.add(m);const R=CS(o,o.childRegistry.get(T));v[o.fieldName]=R;const O=t.get(m);O&&O!==v&&(O[o.fieldName]=R)}}}const u=ES(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=xS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization==="collection"&&mO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[w,b]of y)v.resultKeys.set(b.value,w),v.orderByIndices&&b.orderByIndex!==void 0&&v.orderByIndices.set(b.value,b.orderByIndex),b.inserts>0&&b.deletes===0?v.syncMethods.write({value:b.value,type:"insert"}):b.inserts>b.deletes||b.inserts===b.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(b.value))?v.syncMethods.write({value:b.value,type:"update"}):b.deletes>0&&v.syncMethods.write({value:b.value,type:"delete"});v.syncMethods.commit()}pO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=dO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Cd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Cd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=ES(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const w=o.childRegistry.get(y);for(const b of v){const E=t.get(b);if(E){const T=l.collection.getKeyFromItem(E),B={...E};E[o.fieldName]=CS(o,w),m.push({type:"update",key:T,value:E,previousValue:B})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],w=v?.correlationKey,b=v?.parentContext??null,E=jr(w,b);if(w!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(gO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function yO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function mO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function SO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function _S(s){return new fO(s).getConfig()}function Bh(s){if(typeof s=="function"){const i=_S({query:s});return TS(i)}else{const t=s,i=_S(t);return t.utils&&(i.utils={...i.utils,...t.utils}),TS(i)}}function TS(s){const t=Xd(s),i=FA(s);return i&&JA(t,i),t}function Xv(s){return s!=null&&"operation"in s.headers}function Zv(s){return s!=null&&"control"in s.headers}var vO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Xv(s))return;s.headers.txid&&typeof s.headers.txid=="string"&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!=="delete"&&(typeof s.value!="object"||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i==="upsert"&&(i=this.existingKeys.get(s.type)?.has(s.key)?"update":"insert");const o=this.existingKeys.get(s.type);i==="insert"||i==="update"?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error("[StreamDB] Error in handler.write():",u),console.error("[StreamDB] Event that caused error:",{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Zv(s))switch(s.headers.control){case"reset":for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error("[StreamDB] Error in handler.commit():",t),t instanceof Error&&t.message.includes("already exists in the collection")&&t.message.includes("live-query")){console.warn("[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error"),console.warn("[StreamDB] Queries with groupBy may show stale data until fixed");continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const AS=new Set(["collections","preload","close","utils","actions"]);function wO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"insert"}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(", ")??"Unknown validation error"}`);if(o!==void 0){const m=i["~standard"].validate(o);if("issues"in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(", ")??"Unknown validation error"}`)}const p=l[t],g=r??(p!=null&&p!==""?String(p):void 0);if(g==null||g==="")throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:"update"}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(", ")??"Unknown validation error"}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:"delete"}}},upsert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"upsert"}}}}}function Wv(s){for(const r of Object.keys(s))if(AS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(AS).join(", ")})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...wO(l.type,l.primaryKey,l.schema)};return i}function Pv(s){const{streamOptions:t,state:i,actions:r}=s,l=new Ln(t),o=new vO,u={};for(const[w,b]of Object.entries(i)){const E=Xd({id:`stream-db:${w}`,schema:b.schema,getKey:T=>String(T[b.primaryKey]),sync:bO(b.type,o,b.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${w}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:"size"in E}),u[w]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let w=0,b=Date.now();d.subscribeJson(T=>{try{w++,b=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${w}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const B of T.items)Xv(B)?o.dispatchChange(B):Zv(B)&&o.dispatchControl(B);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${w}`),o.markUpToDate(),console.log("[StreamDB] Successfully marked up-to-date")),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${w}`)}catch(B){console.error("[StreamDB] Error processing batch:",B),console.error("[StreamDB] Failed batch:",T),o.rejectAll(B),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-b;console.log(`[StreamDB] Health: ${w} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener("abort",()=>{clearInterval(E),console.log("[StreamDB] Aborted - cleaning up health check")})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error("StreamDB closed")),p.abort()},utils:{awaitTxId:(w,b)=>o.awaitTxId(w,b)}};console.log("[StreamDB] Creating db object with collections:",Object.keys(u));const v={collections:u,...y};if(console.log("[StreamDB] db.collections:",Object.keys(v.collections)),console.log("[StreamDB] db.collections.events:",v.collections.events),r){const w=r({db:v,stream:l}),b={};for(const[E,T]of Object.entries(w))b[E]=gA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:b}}return v}const ip=600,EO=ip/2*1e3,CO=3600*24,xO={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.roomId!="string"||t.roomId.length===0?{issues:[{message:"roomId must be a non-empty string"}]}:typeof t.name!="string"||t.name.length===0?{issues:[{message:"name must be a non-empty string"}]}:typeof t.boardSize!="string"?{issues:[{message:"boardSize must be a string"}]}:typeof t.createdAt!="number"?{issues:[{message:"createdAt must be a number"}]}:typeof t.expiresAt!="number"?{issues:[{message:"expiresAt must be a number"}]}:t.playerCount!==void 0&&typeof t.playerCount!="number"?{issues:[{message:"playerCount must be a number"}]}:{value:t}}}},Lh=Wv({rooms:{schema:xO,type:"stream",primaryKey:"roomId"}}),_O={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.playerName!="string"||t.playerName.length===0?{issues:[{message:"playerName must be a non-empty string"}]}:typeof t.score!="number"?{issues:[{message:"score must be a number"}]}:typeof t.timestamp!="number"?{issues:[{message:"timestamp must be a number"}]}:{value:t}}}},OS=Wv({scores:{schema:_O,type:"stream",primaryKey:"playerName"}});function TO(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const tb=W.createContext(null);function eb(){const s=W.useContext(tb);if(!s)throw new Error("useRegistryContext must be used within RegistryProvider");return s}function AO({children:s}){const{dsEndpoint:t,dsHeaders:i}=jd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:"application/json"}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:"application/json",ttlSeconds:CO}),o=await TO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error("[Registry] Failed to initialize:",g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f",color:"rgba(235,235,245,0.68)",fontSize:8},children:"LOADING..."}):r.error||!r.registryDB?Q.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:12,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},children:Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Registry Error: ",r.error?.message||"Failed to load"]})}):Q.jsx(tb.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function OO(s,t=[]){const i=s&&typeof s=="object"&&typeof s.subscribeChanges=="function"&&typeof s.startSyncImmediate=="function"&&typeof s.id=="string",r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((b,E)=>b!==t[E]));if(p)if(i)s.config?.syncMode==="on-demand"&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const b=new Pt,E=s(b);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E=="object")r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=b=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,b()});return r.current.status==="ready"&&(u.current+=1,b()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const b=u.current,E=r.current;return(!d.current||d.current.version!==b||d.current.collection!==E)&&(d.current={collection:E,version:b}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),w=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)w.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const b=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let B=null,R=null;w.current={get state(){return B||(B=new Map(b)),B},get data(){return R||(R=b.map(([,O])=>O)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return w.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Fo=[{label:"Small (20x20)",cols:20,rows:20},{label:"Medium (30x30)",cols:30,rows:30},{label:"Large (40x40)",cols:40,rows:40}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=eb(),[l,o]=W.useState(DO),[u,d]=W.useState(1),[p,g]=W.useState(!1),[m,y]=W.useState(0),[v,w]=W.useState(!1),[b,E]=W.useState(""),[,T]=W.useState(0);W.useEffect(()=>{const z=setInterval(()=>T(I=>I+1),1e3);return()=>clearInterval(z)},[]);const{data:B=[]}=OO(z=>z.from({rooms:r.collections.rooms})),R=Date.now(),k=[...B.filter(z=>z.expiresAt>R)].sort((z,I)=>I.createdAt-z.createdAt),$=async()=>{if(!p){g(!0);try{const z=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Fo[u],X=Hh(z,I),tt=Date.now(),F={roomId:X,name:z,boardSize:`${I.cols}x${I.rows}`,createdAt:tt,expiresAt:tt+ip*1e3};await r.actions.addRoom(F),o(""),i(X)}catch(z){console.error("Failed to create room:",z)}finally{g(!1)}}};return Q.jsxs("div",{style:ie.container,children:[Q.jsx("style",{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),Q.jsx("div",{style:ie.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"NAME"}),Q.jsx("input",{style:ie.input,value:s,onChange:z=>t(z.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"ROOM"}),Q.jsx("input",{style:ie.input,value:l,onChange:z=>o(z.target.value),placeholder:"room name",onKeyDown:z=>z.key==="Enter"&&$()}),Q.jsx("div",{style:{display:"flex",gap:4,marginBottom:10},children:Fo.map((z,I)=>Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,...I===u?ie.sizeBtnActive:{}},onClick:()=>d(I),children:z.label},z.label))}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.createBtn,flex:1,opacity:p?.6:1},onClick:$,disabled:p,children:p?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...ie.joinBtn,flex:1},onClick:()=>w(!0),children:"JOIN"})]})]}),v&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>w(!1),children:Q.jsxs("div",{style:{...ie.card,marginBottom:0},onClick:z=>z.stopPropagation(),children:[Q.jsx("div",{style:ie.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:ie.input,value:b,onChange:z=>E(z.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:z=>{if(z.key==="Enter"&&b.trim()){const I=k.find(X=>X.name===b.trim());i(I?I.roomId:Hh(b.trim(),Fo[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.joinBtn,flex:1},onClick:()=>w(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...ie.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const z=k.find(I=>I.name===b.trim());i(z?z.roomId:Hh(b.trim(),Fo[u]))}},children:"JOIN"})]})]})}),k.length>0&&Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:k.slice(m*5,m*5+5).map(z=>Q.jsx(MO,{room:z,onJoin:()=>i(z.roomId)},z.roomId))}),k.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,width:28,padding:"4px 0",opacity:m===0?.3:1},disabled:m===0,onClick:()=>y(z=>z-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[m+1,"/",Math.ceil(k.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,width:28,padding:"4px 0",opacity:m>=Math.ceil(k.length/5)-1?.3:1},disabled:m>=Math.ceil(k.length/5)-1,onClick:()=>y(z=>z+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:[Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name}),Q.jsx("span",{style:{fontSize:7,color:Jt.dim},children:s.boardSize})]}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const ie={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100dvh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},sizeBtn:{flex:1,padding:"6px 4px",fontSize:6,fontFamily:"inherit",background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer"},sizeBtnActive:{background:"rgba(208,188,255,0.1)",color:Jt.accent,borderColor:Jt.accent},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},Ss=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},xi=()=>new Set,qh=s=>s[s.length-1],UO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ws((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){Ss(this._observers,t,xi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ws((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,ac=Math.abs,ib=(s,t)=>ss>t?s:t,rb=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,ys=64,an=128,Ic=31,_d=63,wi=127,BO=2147483647,bc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=be,Ot=(s,t)=>{for(;t>wi;)be(s,an|wi&t),t=Rn(t/128);be(s,wi&t)},ap=(s,t)=>{const i=rb(t);for(i&&(t=-t),be(s,(t>_d?an:0)|(i?ys:0)|_d&t),t=Rn(t/64);t>0;)be(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=ib(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Hc(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),nD=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":be(s,119),Ei(s,t);break;case"number":LO(t)&&ac(t)<=BO?(be(s,125),ap(s,t)):nD(t)?(be(s,124),PO(s,t)):(be(s,123),tD(s,t));break;case"bigint":be(s,122),eD(s,t);break;case"object":if(t===null)be(s,126);else if(Lc(t)){be(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),bn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),bn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",Ei(t,this.sarr.join("")),Hc(t,this.lensE.toUint8Array()),bn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},wn=()=>{throw qn("Unexpected case")},ab=qn("Unexpected end of array"),lb=qn("Integer out of Range");class qc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new qc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,wt(s)),Br=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posbc)throw lb}throw ab},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&ys)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posbc)throw lb}throw ab},rD=s=>{let t=wt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ci=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ci,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rb(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class $h extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new oc(t),this.str=Ci(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ob=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ob()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cb=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cb=localStorage,yD=!1)}catch{}const mD=cb,cl=Symbol("Equality"),ub=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,bD=Object.keys,wD=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||Ec(s)===Ec(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&ub(t[r],i)),xD=Object.freeze,fb=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fb(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hb={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Cc=s=>IS(ul?hb[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),db=s=>Dd("--"+s)||Cc(s)!==null,AD=db("production"),OD=ul&&_D(hb.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!db("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Cc("COLORTERM")!==null||(Cc("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const fs=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pb=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pb(s,t,i),zD=s=>IO(hp(s,97,122)),UD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?ub(s,t):Lc(s)?rp(s,i=>nb(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,Yc)}get optional(){return new mb(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const he=(s,t=null)=>new dp(s,t);he(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ce=s=>new pp(s);he(pp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Vc=(...s)=>new Kc(s),gb=he(Kc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yb=s=>{if(Lr.check(s))return[BD(s)];if(gb.check(s))return s.shape.map(t=>t+"");if(Tb.check(s))return["[+-]?\\d+.?\\d*"];if(Ab.check(s))return[".*"];if(xc.check(s))return s.shape.map(yb).flat(1);wn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yb).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}he(LD);const ID=Symbol("optional");class mb extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=he(mb);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}he(qD);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Gc(s),VD=he(Gc),GD=Ce(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sb extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vb=(s,t)=>new Sb(s,t),$D=he(Sb);class bb extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new bb(s);he(bb);class wb extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Lc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Eb=(...s)=>new wb(s),QD=he(wb),FD=Ce(s=>Lc(s));class Cb extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cb(s,t);he(Cb);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=he(ZD),PD=Ce(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}he(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nb(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),xc=he(gp),xb=()=>!0,_c=Ce(xb),eR=he(pp,s=>s.shape===xb),yp=Ce(s=>typeof s=="bigint"),nR=Ce(s=>s===yp),_b=Ce(s=>typeof s=="symbol");Ce(s=>s===_b);const Dr=Ce(s=>typeof s=="number"),Tb=Ce(s=>s===Dr),Lr=Ce(s=>typeof s=="string"),Ab=Ce(s=>s===Lr),$c=Ce(s=>typeof s=="boolean"),sR=Ce(s=>s===$c),Ob=Vc(void 0);he(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),iR=he(Kc,s=>s.shape.length===1&&s.shape[0]===null);he(Uint8Array);he(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,Yc,Ob,yp,$c,_b);(()=>{const s=Eb(_c),t=vb(Lr,_c),i=Gr(Dr,Lr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Vc(s);if(PD.check(s))return he(s)}wn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Db=lR(_c).if(Tb,(s,t)=>Yh(t,MS,bc)).if(Ab,(s,t)=>UD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,bc))).if(xc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Db(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pb(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,Yc,Ob,yp,$c,Eb(Dr),vb(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDb(fl(t),s),Qc=typeof document<"u"?document:{};Ce(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ce(s=>s.nodeType===cR);Ce(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Qc.ELEMENT_NODE,uR=Qc.TEXT_NODE,fR=Qc.DOCUMENT_NODE,hR=Qc.DOCUMENT_FRAGMENT_NODE;Ce(s=>s.nodeType===fR);const vs=Symbol,Rb=vs(),Mb=vs(),dR=vs(),pR=vs(),gR=vs(),kb=vs(),yR=vs(),mp=vs(),mR=vs(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...zb(s)),Ub.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...zb(s)),s.unshift(mp),Ub.forEach(t=>t.print(s))},Ub=xi(),jb=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jb(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jb(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nb{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Bb=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{Ss(s.clients,t,()=>[]).push(new Nb(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Ws(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=Ss(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Ib=ob;class $r extends sb{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Ib(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vb,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ws(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=Ss(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,_i)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ws(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Mt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ci(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ci(this.restDecoder))}readKey(){return Ci(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DR{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new oc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new oc(je(t)),this.lenDecoder=new oc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Ws(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zR(s,t.clients.get(l),l,o)})},UR=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=Ws(i.keys()).sort((w,b)=>w-b);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let w=i.get(l[l.length-1]);for(;w.refs.length===w.i;)if(l.pop(),l.length>0)w=i.get(l[l.length-1]);else return null;return w};let u=o();if(u===null)return null;const d=new Vb,p=new Map,g=(w,b)=>{const E=p.get(w);(E==null||E>b)&&p.set(w,b)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const w of r){const b=w.id.client,E=i.get(b);E?(E.i--,d.clients.set(b,E.refs.slice(E.i)),i.delete(b),E.i=0,E.refs=[]):d.clients.set(b,[w]),l=l.filter(T=>T!==b)}r.length=0};for(;;){if(m.constructor!==An){const b=Ss(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(b<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(b===0||b0)m=r.pop();else if(u!==null&&u.i0){const w=new Jc;return Hb(w,d,new Map),Ot(w.restEncoder,0),{missing:p,update:w.toUint8Array()}}return null},NR=(s,t)=>Hb(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Ac(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=UR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,w]of m.missing)if(ww)&&m.missing.set(v,w)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Ac(Nr(d.pendingDs));wt(v.restDecoder);const w=KS(v,l,d);y&&w?d.pendingDs=XS([y,w]):d.pendingDs=y||w}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qb(l.doc,v)}},i,!1),qb=(s,t,i,r=Ac)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qb(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kb=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Jo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw wn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lb(t.ds,s.id),Md=(s,t)=>{const i=Ss(s.meta,Md,xi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gb=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw wn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,zc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$b=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ss(s.changed,t,xi).add(i)},cc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof ge&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=ib(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+cc(l,p)}})},Yb=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kb(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const w=l.clients.get(y),b=Kr(Kn(w,v),1);for(let E=w.length-1;E>=b;)E-=1+cc(w,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,w=l.clients.get(y),b=Kn(w,v);b+11||b>0&&cc(w,b)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(wR(mp,Rb,"[yjs] ",Mb,kb,"Changed the client-id because another client seems to be using it."),r.clientID=Ib()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Jc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yb(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yb(l,0)}}return u};function*$R(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new ge(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,w)=>{if(v.curr.id.client===w.curr.id.client){const b=v.curr.id.clock-w.curr.id.clock;return b===0?v.curr.constructor===w.curr.constructor?0:v.curr.constructor===An?1:-1:b}else return w.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,w=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),w=!0;if(v===null||v.id.client!==y||w&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=b:v=FR(v,b)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qb=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:bn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qb(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qb(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=xi(),l=xi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fb=80;let wp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=wp++}}const WR=s=>{s.timestamp=wp++},Jb=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=wp++},PR=(s,t,i)=>{if(s.length>=Fb){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>ac(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&ac(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;Ss(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kb(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xb=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zb=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ti(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tw=()=>qn("Length exceeded!"),ew=(s,t,i,r)=>{if(i>t._length)throw tw();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},nw=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tw();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Dc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Ti([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Ti([r]);break;case Uint8Array:d=new bl(r);break;case $r:d=new wl(r);break;default:if(r instanceof De)d=new bs(r);else throw new Error("Unexpected content type")}new ge(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sw=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},iw=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Xo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Xc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{ew(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nw(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pb(this,t)}toArray(){return Zb(this)}slice(t=0,i=this.length){return Xb(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Wb(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Xo(this)].length}keys(){return Fh(Xo(this),t=>t[0])}values(){return Fh(Xo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Xo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return iw(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Dc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Js=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&wn(),this.right.content.constructor){case ye:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ye:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return WS(s,u,i)}},rw=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ye&&Js(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new ge(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ye(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},aw=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ye&&Js(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lw=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Js(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new ge(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ye(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,w)=>{l[w]===void 0&&(l[w]=null)});const o=s.doc,u=o.clientID;aw(i,l);const d=lw(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new bs(r):new zi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new ge(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rw(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;aw(i,l);const d=lw(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ye));){if(!i.right.deleted)switch(i.right.content.constructor){case ye:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Js(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` +`;i.right=new ge(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rw(s,t,i,d)},ow=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ye){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ye:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ye){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ye:Yr(u,l.content);break;default:t+=ow(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$b(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ye&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bb(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ye?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case zi:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let w=null;switch(d){case"delete":y>0&&(w={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(w={insert:g},l.size>0&&(w.attributes={},l.forEach((b,E)=>{b!==null&&(w.attributes[E]=b)}))),g="";break;case"retain":m>0&&(w={retain:m},ED(p)||(w.attributes=vD({},p))),m=0;break}w&&i.push(w),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case zi:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ye:{const{key:w,value:b}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(w)??null;Js(E,b)?b!==null&&u.delete(r):(d==="retain"&&v(),Js(b,o.get(w)??null)?delete p[w]:p[w]=b)}}else if(this.deletes(u)){o.set(w,b);const E=l.get(w)??null;Js(E,b)||(d==="retain"&&v(),p[w]=E)}else if(!u.deleted){o.set(w,b);const E=p[w];E!==void 0&&(Js(E,b)?E!==null&&u.delete(r):(d==="retain"&&v(),b===null?delete p[w]:p[w]=b))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const w=i[i.length-1];if(w.retain!==void 0&&w.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((b,E)=>{v=!0,y[E]=b});const w={insert:d};v&&(w.attributes=y),l.push(w),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case bs:case zi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((w,b)=>{v[b]=w})}l.push(y);break}case ye:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sw(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===_i)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class _i extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new _i}clone(){const t=new _i;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ws(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new pM(this,i,t))}toString(){return Wb(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{ew(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nw(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pb(this,t)}slice(t=0,i=this.length){return Xb(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new _i;class qr extends _i{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return wD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return iw(this,t)}getAttributes(t){return t?nM(this,t):sw(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Rc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Rc(this.hookName)}clone(){const t=new Rc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const gM=s=>new Rc(s.readKey());class Mc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(UM)}}const yM=s=>new Mc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gb(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class bl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new bl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new bl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cw=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class wl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new wl(cw(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new wl(cw(s.readString(),s.readAny()));class zi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new zi(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const wM=s=>new zi(s.readJSON());class ye{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ye(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ye(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,zM=5,UM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new bs(AM[s.readTypeRef()](s)),zc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new ge(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class ge extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ps(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===ge?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===ge&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw wn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ys)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):wn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const uw=(s,t)=>NM[t&Ic](s),NM=[()=>{wn()},vM,CM,SM,TM,wM,EM,jM,_M,bM,()=>{wn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){wn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hw="__ $YJS$ __";fw[hw]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fw[hw]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class uc extends sb{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),bn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(uc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(uc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Xs&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Xs&&(t.status===401||t.status===403)}};const dw=W.createContext(null);function GM(){const s=W.useContext(dw);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,b=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(b.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=30,JM=120,XM=1500,Wo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const br={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap("territoryCell")}function vi(s){return s.getMap("players")}function Ph(s,t){const i=vi(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,w]of[[0,-1],[0,1],[-1,0],[1,0]]){const b=m+v,E=y+w;if(b<0||b>=i||E<0||E>=r)continue;const T=`${b},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:b,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,w]=W.useState(new Map),[b,E]=W.useState({x:0,y:0}),[T,B]=W.useState(1),[R,O]=W.useState(!1),[k,$]=W.useState(!1),[z,I]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),F=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((bt,Dt)=>{bt>et&&(et=bt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=vi(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=fc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=fc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const bt=Wo*g;dt.forEach((Dt,ee)=>{if(Dt>=bt){const ze=vi(t).get(ee);ze?I(ze.name):ee===l&&I(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=vi(t),P=()=>{w(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((bt,Dt)=>{if(Dt!==i.clientID){bt.playerId&&P.add(bt.playerId);const ee=bt.user?.name;ee&&pt.add(ee)}}),B(bt=>{const Dt=pt.size;return bt===Dt?bt:Dt});const dt=vi(t);dt.forEach((bt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in br){dt.preventDefault();const bt=!F.current;et.add(dt.key),F.current=br[dt.key],bt&&H.current?.(br[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in br){let bt=!1;for(const Dt of et)if(Dt in br){F.current=br[Dt],bt=!0;break}bt||(F.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const bt=pt.getScreenCTM();if(!bt)return;const Dt=dt.matrixTransform(bt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,ze=nt.current,ln=ee-ze.x,Cn=$n-ze.y;if(ln===0&&Cn===0)return;const Yn=Math.abs(ln)>Math.abs(Cn)?{dx:ln>0?1:-1,dy:0}:{dx:0,dy:Cn>0?1:-1};F.current=Yn,H.current?.(Yn)},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?F.current={dx:pt>0?1:-1,dy:0}:F.current={dx:0,dy:dt>0?1:-1},q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null,F.current=null},[]),H=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const bt=pt.matrixTransform(dt.inverse()),Dt=bt.x/Yt-.5,ee=bt.y/Yt-.5,$n=nt.current,ze=Dt-$n.x,ln=ee-$n.y;ze===0&&ln===0||(Math.abs(ze)>Math.abs(ln)?H.current?.({dx:ze>0?1:-1,dy:0}):H.current?.({dx:0,dy:ln>0?1:-1}))},[]),J=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,bt=Date.now();if(dt.stunnedUntil&&btXt.x===Dt&&Xt.y===ee);if(ze){const[Xt,Qr]=ze,Ui=bt+XM;dt.stunnedUntil=Ui;const Fr=vi(t);Fr.set(Xt,{...Qr,stunnedUntil:Ui}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:Ui});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),vi(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=fc(t),Yn=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Yn})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Yn})})};H.current=et;const P=setInterval(()=>{const pt=F.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),O(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>O(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const Ut=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + `}),Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsx("button",{onClick:J,style:{background:"none",border:"none",color:Ft.accent,fontFamily:"inherit",fontSize:Ga,padding:"4px 0",cursor:"pointer"},children:"EXIT"}),Q.jsxs("div",{style:{display:"flex",gap:6,cursor:"pointer"},onClick:St,title:"Click to copy room name",children:[Q.jsx("span",{style:{color:Ft.accent},children:o}),Q.jsx("span",{style:{color:Ft.dim},children:"@"}),Q.jsx("span",{style:{color:R?Ft.accent:Ft.text,textDecoration:"underline",textUnderlineOffset:3},children:R?"COPIED":X})]}),Q.jsxs("div",{style:{color:Ft.accent,position:"relative",cursor:"pointer"},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),onClick:()=>$(et=>!et),children:[T," PLAYERS",k&&Q.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,padding:"3px 0"},children:[Q.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[Q.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:et.color,display:"inline-block"}}),et.name]}),Q.jsxs("span",{style:{color:Ft.accent},children:[pt,"%"]})]},et.id)})})]})]}),Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsxs("div",{children:[Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[xt,"%"]})," ",Q.jsx("span",{style:{color:Ft.dim},children:"TERRITORY"})]}),Q.jsxs("div",{style:{textAlign:"right"},children:[Q.jsxs("div",{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?"#FF3D71":Ft.dim},children:["WIN AT ",Math.round(Wo*100),"%"]}),ht&&Q.jsxs("div",{children:[Q.jsx("span",{style:{color:Ft.dim},children:ht.name})," ",Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[ht.pct,"%"]})]})]})]}),Q.jsxs("svg",{ref:M,viewBox:`0 0 ${lt} ${it}`,onTouchStart:at,onTouchMove:ft,onTouchEnd:_,onClick:Y,style:{width:"100%",maxWidth:lt,height:"auto",background:Ft.grid,border:`1px solid ${Ft.border}`,flex:"1 1 auto",minHeight:0,maxHeight:"calc(100dvh - 120px)",objectFit:"contain",userSelect:"none",WebkitUserSelect:"none"},children:[Ut,Array.from(m.entries()).map(([et,P])=>{const[pt,dt]=et.split(",").map(Number),bt=vt.get(P.owner)||Ft.accent;return Q.jsx("rect",{x:pt*Yt,y:dt*Yt,width:Yt,height:Yt,fill:bt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const R=`player-${Math.random().toString(36).slice(2,10)}`,O=i2(r);return{playerId:R,playerColor:s2(O)}}),[{doc:p,awareness:g}]=W.useState(()=>{const R=new $r,O=new LM(R);return O.setLocalState({user:{name:r,color:d},playerId:u}),{doc:R,awareness:O}}),[m,y]=W.useState(!0),[v,w]=W.useState(!1),[b,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const R=new VM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return R.on("synced",O=>{w(O),O&&y(!1)}),R.on("status",O=>{O==="connected"&&y(!1)}),R.on("error",O=>{E(O),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=R,R.connect(),()=>{R.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const O=setInterval(()=>{const k=new Set([u]);if(g.getStates().forEach(I=>{I.playerId&&k.add(I.playerId)}),[...k].sort()[0]!==u)return;const z=o.collections.rooms.toArray.find(I=>I.roomId===s);if(z)try{o.actions.addRoom({...z,expiresAt:Date.now()+ip*1e3})}catch{}},EO);return()=>clearInterval(O)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const B=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return b?Q.jsxs("div",{style:td.center,children:[Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Connection error: ",b.message]}),Q.jsx("button",{onClick:l,style:td.btn,children:"BACK"})]}):m?Q.jsxs("div",{style:td.center,children:[Q.jsx("style",{children:"@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');"}),Q.jsx("div",{style:{color:"#d0bcff",fontSize:8},children:"CONNECTING..."})]}):Q.jsx(dw.Provider,{value:B,children:Q.jsx(YM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const td={center:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:16,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},btn:{fontFamily:"inherit",fontSize:8,padding:"8px 24px",background:"#d0bcff",color:"#000",border:"none",cursor:"pointer"}},rv=["Swift","Bold","Sly","Keen","Cool","Neon","Rad","Zen"],av=["Fox","Wolf","Hawk","Bear","Lynx","Crow","Stag","Hare"];function a2(){const s=rv[Math.floor(Math.random()*rv.length)],t=av[Math.floor(Math.random()*av.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem("territory-player-name");if(s)return s;const t=a2();return localStorage.setItem("territory-player-name",t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=jd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem("territory-player-name",u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=""}}):Q.jsx(RO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(W1,{children:Q.jsx(AO,{children:Q.jsx(c2,{})})})}V1.createRoot(document.getElementById("root")).render(Q.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html new file mode 100644 index 0000000000..8922052c0b --- /dev/null +++ b/website/public/demos/territory-wars/index.html @@ -0,0 +1,23 @@ + + + + + + Territory Wars - Multiplayer with Durable Streams + + + + +
+ + From 3bf15c6f7c041cc24f3fc51d204646abbfcbc765 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 00:45:11 +0000 Subject: [PATCH 04/36] fix: use explicit index.html in territory wars iframe src VitePress dev server intercepts directory paths. Using the explicit filename bypasses VitePress routing and serves the static file. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 7f4455566a..671c209bea 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -98,7 +98,7 @@ Electric Cloud runs the same open protocol as a managed service. No proprietary To show what Yjs on Durable Streams can do beyond text editing, we built a multiplayer territory game. Players claim cells by moving over them — each cell is a Yjs CRDT entry, with last-writer-wins resolving contention when two players claim the same cell. Encircle an area to fill it. - + ## Next steps From b09a1ce992823a0c578bc0030a18335e53970c45 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 00:56:38 +0000 Subject: [PATCH 05/36] =?UTF-8?q?docs:=20update=20territory=20wars=20bundl?= =?UTF-8?q?e=20=E2=80=94=20remove=20board=20size=20selector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../{index-Czu7vo8C.js => index-DktWL1Q6.js} | 40 +++++++++---------- .../public/demos/territory-wars/index.html | 5 ++- 2 files changed, 23 insertions(+), 22 deletions(-) rename website/public/demos/territory-wars/assets/{index-Czu7vo8C.js => index-DktWL1Q6.js} (64%) diff --git a/website/public/demos/territory-wars/assets/index-Czu7vo8C.js b/website/public/demos/territory-wars/assets/index-DktWL1Q6.js similarity index 64% rename from website/public/demos/territory-wars/assets/index-Czu7vo8C.js rename to website/public/demos/territory-wars/assets/index-DktWL1Q6.js index 3452a1a2f3..b1602212da 100644 --- a/website/public/demos/territory-wars/assets/index-Czu7vo8C.js +++ b/website/public/demos/territory-wars/assets/index-DktWL1Q6.js @@ -1,42 +1,42 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var hh={exports:{}},qa={};var E0;function U1(){if(E0)return qa;E0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return qa.Fragment=t,qa.jsx=i,qa.jsxs=i,qa}var C0;function j1(){return C0||(C0=1,hh.exports=U1()),hh.exports}var Q=j1(),dh={exports:{}},Ka={},ph={exports:{}},gh={};var x0;function N1(){return x0||(x0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],J=H+1,lt=M[J];if(0>l(Y,Z))Jl(lt,Y)?(M[at]=lt,M[J]=Z,at=J):(M[at]=Y,M[H]=Z,at=H);else if(Jl(lt,Z))M[at]=lt,M[J]=Z,at=J;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,w=!1,b=!1,E=!1,T=!1,B=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function k(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function $(M){if(E=!1,k(M),!b)if(i(p)!==null)b=!0,z||(z=!0,st());else{var q=i(g);q!==null&&ht($,q.startTime-M)}}var z=!1,I=-1,X=5,tt=-1;function F(){return T?!0:!(s.unstable_now()-ttM&&F());){var at=y.callback;if(typeof at=="function"){y.callback=null,v=y.priorityLevel;var ft=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft=="function"){y.callback=ft,k(M),q=!0;break e}y===i(p)&&r(p),k(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht($,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,w=!1}q=void 0}}finally{q?st():z=!1}}}var st;if(typeof O=="function")st=function(){O(nt)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,Kt=xt.port2;xt.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){B(nt,0)};function ht(M,q){I=B(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(R(I),I=-1):E=!0,ht($,Z-at))):(M.sortIndex=ft,t(p,M),b||w||(b=!0,z||(z=!0,st()))),M},s.unstable_shouldYield=F,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var _0;function B1(){return _0||(_0=1,ph.exports=N1()),ph.exports}var yh={exports:{}},gt={};var T0;function L1(){if(T0)return gt;T0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function w(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function B(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||b}B.prototype.isReactComponent={},B.prototype.setState=function(_,H){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,H,"setState")},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=B.prototype;function O(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||b}var k=O.prototype=new R;k.constructor=O,E(k,B.prototype),k.isPureReactComponent=!0;var $=Array.isArray;function z(){}var I={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var J=Y.ref;return{$$typeof:s,type:_,key:H,ref:J!==void 0?J:null,props:Y}}function F(_,H){return tt(_.type,H,_.props)}function nt(_){return typeof _=="object"&&_!==null&&_.$$typeof===s}function st(_){var H={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Y){return H[Y]})}var xt=/\/+/g;function Kt(_,H){return typeof _=="object"&&_!==null&&_.key!=null?st(""+_.key):H.toString(36)}function ht(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(z,z):(_.status="pending",_.then(function(H){_.status==="pending"&&(_.status="fulfilled",_.value=H)},function(H){_.status==="pending"&&(_.status="rejected",_.reason=H)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,H,Y,J,lt){var it=typeof _;(it==="undefined"||it==="boolean")&&(_=null);var St=!1;if(_===null)St=!0;else switch(it){case"bigint":case"string":case"number":St=!0;break;case"object":switch(_.$$typeof){case s:case t:St=!0;break;case m:return St=_._init,M(St(_._payload),H,Y,J,lt)}}if(St)return lt=lt(_),St=J===""?"."+Kt(_,0):J,$(lt)?(Y="",St!=null&&(Y=St.replace(xt,"$&/")+"/"),M(lt,H,Y,"",function(et){return et})):lt!=null&&(nt(lt)&&(lt=F(lt,Y+(lt.key==null||_&&_.key===lt.key?"":(""+lt.key).replace(xt,"$&/")+"/")+St)),H.push(lt)),1;St=0;var Ut=J===""?".":J+":";if($(_))for(var vt=0;vt<_.length;vt++)J=_[vt],it=Ut+Kt(J,vt),St+=M(J,H,Y,it,lt);else if(vt=w(_),typeof vt=="function")for(_=vt.call(_),vt=0;!(J=_.next()).done;)J=J.value,it=Ut+Kt(J,vt++),St+=M(J,H,Y,it,lt);else if(it==="object"){if(typeof _.then=="function")return M(ht(_),H,Y,J,lt);throw H=String(_),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return St}function q(_,H,Y){if(_==null)return _;var J=[],lt=0;return M(_,J,"","",function(it){return H.call(Y,it,lt++)}),J}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ft={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!nt(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return gt.Activity=y,gt.Children=ft,gt.Component=B,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=O,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return I.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,H,Y){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var J=E({},_.props),lt=_.key;if(H!=null)for(it in H.key!==void 0&&(lt=""+H.key),H)!X.call(H,it)||it==="key"||it==="__self"||it==="__source"||it==="ref"&&H.ref===void 0||(J[it]=H[it]);var it=arguments.length-2;if(it===1)J.children=Y;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=I1(),mh.exports}var R0;function q1(){if(R0)return Ka;R0=1;var s=B1(),t=Ud(),i=H1();function r(e){var n="https://react.dev/errors/"+e;if(1ft||(e.current=at[ft],at[ft]=null,ft--)}function Y(e,n){ft++,at[ft]=e.current,e.current=n}var J=_(null),lt=_(null),it=_(null),St=_(null);function Ut(e,n){switch(Y(it,n),Y(lt,e),Y(J,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?$m(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=$m(n),e=Ym(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(J),Y(J,e)}function vt(){H(J),H(lt),H(it)}function et(e){e.memoizedState!==null&&Y(St,e);var n=J.current,a=Ym(n,e.type);n!==a&&(Y(lt,e),Y(J,a))}function P(e){lt.current===e&&(H(J),H(lt)),St.current===e&&(H(St),Ba._currentValue=Z)}var pt,dt;function bt(e){if(pt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);pt=n&&n[1]||"",dt=-1{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function U1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var fh={exports:{}},qa={};var E0;function z1(){if(E0)return qa;E0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return qa.Fragment=t,qa.jsx=i,qa.jsxs=i,qa}var C0;function j1(){return C0||(C0=1,fh.exports=z1()),fh.exports}var Q=j1(),hh={exports:{}},Ka={},dh={exports:{}},ph={};var x0;function N1(){return x0||(x0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[at];if(0>>1;at<_;){var L=2*(at+1)-1,Y=M[L],F=L+1,lt=M[F];if(0>l(Y,Z))Fl(lt,Y)?(M[at]=lt,M[F]=Z,at=F):(M[at]=Y,M[L]=Z,at=L);else if(Fl(lt,Z))M[at]=lt,M[F]=Z,at=F;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function I(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,H||(H=!0,st());else{var q=i(g);q!==null&&ht(I,q.startTime-M)}}var H=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at=="function"){y.callback=null,v=y.priorityLevel;var ft=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft=="function"){y.callback=ft,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(I,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?st():H=!1}}}var st;if(typeof A=="function")st=function(){A(nt)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,Kt=xt.port2;xt.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){N(nt,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(R(K),K=-1):E=!0,ht(I,Z-at))):(M.sortIndex=ft,t(p,M),w||b||(w=!0,H||(H=!0,st()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(ph)),ph}var _0;function B1(){return _0||(_0=1,dh.exports=N1()),dh.exports}var gh={exports:{}},gt={};var T0;function L1(){if(T0)return gt;T0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,L,"setState")},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=N.prototype;function A(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}var z=A.prototype=new R;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var I=Array.isArray;function H(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,L,Y){var F=Y.ref;return{$$typeof:s,type:_,key:L,ref:F!==void 0?F:null,props:Y}}function J(_,L){return tt(_.type,L,_.props)}function nt(_){return typeof _=="object"&&_!==null&&_.$$typeof===s}function st(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Y){return L[Y]})}var xt=/\/+/g;function Kt(_,L){return typeof _=="object"&&_!==null&&_.key!=null?st(""+_.key):L.toString(36)}function ht(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,L,Y,F,lt){var it=typeof _;(it==="undefined"||it==="boolean")&&(_=null);var St=!1;if(_===null)St=!0;else switch(it){case"bigint":case"string":case"number":St=!0;break;case"object":switch(_.$$typeof){case s:case t:St=!0;break;case m:return St=_._init,M(St(_._payload),L,Y,F,lt)}}if(St)return lt=lt(_),St=F===""?"."+Kt(_,0):F,I(lt)?(Y="",St!=null&&(Y=St.replace(xt,"$&/")+"/"),M(lt,L,Y,"",function(et){return et})):lt!=null&&(nt(lt)&&(lt=J(lt,Y+(lt.key==null||_&&_.key===lt.key?"":(""+lt.key).replace(xt,"$&/")+"/")+St)),L.push(lt)),1;St=0;var zt=F===""?".":F+":";if(I(_))for(var vt=0;vt<_.length;vt++)F=_[vt],it=zt+Kt(F,vt),St+=M(F,L,Y,it,lt);else if(vt=b(_),typeof vt=="function")for(_=vt.call(_),vt=0;!(F=_.next()).done;)F=F.value,it=zt+Kt(F,vt++),St+=M(F,L,Y,it,lt);else if(it==="object"){if(typeof _.then=="function")return M(ht(_),L,Y,F,lt);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return St}function q(_,L,Y){if(_==null)return _;var F=[],lt=0;return M(_,F,"","",function(it){return L.call(Y,it,lt++)}),F}function Z(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ft={map:q,forEach:function(_,L,Y){q(_,function(){L.apply(this,arguments)},Y)},count:function(_){var L=0;return q(_,function(){L++}),L},toArray:function(_){return q(_,function(L){return L})||[]},only:function(_){if(!nt(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return gt.Activity=y,gt.Children=ft,gt.Component=N,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=A,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,L,Y){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var F=E({},_.props),lt=_.key;if(L!=null)for(it in L.key!==void 0&&(lt=""+L.key),L)!X.call(L,it)||it==="key"||it==="__self"||it==="__source"||it==="ref"&&L.ref===void 0||(F[it]=L[it]);var it=arguments.length-2;if(it===1)F.children=Y;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),yh.exports=I1(),yh.exports}var R0;function q1(){if(R0)return Ka;R0=1;var s=B1(),t=zd(),i=H1();function r(e){var n="https://react.dev/errors/"+e;if(1ft||(e.current=at[ft],at[ft]=null,ft--)}function Y(e,n){ft++,at[ft]=e.current,e.current=n}var F=_(null),lt=_(null),it=_(null),St=_(null);function zt(e,n){switch(Y(it,n),Y(lt,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?$m(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=$m(n),e=Ym(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(F),Y(F,e)}function vt(){L(F),L(lt),L(it)}function et(e){e.memoizedState!==null&&Y(St,e);var n=F.current,a=Ym(n,e.type);n!==a&&(Y(lt,e),Y(F,a))}function P(e){lt.current===e&&(L(F),L(lt)),St.current===e&&(L(St),Ba._currentValue=Z)}var pt,dt;function wt(e){if(pt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);pt=n&&n[1]||"",dt=-1)":-1f||x[c]!==j[f]){var K=` -`+x[c].replace(" at new "," at ");return e.displayName&&K.includes("")&&(K=K.replace("",e.displayName)),K}while(1<=c&&0<=f);break}}}finally{Dt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?bt(a):""}function $n(e,n){switch(e.tag){case 26:case 27:case 5:return bt(e.type);case 16:return bt("Lazy");case 13:return e.child!==n&&n!==null?bt("Suspense Fallback"):bt("Suspense");case 19:return bt("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return bt("Activity");default:return""}}function ze(e){try{var n="",a=null;do n+=$n(e,a),a=e,e=e.return;while(e);return n}catch(c){return` +`+pt+e+dt}var Dt=!1;function ee(e,n){if(!e||Dt)return"";Dt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(n){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(B){var j=B}Reflect.construct(e,[],$)}else{try{$.call()}catch(B){j=B}e.call($.prototype)}}else{try{throw Error()}catch(B){j=B}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(B){if(B&&j&&typeof B.stack=="string")return[B.stack,j.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=c.DetermineComponentFrameRoot(),S=h[0],C=h[1];if(S&&C){var x=S.split(` +`),U=C.split(` +`);for(f=c=0;cf||x[c]!==U[f]){var V=` +`+x[c].replace(" at new "," at ");return e.displayName&&V.includes("")&&(V=V.replace("",e.displayName)),V}while(1<=c&&0<=f);break}}}finally{Dt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?wt(a):""}function $n(e,n){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==n&&n!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return wt("Activity");default:return""}}function Ue(e){try{var n="",a=null;do n+=$n(e,a),a=e,e=e.return;while(e);return n}catch(c){return` Error generating stack: `+c.message+` -`+c.stack}}var ln=Object.prototype.hasOwnProperty,Cn=s.unstable_scheduleCallback,Yn=s.unstable_cancelCallback,El=s.unstable_shouldYield,Cl=s.unstable_requestPaint,Xt=s.unstable_now,Qr=s.unstable_getCurrentPriorityLevel,Ui=s.unstable_ImmediatePriority,Fr=s.unstable_UserBlockingPriority,xl=s.unstable_NormalPriority,pw=s.unstable_LowPriority,_p=s.unstable_IdlePriority,gw=s.log,yw=s.unstable_setDisableYieldValue,Jr=null,Xe=null;function ws(e){if(typeof gw=="function"&&yw(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Jr,e)}catch{}}var Ze=Math.clz32?Math.clz32:vw,mw=Math.log,Sw=Math.LN2;function vw(e){return e>>>=0,e===0?32:31-(mw(e)/Sw|0)|0}var _l=256,Tl=262144,Al=4194304;function ti(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ol(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ti(c):(S&=C,S!==0?f=ti(S):a||(a=C&~e,a!==0&&(f=ti(a))))):(C=c&~h,C!==0?f=ti(C):S!==0?f=ti(S):a||(a=c&~e,a!==0&&(f=ti(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Xr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bw(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tp(){var e=Al;return Al<<=1,(Al&62914560)===0&&(Al=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Zr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ww(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,j=e.hiddenUpdates;for(a=S&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Aw=/[\n"\\]/g;function cn(e){return e.replace(Aw,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ru(e,n,a,c,f,h,S,C){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+on(n)):e.value!==""+on(n)&&(e.value=""+on(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+on(C):e.removeAttribute("name")}function Ip(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){iu(e);return}a=a!=null?""+on(a):"",n=n!=null?""+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),iu(e)}function au(e,n,a){n==="number"&&Ml(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fu=!1;if(Jn)try{var ea={};Object.defineProperty(ea,"passive",{get:function(){fu=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{fu=!1}var Cs=null,hu=null,zl=null;function Yp(){if(zl)return zl;var e,n=hu,a=n.length,c,f="value"in Cs?Cs.value:Cs.textContent,h=f.length;for(e=0;e=ia),Wp=" ",Pp=!1;function tg(e,n){switch(e){case"keyup":return eE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function sE(e,n){switch(e){case"compositionend":return eg(n);case"keypress":return n.which!==32?null:(Pp=!0,Wp);case"textInput":return e=n.data,e===Wp&&Pp?null:e;default:return null}}function iE(e,n){if(Gi)return e==="compositionend"||!mu&&tg(e,n)?(e=Yp(),zl=hu=Cs=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=cg(a)}}function fg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function hg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ml(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ml(e.document)}return n}function bu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var hE=Jn&&"documentMode"in document&&11>=document.documentMode,$i=null,wu=null,oa=null,Eu=!1;function dg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||$i==null||$i!==Ml(c)||(c=$i,"selectionStart"in c&&bu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),oa&&la(oa,c)||(oa=c,c=Ao(wu,"onSelect"),0>=S,f-=S,zn=1<<32-Ze(n)+f|a<mt?(Tt=ot,ot=null):Tt=ot.sibling;var zt=N(D,ot,U[mt],V);if(zt===null){ot===null&&(ot=Tt);break}e&&ot&&zt.alternate===null&&n(D,ot),A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt,ot=Tt}if(mt===U.length)return a(D,ot),Rt&&Zn(D,mt),ct;if(ot===null){for(;mtmt?(Tt=ot,ot=null):Tt=ot.sibling;var $s=N(D,ot,zt.value,V);if($s===null){ot===null&&(ot=Tt);break}e&&ot&&$s.alternate===null&&n(D,ot),A=h($s,A,mt),kt===null?ct=$s:kt.sibling=$s,kt=$s,ot=Tt}if(zt.done)return a(D,ot),Rt&&Zn(D,mt),ct;if(ot===null){for(;!zt.done;mt++,zt=U.next())zt=G(D,zt.value,V),zt!==null&&(A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt);return Rt&&Zn(D,mt),ct}for(ot=c(ot);!zt.done;mt++,zt=U.next())zt=L(ot,D,mt,zt.value,V),zt!==null&&(e&&zt.alternate!==null&&ot.delete(zt.key===null?mt:zt.key),A=h(zt,A,mt),kt===null?ct=zt:kt.sibling=zt,kt=zt);return e&&ot.forEach(function(k1){return n(D,k1)}),Rt&&Zn(D,mt),ct}function Ht(D,A,U,V){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:t:{for(var ct=U.key;A!==null;){if(A.key===ct){if(ct=U.type,ct===E){if(A.tag===7){a(D,A.sibling),V=f(A,U.props.children),V.return=D,D=V;break t}}else if(A.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===X&&fi(ct)===A.type){a(D,A.sibling),V=f(A,U.props),pa(V,U),V.return=D,D=V;break t}a(D,A);break}else n(D,A);A=A.sibling}U.type===E?(V=ai(U.props.children,D.mode,V,U.key),V.return=D,D=V):(V=Vl(U.type,U.key,U.props,null,D.mode,V),pa(V,U),V.return=D,D=V)}return S(D);case b:t:{for(ct=U.key;A!==null;){if(A.key===ct)if(A.tag===4&&A.stateNode.containerInfo===U.containerInfo&&A.stateNode.implementation===U.implementation){a(D,A.sibling),V=f(A,U.children||[]),V.return=D,D=V;break t}else{a(D,A);break}else n(D,A);A=A.sibling}V=Du(U,D.mode,V),V.return=D,D=V}return S(D);case X:return U=fi(U),Ht(D,A,U,V)}if(ht(U))return rt(D,A,U,V);if(st(U)){if(ct=st(U),typeof ct!="function")throw Error(r(150));return U=ct.call(U),ut(D,A,U,V)}if(typeof U.then=="function")return Ht(D,A,Xl(U),V);if(U.$$typeof===O)return Ht(D,A,Yl(D,U),V);Zl(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,A!==null&&A.tag===6?(a(D,A.sibling),V=f(A,U),V.return=D,D=V):(a(D,A),V=Ou(U,D.mode,V),V.return=D,D=V),S(D)):a(D,A)}return function(D,A,U,V){try{da=0;var ct=Ht(D,A,U,V);return nr=null,ct}catch(ot){if(ot===er||ot===Fl)throw ot;var kt=Pe(29,ot,null,D.mode);return kt.lanes=V,kt.return=D,kt}}}var di=Ng(!0),Bg=Ng(!1),Os=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ds(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Kl(e),bg(e,null,a),n}return ql(e,c,n,a),Kl(e)}function ga(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function ya(){if(Gu){var e=tr;if(e!==null)throw e}}function ma(e,n,a,c){Gu=!1;var f=e.updateQueue;Os=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,j=x.next;x.next=null,S===null?h=j:S.next=j,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=j:C.next=j,K.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,K=j=x=null,C=h;do{var N=C.lane&-536870913,L=N!==C.lane;if(L?(_t&N)===N:(c&N)===N){N!==0&&N===Pi&&(Gu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ut=C;N=n;var Ht=a;switch(ut.tag){case 1:if(rt=ut.payload,typeof rt=="function"){G=rt.call(Ht,G,N);break t}G=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ut.payload,N=typeof rt=="function"?rt.call(Ht,G,N):rt,N==null)break t;G=y({},G,N);break t;case 2:Os=!0}}N=C.callback,N!==null&&(e.flags|=64,L&&(e.flags|=8192),L=f.callbacks,L===null?f.callbacks=[N]:L.push(N))}else L={lane:N,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(j=K=L,x=G):K=K.next=L,S|=N;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;L=C,C=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}}while(!0);K===null&&(x=G),f.baseState=x,f.firstBaseUpdate=j,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),js|=S,e.lanes=S,e.memoizedState=G}}function Lg(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ig(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),j=M.S;if(j!==null&&j(C,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var K=wE(x,c);ba(e,n,K,rn(e))}else ba(e,n,c,rn(e))}catch(G){ba(e,n,{then:function(){},status:"rejected",reason:G},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function AE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=my(e).queue;yy(e,f,n,Z,a===null?AE:function(){return Sy(e),a(c)})}function my(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Sy(e){var n=my(e);n.next===null&&(n=e.alternate.memoizedState),ba(e,n.next.queue,{},rn())}function cf(){return Te(Ba)}function vy(){return se().memoizedState}function by(){return se().memoizedState}function OE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Ds(a);var c=Rs(n,e,a);c!==null&&(Ye(c,n,a),ga(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lo(e)?Ey(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),Cy(a,n,c)))}function wy(e,n,a){var c=rn();ba(e,n,a,c)}function ba(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lo(e))Ey(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return ql(e,n,f,0),qt===null&&Hl(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),Cy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function lo(e){var n=e.alternate;return e===yt||n!==null&&n===yt}function Ey(e,n){ir=to=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Cy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}var wa={readContext:Te,use:so,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};wa.useEffectEvent=Zt;var xy={readContext:Te,use:so,useCallback:function(e,n){return Ue().memoizedState=[e,n===void 0?null:n],e},useContext:Te,useEffect:ly,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ro(4194308,4,fy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ro(4194308,4,e,n)},useInsertionEffect:function(e,n){ro(4,2,e,n)},useMemo:function(e,n){var a=Ue();n=n===void 0?null:n;var c=e();if(pi){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=Ue();if(a!==void 0){var f=a(n);if(pi){ws(!0);try{a(n)}finally{ws(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var n=Ue();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=wy.bind(null,yt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=Ue();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=yy.bind(null,yt,e.queue,!0,!1),Ue().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=yt,f=Ue();if(Rt){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(_t&127)!==0||$g(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,ly(Qg.bind(null,c,h,e),[e]),c.flags|=2048,ar(9,{destroy:void 0},Yg.bind(null,c,h,a,n),null),a},useId:function(){var e=Ue(),n=qt.identifierPrefix;if(Rt){var a=Un,c=zn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n="_"+n+"R_"+a,a=eo++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is=="string"?S.createElement(f,{is:c.is}):S.createElement(f)}}h[xe]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Oe(h,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&ss(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&ss(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(e=it.current,Zi(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=_e,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[xe]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Vm(e.nodeValue,a)),e||Ts(n,!0)}else e=Oo(e).createTextNode(c),e[xe]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=Zi(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[xe]=n}else li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zi(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[xe]=n}else li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),ho(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return Pn(n.type),$t(n),null;case 19:if(H(ne),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ca(c,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Pl(e),h!==null){for(n.flags|=128,Ca(c,!1),e=h.updateQueue,n.updateQueue=e,ho(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)wg(a,e),a=a.sibling;return Y(ne,ne.current&1|2),Rt&&Zn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Xt()>So&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304)}else{if(!f)if(e=Pl(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,ho(n,e),Ca(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Rt)return $t(n),null}else 2*Xt()-c.renderingStartTime>So&&a!==536870912&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Xt(),e.sibling=null,a=ne.current,Y(ne,f?a&1|2:a&1),Rt&&Zn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&ho(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(ui),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Pn(le),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function UE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Pn(le),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return P(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ne),null;case 4:return vt(),null;case 10:return Pn(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(ui),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Pn(le),null;case 25:return null;default:return null}}function Fy(e,n){switch(Mu(n),n.tag){case 3:Pn(le),vt();break;case 26:case 27:case 5:P(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ne);break;case 10:Pn(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(ui);break;case 24:Pn(le)}}function xa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function zs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,j=C;try{j()}catch(K){Bt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Bt(n,n.return,K)}}function Jy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Ig(n,a)}catch(c){Bt(e,e.return,c)}}}function Xy(e,n,a){a.props=gi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function _a(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a=="function"?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function jn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Zy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break t;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;n1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Hs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Fn));else if(c!==4&&(c===27&&Hs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function po(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Hs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(po(e,n,a),e=e.sibling;e!==null;)po(e,n,a),e=e.sibling}function Py(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Oe(n,c,a),n[xe]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var is=!1,ue=!1,Of=!1,tm=typeof WeakSet=="function"?WeakSet:Set,Se=null;function jE(e,n){if(e=e.containerInfo,Jf=jo,e=hg(e),bu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,j=0,K=0,G=e,N=null;e:for(;;){for(var L;G!==a||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(L=G.firstChild)!==null;)N=G,G=L;for(;;){if(G===e)break e;if(N===a&&++j===f&&(C=S),N===h&&++K===c&&(x=S),(L=G.nextSibling)!==null)break;G=N,N=G.parentNode}G=L}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},jo=!1,Se=n;Se!==null;)if(n=Se,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Se=e;else for(;Se!==null;){switch(n=Se,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Oe(h,c,a),h[xe]=e,me(h),c=h;break t;case"link":var S=a0("link","href",f).get(c+(a.href||""));if(S){for(var C=0;CHt&&(S=Ht,Ht=ut,ut=S);var D=ug(C,ut),A=ug(C,Ht);if(D&&A&&(L.rangeCount!==1||L.anchorNode!==D.node||L.anchorOffset!==D.offset||L.focusNode!==A.node||L.focusOffset!==A.offset)){var U=G.createRange();U.setStart(D.node,D.offset),L.removeAllRanges(),ut>Ht?(L.addRange(U),L.extend(A.node,A.offset)):(U.setEnd(A.node,A.offset),L.addRange(U))}}}}for(G=[],L=C;L=L.parentNode;)L.nodeType===1&&G.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;Ca?32:a,M.T=null,a=jf,jf=null;var h=Bs,S=cs;if(de=0,fr=Bs=null,cs=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,fm(h.current),om(h,h.current,S,a),jt=C,Ma(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Jr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function Mm(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=Rs(e,n,2),e!==null&&(Zr(e,2),Nn(e))}function Bt(e,n,a){if(e.tag===3)Mm(e,e,a);else for(;n!==null;){if(n.tag===3){Mm(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ns===null||!Ns.has(c))){e=fn(a,e),a=ky(2),c=Rs(n,a,2),c!==null&&(zy(a,c,n,e),Zr(c,2),Nn(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new LE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=VE.bind(null,e,n,a),n.then(e,e))}function VE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(_t&a)===a&&(Wt===4||Wt===3&&(_t&62914560)===_t&&300>Xt()-mo?(jt&2)===0&&hr(e,0):kf|=a,ur===_t&&(ur=0)),Nn(e)}function km(e,n){n===0&&(n=Tp()),e=ri(e,n),e!==null&&(Zr(e,n),Nn(e))}function GE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),km(e,a)}function $E(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),km(e,a)}function YE(e,n){return Cn(e,n)}var xo=null,pr=null,Hf=!1,_o=!1,qf=!1,Is=0;function Nn(e){e!==pr&&e.next===null&&(pr===null?xo=pr=e:pr=pr.next=e),_o=!0,Hf||(Hf=!0,FE())}function Ma(e,n){if(!qf&&_o){qf=!0;do for(var a=!1,c=xo;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Nm(c,h))}else h=_t,h=Ol(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Xr(c,h)||(a=!0,Nm(c,h));c=c.next}while(a);qf=!1}}function QE(){zm()}function zm(){_o=Hf=!1;var e=0;Is!==0&&i1()&&(e=Is);for(var n=Xt(),a=null,c=xo;c!==null;){var f=c.next,h=Um(c,n);h===0?(c.next=null,a===null?xo=f:a.next=f,f===null&&(pr=a)):(a=c,(e!==0||(h&3)!==0)&&(_o=!0)),c=f}de!==0&&de!==5||Ma(e),Is!==0&&(Is=0)}function Um(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,G=x.initiatorType;K&&Gm(G)&&(x=x.responseEnd,S+=K*(x"u"?null:document;function n0(e,n,a){var c=gr;if(c&&typeof n=="string"&&n){var f=cn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),e0.has(f)||(e0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement("link"),Oe(n,"link",e),me(n),c.head.appendChild(n)))}}function d1(e){us.D(e),n0("dns-prefetch",e,null)}function p1(e,n){us.C(e,n),n0("preconnect",e,n)}function g1(e,n,a){us.L(e,n,a);var c=gr;if(c&&e&&n){var f='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+cn(a.imageSizes)+'"]')):f+='[href="'+cn(e)+'"]';var h=f;switch(n){case"style":h=yr(e);break;case"script":h=mr(e)}mn.has(h)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n==="style"&&c.querySelector(ja(h))||n==="script"&&c.querySelector(Na(h))||(n=c.createElement("link"),Oe(n,"link",e),me(n),c.head.appendChild(n)))}}function y1(e,n){us.m(e,n);var a=gr;if(a&&e){var c=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+cn(c)+'"][href="'+cn(e)+'"]',h=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=mr(e)}if(!mn.has(h)&&(e=y({rel:"modulepreload",href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Na(h)))return}c=a.createElement("link"),Oe(c,"link",e),me(c),a.head.appendChild(c)}}}function m1(e,n,a){us.S(e,n,a);var c=gr;if(c&&e){var f=Li(c).hoistableStyles,h=yr(e);n=n||"default";var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(ja(h)))C.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement("link");me(x),Oe(x,"link",e),x._p=new Promise(function(j,K){x.onload=j,x.onerror=K}),x.addEventListener("load",function(){C.loading|=1}),x.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Ro(S,n,c)}S={type:"stylesheet",instance:S,count:1,state:C},f.set(h,S)}}}function S1(e,n){us.X(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement("script"),me(h),Oe(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function v1(e,n){us.M(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=mn.get(f))&&ih(e,n),h=a.createElement("script"),me(h),Oe(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function s0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=yr(a.href),a=Li(f).hoistableStyles,c=a.get(n),c||(c={type:"style",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yr(a.href);var h=Li(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(ja(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,""));return S}if(n&&c!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=mr(a),a=Li(f).hoistableScripts,c=a.get(n),c||(c={type:"script",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yr(e){return'href="'+cn(e)+'"'}function ja(e){return'link[rel="stylesheet"]['+e+"]"}function i0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?c.loading=1:(n=e.createElement("link"),c.preload=n,n.addEventListener("load",function(){return c.loading|=1}),n.addEventListener("error",function(){return c.loading|=2}),Oe(n,"link",a),me(n),e.head.appendChild(n))}function mr(e){return'[src="'+cn(e)+'"]'}function Na(e){return"script[async]"+e}function r0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var c=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(c)return n.instance=c,me(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),me(c),Oe(c,"style",f),Ro(c,a.precedence,e),n.instance=c;case"stylesheet":f=yr(a.href);var h=e.querySelector(ja(f));if(h)return n.state.loading|=4,n.instance=h,me(h),h;c=i0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement("link"),me(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Oe(h,"link",c),n.state.loading|=4,Ro(h,a.precedence,e),n.instance=h;case"script":return h=mr(a.src),(f=e.querySelector(Na(h)))?(n.instance=f,me(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement("script"),me(f),Oe(f,"link",c),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Ro(c,a.precedence,e));return n.instance}function Ro(e,n,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,h=f,S=0;S title"):null)}function w1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function o0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function E1(e,n,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=yr(c.href),h=n.querySelector(ja(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ko.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,me(h);return}h=n.ownerDocument||n,c=i0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement("link"),me(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Oe(h,"link",c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ko.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var rh=0;function C1(e,n){return e.stylesheets&&e.count===0&&Uo(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function Uo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(x1,e),zo=null,ko.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=zo.get(e);if(a)var c=a.get(null);else{a=new Map,zo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=q1(),dh.exports}var V1=K1(),W=Ud();const G1="https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t",$1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0",Y1="https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw",Q1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY",lv=W.createContext(null);function jd(){const s=W.useContext(lv);if(!s)throw new Error("useServerEndpoint must be used within ServerEndpointProvider");return s}function F1(){return G1}function J1(){return Y1}function X1(){return{Authorization:`Bearer ${$1}`}}function Z1(){return{Authorization:`Bearer ${Q1}`}}function W1({children:s}){const t=F1(),i=J1(),r=W.useMemo(()=>X1(),[]),l=W.useMemo(()=>Z1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(lv.Provider,{value:o,children:s})}var Ko={exports:{}},Sh,k0;function P1(){if(k0)return Sh;k0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function tC(){if(z0)return Ko.exports;z0=1;var s=P1();function t(o,u,d){if(typeof o=="function"&&(d=u,u=o,o=null),!(d>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var p=s(r),g=null,m=null,y=0,v=null,w={push:k,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(F){if(!(F>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(d=F,!w.paused)for(;g&&y=d||w.paused?m?(m.next=st,m=st):(g=st,m=st,w.saturated()):(y++,u.call(o,st.value,st.worked))}function $(F,nt){var st=p.get();st.context=o,st.release=z,st.value=F,st.callback=nt||i,st.errorHandler=v,y>=d||w.paused?g?(st.next=g,g=st):(g=st,m=st,w.saturated()):(y++,u.call(o,st.value,st.worked))}function z(F){F&&p.release(F);var nt=g;nt&&y<=d?w.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&w.empty()):--y===0&&w.drain()}function I(){g=null,m=null,w.drain=i}function X(){g=null,m=null,w.drain(),w.drain=i}function tt(F){v=F}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o=="function"&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(B){T(null,B)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=w,g.drained=b,g;function v(E){var T=new Promise(function(B,R){m(E,function(O,k){if(O){R(O);return}B(k)})});return T.catch(i),T}function w(E){var T=new Promise(function(B,R){y(E,function(O,k){if(O){R(O);return}B(k)})});return T.catch(i),T}function b(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var B=g.drain;g.drain=function(){typeof B=="function"&&B(),T(),g.drain=B}}})});return E}}return Ko.exports=t,Ko.exports.promise=l,Ko.exports}var eC=tC();const ov=z1(eC),On="Stream-Next-Offset",Uc="Stream-Cursor",jc="Stream-Up-To-Date",In="Stream-Closed",vh="Stream-Seq",nC="Stream-TTL",sC="Stream-Expires-At",U0="Producer-Id",Vo="Producer-Epoch",j0="Producer-Seq",iC="Producer-Expected-Seq",rC="Producer-Received-Seq",bh="offset",Go="live",aC="stream-sse-data-encoding";var Xs=class cv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name="FetchError",this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(d&&d.includes("application/json"))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new cv(r,o,u,l,i)}},Nd=class extends Error{constructor(){super("Fetch with backoff aborted"),this.name="FetchBackoffAbortError"}},te=class ed extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name="DurableStreamError",this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(o&&o.includes("application/json"))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=N0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new ed(d,u,r,l)}static fromFetchError(t){const i=N0(t.status);return new ed(t.message,i,t.status,t.json??t.text)}};function N0(s){switch(s){case 400:return"BAD_REQUEST";case 401:return"UNAUTHORIZED";case 403:return"FORBIDDEN";case 404:return"NOT_FOUND";case 409:return"CONFLICT_SEQ";case 429:return"RATE_LIMITED";case 503:return"BUSY";default:return"UNKNOWN"}}var lC=class extends Error{constructor(){super("Invalid stream options: missing required url parameter"),this.name="MissingStreamUrlError"}},uv=class extends te{code="STREAM_CLOSED";status=409;streamClosed=!0;finalOffset;constructor(s,t){super("Cannot append to closed stream","STREAM_CLOSED",409,s),this.name="StreamClosedError",this.finalOffset=t}},oC=class extends Error{constructor(){super("Invalid signal option. It must be an instance of AbortSignal."),this.name="InvalidSignalError"}};const cC=[429,503],Bd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function uC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function fv(s,t=Bd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const w=await s(...p);if(w.ok)return w;throw await Xs.fromResponse(w,g.toString())}catch(w){if(u?.(),m?.signal?.aborted)throw new Nd;if(w instanceof Xs&&!cC.includes(w.status)&&w.status>=400&&w.status<500)throw w;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),w;const b=w instanceof Xs?uC(w.headers["retry-after"]):0,E=Math.random()*y,T=Math.min(E,r),B=Math.max(b,T);if(o){const R=b>0?"server+client":"client";console.log(`Retry attempt #${v} after ${B}ms (${R}, serverMin=${b}ms, clientBackoff=${T}ms)`)}await new Promise(R=>setTimeout(R,B)),y=Math.min(y*l,r)}}}}const fC=[201,204,205];function hC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||fC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Nd:new Xs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l=="string"?l:"failed to read body")}}}function dC(s){return typeof Symbol<"u"&&typeof Symbol.asyncIterator=="symbol"&&typeof s[Symbol.asyncIterator]=="function"}function pC(s){if(typeof Symbol>"u"||typeof Symbol.asyncIterator!="symbol"||typeof s[Symbol.asyncIterator]=="function")return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,"values",{configurable:!0,writable:!0,value:t})}catch{}}function wh(s){return dC(s)||pC(s),s}async function*B0(s,t){const i=s.getReader(),r=new TextDecoder;let l="",o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`+c.stack}}var ln=Object.prototype.hasOwnProperty,Cn=s.unstable_scheduleCallback,Ui=s.unstable_cancelCallback,El=s.unstable_shouldYield,Cl=s.unstable_requestPaint,Xt=s.unstable_now,Qr=s.unstable_getCurrentPriorityLevel,zi=s.unstable_ImmediatePriority,Fr=s.unstable_UserBlockingPriority,xl=s.unstable_NormalPriority,pb=s.unstable_LowPriority,_p=s.unstable_IdlePriority,gb=s.log,yb=s.unstable_setDisableYieldValue,Jr=null,Xe=null;function ws(e){if(typeof gb=="function"&&yb(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Jr,e)}catch{}}var Ze=Math.clz32?Math.clz32:vb,mb=Math.log,Sb=Math.LN2;function vb(e){return e>>>=0,e===0?32:31-(mb(e)/Sb|0)|0}var _l=256,Tl=262144,Al=4194304;function Ps(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ol(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=Ps(c):(S&=C,S!==0?f=Ps(S):a||(a=C&~e,a!==0&&(f=Ps(a))))):(C=c&~h,C!==0?f=Ps(C):S!==0?f=Ps(S):a||(a=c&~e,a!==0&&(f=Ps(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Xr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function wb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tp(){var e=Al;return Al<<=1,(Al&62914560)===0&&(Al=4194304),e}function Wc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Zr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ab=/[\n"\\]/g;function cn(e){return e.replace(Ab,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function iu(e,n,a,c,f,h,S,C){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+on(n)):e.value!==""+on(n)&&(e.value=""+on(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?ru(e,S,on(n)):a!=null?ru(e,S,on(a)):c!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+on(C):e.removeAttribute("name")}function Ip(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){su(e);return}a=a!=null?""+on(a):"",n=n!=null?""+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),su(e)}function ru(e,n,a){n==="number"&&Ml(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(Fn)try{var ea={};Object.defineProperty(ea,"passive",{get:function(){uu=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{uu=!1}var Es=null,fu=null,Ul=null;function Yp(){if(Ul)return Ul;var e,n=fu,a=n.length,c,f="value"in Es?Es.value:Es.textContent,h=f.length;for(e=0;e=ia),Wp=" ",Pp=!1;function tg(e,n){switch(e){case"keyup":return eE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function sE(e,n){switch(e){case"compositionend":return eg(n);case"keypress":return n.which!==32?null:(Pp=!0,Wp);case"textInput":return e=n.data,e===Wp&&Pp?null:e;default:return null}}function iE(e,n){if(Gi)return e==="compositionend"||!yu&&tg(e,n)?(e=Yp(),Ul=fu=Es=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=cg(a)}}function fg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function hg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ml(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ml(e.document)}return n}function vu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var hE=Fn&&"documentMode"in document&&11>=document.documentMode,$i=null,wu=null,oa=null,bu=!1;function dg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bu||$i==null||$i!==Ml(c)||(c=$i,"selectionStart"in c&&vu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),oa&&la(oa,c)||(oa=c,c=Ao(wu,"onSelect"),0>=S,f-=S,Un=1<<32-Ze(n)+f|a<mt?(Tt=ot,ot=null):Tt=ot.sibling;var Ut=j(D,ot,k[mt],G);if(Ut===null){ot===null&&(ot=Tt);break}e&&ot&&Ut.alternate===null&&n(D,ot),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,ot=Tt}if(mt===k.length)return a(D,ot),Rt&&Xn(D,mt),ct;if(ot===null){for(;mtmt?(Tt=ot,ot=null):Tt=ot.sibling;var Gs=j(D,ot,Ut.value,G);if(Gs===null){ot===null&&(ot=Tt);break}e&&ot&&Gs.alternate===null&&n(D,ot),O=h(Gs,O,mt),kt===null?ct=Gs:kt.sibling=Gs,kt=Gs,ot=Tt}if(Ut.done)return a(D,ot),Rt&&Xn(D,mt),ct;if(ot===null){for(;!Ut.done;mt++,Ut=k.next())Ut=$(D,Ut.value,G),Ut!==null&&(O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Rt&&Xn(D,mt),ct}for(ot=c(ot);!Ut.done;mt++,Ut=k.next())Ut=B(ot,D,mt,Ut.value,G),Ut!==null&&(e&&Ut.alternate!==null&&ot.delete(Ut.key===null?mt:Ut.key),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&&ot.forEach(function(k1){return n(D,k1)}),Rt&&Xn(D,mt),ct}function Ht(D,O,k,G){if(typeof k=="object"&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(D,O.sibling),G=f(O,k.props.children),G.return=D,D=G;break t}}else if(O.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===X&&ui(ct)===O.type){a(D,O.sibling),G=f(O,k.props),pa(G,k),G.return=D,D=G;break t}a(D,O);break}else n(D,O);O=O.sibling}k.type===E?(G=ri(k.props.children,D.mode,G,k.key),G.return=D,D=G):(G=Vl(k.type,k.key,k.props,null,D.mode,G),pa(G,k),G.return=D,D=G)}return S(D);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(D,O.sibling),G=f(O,k.children||[]),G.return=D,D=G;break t}else{a(D,O);break}else n(D,O);O=O.sibling}G=Ou(k,D.mode,G),G.return=D,D=G}return S(D);case X:return k=ui(k),Ht(D,O,k,G)}if(ht(k))return rt(D,O,k,G);if(st(k)){if(ct=st(k),typeof ct!="function")throw Error(r(150));return k=ct.call(k),ut(D,O,k,G)}if(typeof k.then=="function")return Ht(D,O,Xl(k),G);if(k.$$typeof===A)return Ht(D,O,Yl(D,k),G);Zl(D,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,O!==null&&O.tag===6?(a(D,O.sibling),G=f(O,k),G.return=D,D=G):(a(D,O),G=Au(k,D.mode,G),G.return=D,D=G),S(D)):a(D,O)}return function(D,O,k,G){try{da=0;var ct=Ht(D,O,k,G);return nr=null,ct}catch(ot){if(ot===er||ot===Fl)throw ot;var kt=Pe(29,ot,null,D.mode);return kt.lanes=G,kt.return=D,kt}}}var hi=Ng(!0),Bg=Ng(!1),As=!1;function Hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Os(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ds(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Kl(e),wg(e,null,a),n}return ql(e,c,n,a),Kl(e)}function ga(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}function Ku(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Vu=!1;function ya(){if(Vu){var e=tr;if(e!==null)throw e}}function ma(e,n,a,c){Vu=!1;var f=e.updateQueue;As=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(_t&j)===j:(c&j)===j){j!==0&&j===Pi&&(Vu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ut=C;j=n;var Ht=a;switch(ut.tag){case 1:if(rt=ut.payload,typeof rt=="function"){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ut.payload,j=typeof rt=="function"?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:As=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),zs|=S,e.lanes=S,e.memoizedState=$}}function Lg(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ig(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,cf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var V=bE(x,c);wa(e,n,V,rn(e))}else wa(e,n,c,rn(e))}catch($){wa(e,n,{then:function(){},status:"rejected",reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function AE(){}function lf(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=my(e).queue;yy(e,f,n,Z,a===null?AE:function(){return Sy(e),a(c)})}function my(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Sy(e){var n=my(e);n.next===null&&(n=e.alternate.memoizedState),wa(e,n.next.queue,{},rn())}function of(){return _e(Ba)}function vy(){return se().memoizedState}function wy(){return se().memoizedState}function OE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Os(a);var c=Ds(n,e,a);c!==null&&(Ye(c,n,a),ga(c,n,a)),n={cache:Nu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lo(e)?Ey(n,a):(a=_u(e,n,a,c),a!==null&&(Ye(a,e,c),Cy(a,n,c)))}function by(e,n,a){var c=rn();wa(e,n,a,c)}function wa(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lo(e))Ey(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return ql(e,n,f,0),qt===null&&Hl(),!1}catch{}if(a=_u(e,n,f,c),a!==null)return Ye(a,e,c),Cy(a,n,c),!0}return!1}function cf(e,n,a,c){if(c={lane:2,revertLane:qf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lo(e)){if(n)throw Error(r(479))}else n=_u(e,a,c,2),n!==null&&Ye(n,e,2)}function lo(e){var n=e.alternate;return e===yt||n!==null&&n===yt}function Ey(e,n){ir=to=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Cy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}var ba={readContext:_e,use:so,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};ba.useEffectEvent=Zt;var xy={readContext:_e,use:so,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:_e,useEffect:ly,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ro(4194308,4,fy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ro(4194308,4,e,n)},useInsertionEffect:function(e,n){ro(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(di){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(di){ws(!0);try{a(n)}finally{ws(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=ef(e);var n=e.queue,a=by.bind(null,yt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:rf,useDeferredValue:function(e,n){var a=ze();return af(a,e,n)},useTransition:function(){var e=ef(!1);return e=yy.bind(null,yt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=yt,f=ze();if(Rt){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(_t&127)!==0||$g(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,ly(Qg.bind(null,c,h,e),[e]),c.flags|=2048,ar(9,{destroy:void 0},Yg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Rt){var a=zn,c=Un;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n="_"+n+"R_"+a,a=eo++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is=="string"?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ce]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Ae(h,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&ns(n)}}return $t(n),Cf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&ns(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(e=it.current,Zi(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=xe,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ce]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Vm(e.nodeValue,a)),e||_s(n,!0)}else e=Oo(e).createTextNode(c),e[Ce]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=Zi(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ce]=n}else ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zi(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ce]=n}else ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),ho(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&$f(n.stateNode.containerInfo),$t(n),null;case 10:return Wn(n.type),$t(n),null;case 19:if(L(ne),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ca(c,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Pl(e),h!==null){for(n.flags|=128,Ca(c,!1),e=h.updateQueue,n.updateQueue=e,ho(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)bg(a,e),a=a.sibling;return Y(ne,ne.current&1|2),Rt&&Xn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Xt()>So&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304)}else{if(!f)if(e=Pl(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,ho(n,e),Ca(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Rt)return $t(n),null}else 2*Xt()-c.renderingStartTime>So&&a!==536870912&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Xt(),e.sibling=null,a=ne.current,Y(ne,f?a&1|2:a&1),Rt&&Xn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),$u(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&ho(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&L(ci),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Wn(ae),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function zE(e,n){switch(Ru(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Wn(ae),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return P(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return L(ne),null;case 4:return vt(),null;case 10:return Wn(n.type),null;case 22:case 23:return en(n),$u(),e!==null&&L(ci),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Wn(ae),null;case 25:return null;default:return null}}function Fy(e,n){switch(Ru(n),n.tag){case 3:Wn(ae),vt();break;case 26:case 27:case 5:P(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:L(ne);break;case 10:Wn(n.type);break;case 22:case 23:en(n),$u(),e!==null&&L(ci);break;case 24:Wn(ae)}}function xa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function ks(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Jy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Ig(n,a)}catch(c){Bt(e,e.return,c)}}}function Xy(e,n,a){a.props=pi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function _a(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a=="function"?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function jn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Zy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break t;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function xf(e,n,a){try{var c=e.stateNode;n1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Is(e.type)||e.tag===4}function _f(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Is(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tf(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Qn));else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Tf(e,n,a),e=e.sibling;e!==null;)Tf(e,n,a),e=e.sibling}function po(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(po(e,n,a),e=e.sibling;e!==null;)po(e,n,a),e=e.sibling}function Py(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ae(n,c,a),n[Ce]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var ss=!1,ce=!1,Af=!1,tm=typeof WeakSet=="function"?WeakSet:Set,me=null;function jE(e,n){if(e=e.containerInfo,Ff=jo,e=hg(e),vu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Jf={focusedElem:e,selectionRange:a},jo=!1,me=n;me!==null;)if(n=me,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,me=e;else for(;me!==null;){switch(n=me,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Ae(h,c,a),h[Ce]=e,ye(h),c=h;break t;case"link":var S=a0("link","href",f).get(c+(a.href||""));if(S){for(var C=0;CHt&&(S=Ht,Ht=ut,ut=S);var D=ug(C,ut),O=ug(C,Ht);if(D&&O&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(D.node,D.offset),B.removeAllRanges(),ut>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}jo=!!Ff,Jf=Ff=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,he=2}}function Am(){if(he===2){he=0;var e=Ns,n=fr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{em(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}he=3}}function Om(){if(he===4||he===3){he=0,Cl();var e=Ns,n=fr,a=os,c=pm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?he=5:(he=0,fr=Ns=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(js=null),tu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Jr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=zf,zf=null;var h=Ns,S=os;if(he=0,fr=Ns=null,os=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,fm(h.current),om(h,h.current,S,a),jt=C,Ma(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Jr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function Mm(e,n,a){n=fn(a,n),n=df(e.stateNode,n,2),e=Ds(e,n,2),e!==null&&(Zr(e,2),Nn(e))}function Bt(e,n,a){if(e.tag===3)Mm(e,e,a);else for(;n!==null;){if(n.tag===3){Mm(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(js===null||!js.has(c))){e=fn(a,e),a=ky(2),c=Ds(n,a,2),c!==null&&(Uy(a,c,n,e),Zr(c,2),Nn(c));break}}n=n.return}}function Lf(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new LE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Rf=!0,f.add(a),e=VE.bind(null,e,n,a),n.then(e,e))}function VE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(_t&a)===a&&(Wt===4||Wt===3&&(_t&62914560)===_t&&300>Xt()-mo?(jt&2)===0&&hr(e,0):Mf|=a,ur===_t&&(ur=0)),Nn(e)}function km(e,n){n===0&&(n=Tp()),e=ii(e,n),e!==null&&(Zr(e,n),Nn(e))}function GE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),km(e,a)}function $E(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),km(e,a)}function YE(e,n){return Cn(e,n)}var xo=null,pr=null,If=!1,_o=!1,Hf=!1,Ls=0;function Nn(e){e!==pr&&e.next===null&&(pr===null?xo=pr=e:pr=pr.next=e),_o=!0,If||(If=!0,FE())}function Ma(e,n){if(!Hf&&_o){Hf=!0;do for(var a=!1,c=xo;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Nm(c,h))}else h=_t,h=Ol(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Xr(c,h)||(a=!0,Nm(c,h));c=c.next}while(a);Hf=!1}}function QE(){Um()}function Um(){_o=If=!1;var e=0;Ls!==0&&i1()&&(e=Ls);for(var n=Xt(),a=null,c=xo;c!==null;){var f=c.next,h=zm(c,n);h===0?(c.next=null,a===null?xo=f:a.next=f,f===null&&(pr=a)):(a=c,(e!==0||(h&3)!==0)&&(_o=!0)),c=f}he!==0&&he!==5||Ma(e),Ls!==0&&(Ls=0)}function zm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&Gm($)&&(x=x.responseEnd,S+=V*(x"u"?null:document;function n0(e,n,a){var c=gr;if(c&&typeof n=="string"&&n){var f=cn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),e0.has(f)||(e0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement("link"),Ae(n,"link",e),ye(n),c.head.appendChild(n)))}}function d1(e){cs.D(e),n0("dns-prefetch",e,null)}function p1(e,n){cs.C(e,n),n0("preconnect",e,n)}function g1(e,n,a){cs.L(e,n,a);var c=gr;if(c&&e&&n){var f='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+cn(a.imageSizes)+'"]')):f+='[href="'+cn(e)+'"]';var h=f;switch(n){case"style":h=yr(e);break;case"script":h=mr(e)}mn.has(h)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n==="style"&&c.querySelector(ja(h))||n==="script"&&c.querySelector(Na(h))||(n=c.createElement("link"),Ae(n,"link",e),ye(n),c.head.appendChild(n)))}}function y1(e,n){cs.m(e,n);var a=gr;if(a&&e){var c=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+cn(c)+'"][href="'+cn(e)+'"]',h=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=mr(e)}if(!mn.has(h)&&(e=y({rel:"modulepreload",href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Na(h)))return}c=a.createElement("link"),Ae(c,"link",e),ye(c),a.head.appendChild(c)}}}function m1(e,n,a){cs.S(e,n,a);var c=gr;if(c&&e){var f=Li(c).hoistableStyles,h=yr(e);n=n||"default";var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(ja(h)))C.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=mn.get(h))&&nh(e,a);var x=S=c.createElement("link");ye(x),Ae(x,"link",e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener("load",function(){C.loading|=1}),x.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Ro(S,n,c)}S={type:"stylesheet",instance:S,count:1,state:C},f.set(h,S)}}}function S1(e,n){cs.X(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&sh(e,n),h=a.createElement("script"),ye(h),Ae(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function v1(e,n){cs.M(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=mn.get(f))&&sh(e,n),h=a.createElement("script"),ye(h),Ae(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function s0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=yr(a.href),a=Li(f).hoistableStyles,c=a.get(n),c||(c={type:"style",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yr(a.href);var h=Li(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(ja(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||w1(f,e,a,S.state))),n&&c===null)throw Error(r(528,""));return S}if(n&&c!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=mr(a),a=Li(f).hoistableScripts,c=a.get(n),c||(c={type:"script",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yr(e){return'href="'+cn(e)+'"'}function ja(e){return'link[rel="stylesheet"]['+e+"]"}function i0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function w1(e,n,a,c){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?c.loading=1:(n=e.createElement("link"),c.preload=n,n.addEventListener("load",function(){return c.loading|=1}),n.addEventListener("error",function(){return c.loading|=2}),Ae(n,"link",a),ye(n),e.head.appendChild(n))}function mr(e){return'[src="'+cn(e)+'"]'}function Na(e){return"script[async]"+e}function r0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var c=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(c)return n.instance=c,ye(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),ye(c),Ae(c,"style",f),Ro(c,a.precedence,e),n.instance=c;case"stylesheet":f=yr(a.href);var h=e.querySelector(ja(f));if(h)return n.state.loading|=4,n.instance=h,ye(h),h;c=i0(a),(f=mn.get(f))&&nh(c,f),h=(e.ownerDocument||e).createElement("link"),ye(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Ae(h,"link",c),n.state.loading|=4,Ro(h,a.precedence,e),n.instance=h;case"script":return h=mr(a.src),(f=e.querySelector(Na(h)))?(n.instance=f,ye(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),sh(c,f)),e=e.ownerDocument||e,f=e.createElement("script"),ye(f),Ae(f,"link",c),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Ro(c,a.precedence,e));return n.instance}function Ro(e,n,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,h=f,S=0;S title"):null)}function b1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function o0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function E1(e,n,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=yr(c.href),h=n.querySelector(ja(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ko.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ye(h);return}h=n.ownerDocument||n,c=i0(c),(f=mn.get(f))&&nh(c,f),h=h.createElement("link"),ye(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Ae(h,"link",c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ko.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var ih=0;function C1(e,n){return e.stylesheets&&e.count===0&&zo(e,e.stylesheets),0ih?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Uo=null;function zo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Uo=new Map,n.forEach(x1,e),Uo=null,ko.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=Uo.get(e);if(a)var c=a.get(null);else{a=new Map,Uo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),hh.exports=q1(),hh.exports}var V1=K1(),W=zd();const G1="https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t",$1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0",Y1="https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw",Q1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY",lv=W.createContext(null);function jd(){const s=W.useContext(lv);if(!s)throw new Error("useServerEndpoint must be used within ServerEndpointProvider");return s}function F1(){return G1}function J1(){return Y1}function X1(){return{Authorization:`Bearer ${$1}`}}function Z1(){return{Authorization:`Bearer ${Q1}`}}function W1({children:s}){const t=F1(),i=J1(),r=W.useMemo(()=>X1(),[]),l=W.useMemo(()=>Z1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(lv.Provider,{value:o,children:s})}var Ko={exports:{}},mh,k0;function P1(){if(k0)return mh;k0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return mh=s,mh}var U0;function tC(){if(U0)return Ko.exports;U0=1;var s=P1();function t(o,u,d){if(typeof o=="function"&&(d=u,u=o,o=null),!(d>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=st,m=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function I(J,nt){var st=p.get();st.context=o,st.release=H,st.value=J,st.callback=nt||i,st.errorHandler=v,y>=d||b.paused?g?(st.next=g,g=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function H(J){J&&p.release(J);var nt=g;nt&&y<=d?b.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o=="function"&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,R){m(E,function(A,z){if(A){R(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,R){y(E,function(A,z){if(A){R(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N=="function"&&N(),T(),g.drain=N}}})});return E}}return Ko.exports=t,Ko.exports.promise=l,Ko.exports}var eC=tC();const ov=U1(eC),On="Stream-Next-Offset",Uc="Stream-Cursor",zc="Stream-Up-To-Date",In="Stream-Closed",Sh="Stream-Seq",nC="Stream-TTL",sC="Stream-Expires-At",z0="Producer-Id",Vo="Producer-Epoch",j0="Producer-Seq",iC="Producer-Expected-Seq",rC="Producer-Received-Seq",vh="offset",Go="live",aC="stream-sse-data-encoding";var Js=class cv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name="FetchError",this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(d&&d.includes("application/json"))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new cv(r,o,u,l,i)}},Nd=class extends Error{constructor(){super("Fetch with backoff aborted"),this.name="FetchBackoffAbortError"}},te=class ed extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name="DurableStreamError",this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(o&&o.includes("application/json"))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=N0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new ed(d,u,r,l)}static fromFetchError(t){const i=N0(t.status);return new ed(t.message,i,t.status,t.json??t.text)}};function N0(s){switch(s){case 400:return"BAD_REQUEST";case 401:return"UNAUTHORIZED";case 403:return"FORBIDDEN";case 404:return"NOT_FOUND";case 409:return"CONFLICT_SEQ";case 429:return"RATE_LIMITED";case 503:return"BUSY";default:return"UNKNOWN"}}var lC=class extends Error{constructor(){super("Invalid stream options: missing required url parameter"),this.name="MissingStreamUrlError"}},uv=class extends te{code="STREAM_CLOSED";status=409;streamClosed=!0;finalOffset;constructor(s,t){super("Cannot append to closed stream","STREAM_CLOSED",409,s),this.name="StreamClosedError",this.finalOffset=t}},oC=class extends Error{constructor(){super("Invalid signal option. It must be an instance of AbortSignal."),this.name="InvalidSignalError"}};const cC=[429,503],Bd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function uC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function fv(s,t=Bd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await Js.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Nd;if(b instanceof Js&&!cC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Js?uC(b.headers["retry-after"]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const R=w>0?"server+client":"client";console.log(`Retry attempt #${v} after ${N}ms (${R}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(R=>setTimeout(R,N)),y=Math.min(y*l,r)}}}}const fC=[201,204,205];function hC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||fC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Nd:new Js(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l=="string"?l:"failed to read body")}}}function dC(s){return typeof Symbol<"u"&&typeof Symbol.asyncIterator=="symbol"&&typeof s[Symbol.asyncIterator]=="function"}function pC(s){if(typeof Symbol>"u"||typeof Symbol.asyncIterator!="symbol"||typeof s[Symbol.asyncIterator]=="function")return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,"values",{configurable:!0,writable:!0,value:t})}catch{}}function wh(s){return dC(s)||pC(s),s}async function*B0(s,t){const i=s.getReader(),r=new TextDecoder;let l="",o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` `).replace(/\r/g,` `);const g=l.split(` `);l=g.pop()??"";for(const m of g)if(m===""){if(o.type&&o.data.length>0){const y=o.data.join(` -`);if(o.type==="data")yield{type:"data",data:y};else if(o.type==="control")try{const v=JSON.parse(y);yield{type:"control",streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const w=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${w}`,"PARSE_ERROR")}}o={data:[]}}else if(m.startsWith("event:")){const y=m.slice(6);o.type=y.startsWith(" ")?y.slice(1):y}else if(m.startsWith("data:")){const y=m.slice(5);o.data.push(y.startsWith(" ")?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type==="data")yield{type:"data",data:d};else if(o.type==="control")try{const p=JSON.parse(d);yield{type:"control",streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,"PARSE_ERROR")}}}finally{i.releaseLock()}}var Ld=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},hv=class nd extends Ld{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new nd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new nd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Id(this)}},Eh=class wr extends Ld{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new wr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new wr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:"healthy",state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:"fallback",state:new hv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:"reconnect",state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:"healthy",state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:"healthy",state:this}}pause(){return new Id(this)}},Id=class sd extends Ld{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new sd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new sd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const L0="PAUSE_STREAM";var gC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o="active";#u;#w;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new hv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener("abort",()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#D()}#D(){if(typeof document=="object"&&typeof document.hidden=="boolean"&&typeof document.addEventListener=="function"){const s=()=>{document.hidden?this.#R():this.#T()};document.addEventListener("visibilitychange",s),this.#w=()=>{typeof document=="object"&&document.removeEventListener("visibilitychange",s)},document.hidden&&this.#R()}}#R(){this.#o==="active"&&(this.#o="pause-requested",this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(L0))}#T(){if(this.#o==="paused"||this.#o==="pause-requested"){if(this.#l.signal.aborted)return;this.#i instanceof Id&&(this.#i=this.#i.resume().state),this.#o="active",this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new te(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,"BAD_REQUEST")}#r(){this.#w?.(),this.#h()}#_(s){this.#w?.(),this.#f(s)}#b(s){if(this.#x!==null)throw new te(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,"ALREADY_CONSUMED");this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(On)||void 0,cursor:s.headers.get(Uc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(In)?.toLowerCase()==="true"}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#z(s){this.#i=this.#i.withSSEControl(s)}#U(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action==="fallback")return this.#v.logWarnings&&console.warn("[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy."),null;if(s.action==="reconnect"){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#U(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?B0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:"continue",newIterator:r}}catch(r){return{type:"error",error:r instanceof Error?r:new Error("SSE reconnection failed")}}return{type:"closed"}}return i.type==="data"?this.#L(i.data,s):(this.#z(i),i.upToDate?{type:"response",response:mC("",i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:"continue"})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=id(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:"response",response:o,newIterator:u??void 0}}catch(u){return{type:"error",error:u instanceof Error?u:new Error("SSE reconnection failed")}}}if(l.type==="control")return this.#z(l),{type:"response",response:id(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get("content-type")?.includes("text/event-stream")??!1)&&s.body)this.#U(),this.#u=new AbortController,i=B0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case"response":l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case"closed":this.#r(),r.close();return;case"error":this.#_(l.error),r.error(l.error);return;case"continue":l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===L0){this.#o==="pause-requested"&&(this.#o="paused");return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#w?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#b("body"),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#b("json"),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||"[]";let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+"...":o;throw new te(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,"PARSE_ERROR")}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#b("text"),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join("")}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#b("bodyStream"),wh(this.#j())}jsonStream(){this.#b("jsonStream"),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||"[]";let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,"PARSE_ERROR")}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return wh(i)}textStream(){this.#b("textStream");const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return wh(t)}subscribeJson(s){this.#b("subscribeJson"),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||"[]";let v;try{v=JSON.parse(y)}catch(b){const E=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse JSON response: ${b instanceof Error?b.message:String(b)}. Data: ${E}`,"PARSE_ERROR")}const w=Array.isArray(v)?v:[v];await s({items:w,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#b("subscribeBytes");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#b("subscribeText");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#w?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(On),o=s.headers.get(Uc),u=s.headers.has(jc),d=s.headers.get(In)?.toLowerCase()==="true";return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function yC(s){const t=s.replace(/[\n\r]/g,"");if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new te(`Invalid base64 data: length ${t.length} is not a multiple of 4`,"PARSE_ERROR");try{if(typeof Buffer<"u")return new Uint8Array(Buffer.from(t,"base64"));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>yC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((b,E)=>b+E.length,0),v=new Uint8Array(y);let w=0;for(const b of m)v.set(b,w),w+=b.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith("[")&&v.endsWith("]")){const w=v.slice(1,-1).trim();w.length>0&&m.push(w)}else m.push(v)}g=`[${m.join(",")}]`}else g=s.join("");return new Response(g,{status:200,headers:p})}async function Xa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r=="function"?t[i]=await r():t[i]=r;return t}async function ds(s,t,i){const r=s.status;if(r===404)throw new te(`Stream not found: ${t}`,"NOT_FOUND",404);if(r===409){if(s.headers.get(In)?.toLowerCase()==="true"){const d=s.headers.get(On)??void 0;throw new uv(t,d)}const o=i?.operation==="create"?`Stream already exists: ${t}`:"Sequence conflict: seq is lower than last appended",u=i?.operation==="create"?"CONFLICT_EXISTS":"CONFLICT_SEQ";throw new te(o,u,409)}throw r===400?new te("Bad request (possibly content-type mismatch)","BAD_REQUEST",400):await te.fromResponse(s,t)}async function Po(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r=="function"?t[i]=await r():t[i]=r);return t}const I0=new Set;function SC(){if(!(typeof process>"u"))return"production"}function vC(){return typeof globalThis.window<"u"}function bC(){if(typeof globalThis.window<"u"&&typeof globalThis.window.location<"u")return globalThis.window.location.href}function wC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function dv(s,t){if(t===!1||SC()==="test"||!vC()||typeof console>"u"||typeof console.warn!="function")return;const r=s instanceof URL?s.toString():s,l=wC(r);l&&l.protocol==="http:"&&(I0.has(l.origin)||(I0.add(l.origin),console.warn("[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.")))}async function EC(s){if(!s.url)throw new te("Invalid stream options: missing required url parameter","BAD_REQUEST");let t=s.headers,i=s.params;for(;;)try{return await CC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function CC(s){const t=s.url instanceof URL?s.url.toString():s.url;dv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??"-1";i.searchParams.set(bh,r);const l=s.live??!0;(l==="long-poll"||l==="sse")&&i.searchParams.set(Go,l);const o=await Po(s.params);for(const[z,I]of Object.entries(o))i.searchParams.set(z,I);const u=await Xa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener("abort",()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...z)=>fetch(...z)),g=s.backoffOptions??Bd,m=fv(p,g);let y;try{y=await m(i.toString(),{method:"GET",headers:u,signal:d.signal})}catch(z){throw z instanceof Nd?new te("Stream request was aborted","UNKNOWN"):z}const v=y.headers.get("content-type")??void 0,w=y.headers.get(On)??r,b=y.headers.get(Uc)??void 0,E=y.headers.has(jc),T=y.headers.get(In)?.toLowerCase()==="true",B=s.json===!0||(v?.includes("application/json")??!1),O=y.headers.get(aC)==="base64"?"base64":void 0,k=async(z,I,X,tt)=>{const F=new URL(t);F.searchParams.set(bh,z),tt||(l==="sse"?F.searchParams.set(Go,"sse"):(l===!0||l==="long-poll")&&F.searchParams.set(Go,"long-poll")),I&&F.searchParams.set("cursor",I);const nt=await Po(s.params);for(const[Kt,ht]of Object.entries(nt))F.searchParams.set(Kt,ht);const st=await Xa(s.headers),xt=await m(F.toString(),{method:"GET",headers:st,signal:X});return xt.ok||await ds(xt,t),xt},$=l==="sse"?async(z,I,X)=>{const tt=new URL(t);tt.searchParams.set(bh,z),tt.searchParams.set(Go,"sse"),I&&tt.searchParams.set("cursor",I);const F=await Po(s.params);for(const[xt,Kt]of Object.entries(F))tt.searchParams.set(xt,Kt);const nt=await Xa(s.headers),st=await m(tt.toString(),{method:"GET",headers:nt,signal:X});return st.ok||await ds(st,t),st}:void 0;return new gC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:B,initialOffset:w,initialCursor:b,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:k,startSSE:$,sseResilience:s.sseResilience,encoding:O})}var H0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name="StaleEpochError",this.currentEpoch=s}},xC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name="SequenceGapError",this.expectedSeq=s,this.receivedSeq=t}};function q0(s){return s?s.split(";")[0].trim().toLowerCase():""}var pv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#w;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error("epoch must be >= 0");if(l<=0)throw new Error("maxBatchBytes must be > 0");if(o<=0)throw new Error("maxInFlight must be > 0");if(u<0)throw new Error("lingerMs must be >= 0");this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=ov.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener("abort",()=>{this.#A(new te("Producer aborted","ALREADY_CLOSED",void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new te("Producer is closed","ALREADY_CLOSED",void 0,void 0);let t;if(typeof s=="string")t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new te("append() requires string or Uint8Array. For objects, use JSON.stringify().","BAD_REQUEST",400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#w);return this.#u=i,i}this.#o=!0,this.#w=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??"application/octet-stream",i=q0(t)==="application/json";let r;if(s!==void 0){const g=typeof s=="string"?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[U0]:this.#e,[Vo]:this.#n.toString(),[j0]:l.toString(),[In]:"true"},d=await this.#l(this.#t.url,{method:"POST",headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===403){const g=d.headers.get(Vo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new H0(m)}throw await Xs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#D(r,i,void 0)}catch(l){throw this.#D(r,i,l),this.#d&&this.#d(l),l}}#D(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??"application/octet-stream",l=q0(r)==="application/json";let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(",")}]`;else{const y=s.reduce((b,E)=>b+E.body.length,0),v=new Uint8Array(y);let w=0;for(const b of s)v.set(b.body,w),w+=b.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[U0]:this.#e,[Vo]:i.toString(),[j0]:t.toString()},g=await this.#l(u,{method:"POST",headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:"",duplicate:!0};if(g.status===200)return{offset:g.headers.get(On)??"",duplicate:!1};if(g.status===403){const y=g.headers.get(Vo),v=y?parseInt(y,10):i;if(this.#a){const w=v+1;return this.#n=w,this.#s=1,this.#T(s,0,w)}throw new H0(v)}if(g.status===409){const y=g.headers.get(iC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(";")[0].trim().toLowerCase():""}function _C(s){return s!=null&&typeof s.then=="function"}var Ln=class $a{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){OC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=ov.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Bd},l=fv(this.#n,r);this.#e=hC(l)}static async create(t){const i=new $a(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new $a(t);return await i.head(),i}static async head(t){return new $a(t).head()}static async delete(t){return new $a(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:"HEAD",headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ds(l,this.url)}const o=l.headers.get("content-type")??void 0,u=l.headers.get(On)??void 0,d=l.headers.get("etag")??void 0,p=l.headers.get("cache-control")??void 0,g=l.headers.get(In)?.toLowerCase()==="true";return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i["content-type"]=l),t?.ttlSeconds!==void 0&&(i[nC]=String(t.ttlSeconds)),t?.expiresAt&&(i[sC]=t.expiresAt),t?.closed&&(i[In]="true");const o=TC(t?.body),u=await this.#e(r.toString(),{method:"PUT",headers:i,body:o,signal:this.#t.signal});u.ok||await ds(u,this.url,{operation:"create"});const d=u.headers.get("content-type");return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:"DELETE",headers:i,signal:t?.signal??this.#t.signal});l.ok||await ds(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l),i[In]="true";let o;t?.body!==void 0&&(xh(l)==="application/json"?o=`[${typeof t.body=="string"?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body=="string",t.body));const u=await this.#e(r.toString(),{method:"POST",headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()==="true"){const g=u.headers.get(On)??void 0;throw new uv(this.url,g)}return u.ok||await ds(u,this.url),{finalOffset:u.headers.get(On)??""}}async append(t,i){const r=_C(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)==="application/json";let d;u?d=`[${typeof t=="string"?t:new TextDecoder().decode(t)}]`:typeof t=="string"?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:"POST",headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ds(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)==="application/json";let d;if(u)d=`[${t.map(v=>typeof v.data=="string"?v.data:new TextDecoder().decode(v.data)).join(",")}]`;else{const y=t.some(w=>w.data instanceof Uint8Array),v=t.some(w=>typeof w.data=="string");if(y&&!v){const w=t.map(B=>B.data),b=w.reduce((B,R)=>B+R.length,0),E=new Uint8Array(b);let T=0;for(const B of w)E.set(B,T),T+=B.length;d=E}else if(v&&!y)d=t.map(w=>w.data).join("");else{const w=new TextEncoder,b=t.map(R=>typeof R.data=="string"?w.encode(R.data):R.data),E=b.reduce((R,O)=>R+O.length,0),T=new Uint8Array(E);let B=0;for(const R of b)T.set(R,B),B+=R.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:"POST",headers:i,body:d,signal:g});m.ok||await ds(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[vh]=i.seq);const u=AC(t),d=await this.#e(l.toString(),{method:"POST",headers:r,body:u,duplex:"half",signal:i?.signal??this.#t.signal});d.ok||await ds(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new pv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return EC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Xa(this.#t.headers)}async#f(){const t=await Xa(this.#t.headers),i=new URL(this.url),r=await Po(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function TC(s){if(s!==void 0)return typeof s=="string"?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function AC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r=="string"?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o=="string"?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function OC(s){if(!s.url)throw new lC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new oC;dv(s.url,s.warnOnHttp)}const DC="__includes_scalar__";class Ai{}class kr extends Ai{constructor(t,i){super(),this.collection=t,this.alias=i,this.type="collectionRef"}}class Sn extends Ai{constructor(t,i){super(),this.query=t,this.alias=i,this.type="queryRef"}}class Me extends Ai{constructor(t){super(),this.path=t,this.type="ref"}}class Be extends Ai{constructor(t){super(),this.value=t,this.type="val"}}class Je extends Ai{constructor(t,i){super(),this.name=t,this.args=i,this.type="func"}}class gv extends Ai{constructor(t,i){super(),this.name=t,this.args=i,this.type="agg"}}class Oi extends Ai{constructor(t,i,r,l,o,u,d="collection",p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type="includesSubquery"}}function zr(s){return s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof Oi}function Hd(s){return typeof s=="object"&&"expression"in s?s.expression:s}function K0(s){return typeof s=="object"&&"expression"in s?s.expression:s}function V0(s){return typeof s=="object"&&"expression"in s&&s.residual===!0}function RC(s){return{expression:s,residual:!0}}function MC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function el(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type==="ref")return el(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=MC(s,r);return o?o.type==="queryRef"?el(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name="TanStackDBError"}}class G0 extends En{constructor(t,i,r){const l=`${t==="insert"?"Insert":"Update"} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join("")}`;super(r||l),this.name="SchemaValidationError",this.type=t,this.issues=i}}class Di extends En{constructor(t){super(t),this.name="CollectionConfigurationError"}}class kC extends Di{constructor(){super("Collection requires a config")}}class zC extends Di{constructor(){super("Collection requires a sync config")}}class UC extends Di{constructor(){super("Schema must implement the standard-schema interface")}}class $0 extends Di{constructor(){super("Schema validation must be synchronous")}}class gl extends En{constructor(t){super(t),this.name="CollectionStateError"}}class jC extends gl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class NC extends gl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class BC extends gl{constructor(){super("Collection is in error state")}}class LC extends gl{constructor(){super("Active subscribers count is negative - this should never happen")}}class Gn extends En{constructor(t){super(t),this.name="CollectionOperationError"}}class IC extends Gn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class HC extends Gn{constructor(t,i){const r=t===null?"null":typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class qC extends Gn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class KC extends Gn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class VC extends Gn{constructor(){super("The first argument to update is missing")}}class GC extends Gn{constructor(){super("No keys were passed to update")}}class $C extends Gn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class YC extends Gn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class QC extends Gn{constructor(){super("No keys were passed to delete")}}class FC extends Gn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class qd extends En{constructor(t){super(t),this.name="MissingHandlerError"}}class JC extends qd{constructor(){super("Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.")}}class XC extends qd{constructor(){super("Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.")}}class ZC extends qd{constructor(){super("Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.")}}class ms extends En{constructor(t){super(t),this.name="TransactionError"}}class WC extends ms{constructor(){super("mutationFn is required when creating a transaction")}}class PC extends ms{constructor(){super("onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate."),this.name="OnMutateMustBeSynchronousError"}}class tx extends ms{constructor(){super("You can no longer call .mutate() as the transaction is no longer pending")}}class ex extends ms{constructor(){super("You can no longer call .rollback() as the transaction is already completed")}}class nx extends ms{constructor(){super("You can no longer call .commit() as the transaction is no longer pending")}}class _h extends ms{constructor(){super("No pending sync transaction to write to")}}class Th extends ms{constructor(){super("The pending sync transaction is already committed, you can't still write to it.")}}class sx extends ms{constructor(){super("No pending sync transaction to commit")}}class ix extends ms{constructor(){super("The pending sync transaction is already committed, you can't commit it again.")}}class Ri extends En{constructor(t){super(t),this.name="QueryBuilderError"}}class rx extends Ri{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ax extends Ri{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class lx extends Ri{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class $o extends Ri{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class ox extends Ri{constructor(){super("Join condition must be an equality expression")}}class cx extends Ri{constructor(){super("Query must have a from clause")}}class Y0 extends Ri{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: +`);if(o.type==="data")yield{type:"data",data:y};else if(o.type==="control")try{const v=JSON.parse(y);yield{type:"control",streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,"PARSE_ERROR")}}o={data:[]}}else if(m.startsWith("event:")){const y=m.slice(6);o.type=y.startsWith(" ")?y.slice(1):y}else if(m.startsWith("data:")){const y=m.slice(5);o.data.push(y.startsWith(" ")?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type==="data")yield{type:"data",data:d};else if(o.type==="control")try{const p=JSON.parse(d);yield{type:"control",streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,"PARSE_ERROR")}}}finally{i.releaseLock()}}var Ld=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},hv=class nd extends Ld{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new nd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new nd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Id(this)}},bh=class br extends Ld{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new br({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new br({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:"healthy",state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:"fallback",state:new hv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:"reconnect",state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:"healthy",state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:"healthy",state:this}}pause(){return new Id(this)}},Id=class sd extends Ld{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new sd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new sd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const L0="PAUSE_STREAM";var gC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o="active";#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new bh(t):new hv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener("abort",()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#D()}#D(){if(typeof document=="object"&&typeof document.hidden=="boolean"&&typeof document.addEventListener=="function"){const s=()=>{document.hidden?this.#R():this.#T()};document.addEventListener("visibilitychange",s),this.#b=()=>{typeof document=="object"&&document.removeEventListener("visibilitychange",s)},document.hidden&&this.#R()}}#R(){this.#o==="active"&&(this.#o="pause-requested",this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(L0))}#T(){if(this.#o==="paused"||this.#o==="pause-requested"){if(this.#l.signal.aborted)return;this.#i instanceof Id&&(this.#i=this.#i.resume().state),this.#o="active",this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new te(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,"BAD_REQUEST")}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new te(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,"ALREADY_CONSUMED");this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(On)||void 0,cursor:s.headers.get(Uc)||void 0,upToDate:s.headers.has(zc),streamClosed:s.headers.get(In)?.toLowerCase()==="true"}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof bh||(this.#i=new bh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action==="fallback")return this.#v.logWarnings&&console.warn("[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy."),null;if(s.action==="reconnect"){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?B0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:"continue",newIterator:r}}catch(r){return{type:"error",error:r instanceof Error?r:new Error("SSE reconnection failed")}}return{type:"closed"}}return i.type==="data"?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:"response",response:mC("",i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:"continue"})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=id(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:"response",response:o,newIterator:u??void 0}}catch(u){return{type:"error",error:u instanceof Error?u:new Error("SSE reconnection failed")}}}if(l.type==="control")return this.#U(l),{type:"response",response:id(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get("content-type")?.includes("text/event-stream")??!1)&&s.body)this.#z(),this.#u=new AbortController,i=B0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case"response":l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case"closed":this.#r(),r.close();return;case"error":this.#_(l.error),r.error(l.error);return;case"continue":l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===L0){this.#o==="pause-requested"&&(this.#o="paused");return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w("body"),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w("json"),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||"[]";let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+"...":o;throw new te(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,"PARSE_ERROR")}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w("text"),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join("")}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w("bodyStream"),wh(this.#j())}jsonStream(){this.#w("jsonStream"),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||"[]";let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,"PARSE_ERROR")}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return wh(i)}textStream(){this.#w("textStream");const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return wh(t)}subscribeJson(s){this.#w("subscribeJson"),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||"[]";let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,"PARSE_ERROR")}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w("subscribeBytes");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w("subscribeText");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Eh(s,t,i,r){const l=s.headers.get(On),o=s.headers.get(Uc),u=s.headers.has(zc),d=s.headers.get(In)?.toLowerCase()==="true";return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function yC(s){const t=s.replace(/[\n\r]/g,"");if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new te(`Invalid base64 data: length ${t.length} is not a multiple of 4`,"PARSE_ERROR");try{if(typeof Buffer<"u")return new Uint8Array(Buffer.from(t,"base64"));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>yC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith("[")&&v.endsWith("]")){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(",")}]`}else g=s.join("");return new Response(g,{status:200,headers:p})}async function Xa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r=="function"?t[i]=await r():t[i]=r;return t}async function hs(s,t,i){const r=s.status;if(r===404)throw new te(`Stream not found: ${t}`,"NOT_FOUND",404);if(r===409){if(s.headers.get(In)?.toLowerCase()==="true"){const d=s.headers.get(On)??void 0;throw new uv(t,d)}const o=i?.operation==="create"?`Stream already exists: ${t}`:"Sequence conflict: seq is lower than last appended",u=i?.operation==="create"?"CONFLICT_EXISTS":"CONFLICT_SEQ";throw new te(o,u,409)}throw r===400?new te("Bad request (possibly content-type mismatch)","BAD_REQUEST",400):await te.fromResponse(s,t)}async function Wo(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r=="function"?t[i]=await r():t[i]=r);return t}const I0=new Set;function SC(){if(!(typeof process>"u"))return"production"}function vC(){return typeof globalThis.window<"u"}function wC(){if(typeof globalThis.window<"u"&&typeof globalThis.window.location<"u")return globalThis.window.location.href}function bC(s){try{return new URL(s)}catch{const t=wC();if(t)try{return new URL(s,t)}catch{return}return}}function dv(s,t){if(t===!1||SC()==="test"||!vC()||typeof console>"u"||typeof console.warn!="function")return;const r=s instanceof URL?s.toString():s,l=bC(r);l&&l.protocol==="http:"&&(I0.has(l.origin)||(I0.add(l.origin),console.warn("[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.")))}async function EC(s){if(!s.url)throw new te("Invalid stream options: missing required url parameter","BAD_REQUEST");let t=s.headers,i=s.params;for(;;)try{return await CC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function CC(s){const t=s.url instanceof URL?s.url.toString():s.url;dv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??"-1";i.searchParams.set(vh,r);const l=s.live??!0;(l==="long-poll"||l==="sse")&&i.searchParams.set(Go,l);const o=await Wo(s.params);for(const[H,K]of Object.entries(o))i.searchParams.set(H,K);const u=await Xa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener("abort",()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...H)=>fetch(...H)),g=s.backoffOptions??Bd,m=fv(p,g);let y;try{y=await m(i.toString(),{method:"GET",headers:u,signal:d.signal})}catch(H){throw H instanceof Nd?new te("Stream request was aborted","UNKNOWN"):H}const v=y.headers.get("content-type")??void 0,b=y.headers.get(On)??r,w=y.headers.get(Uc)??void 0,E=y.headers.has(zc),T=y.headers.get(In)?.toLowerCase()==="true",N=s.json===!0||(v?.includes("application/json")??!1),A=y.headers.get(aC)==="base64"?"base64":void 0,z=async(H,K,X,tt)=>{const J=new URL(t);J.searchParams.set(vh,H),tt||(l==="sse"?J.searchParams.set(Go,"sse"):(l===!0||l==="long-poll")&&J.searchParams.set(Go,"long-poll")),K&&J.searchParams.set("cursor",K);const nt=await Wo(s.params);for(const[Kt,ht]of Object.entries(nt))J.searchParams.set(Kt,ht);const st=await Xa(s.headers),xt=await m(J.toString(),{method:"GET",headers:st,signal:X});return xt.ok||await hs(xt,t),xt},I=l==="sse"?async(H,K,X)=>{const tt=new URL(t);tt.searchParams.set(vh,H),tt.searchParams.set(Go,"sse"),K&&tt.searchParams.set("cursor",K);const J=await Wo(s.params);for(const[xt,Kt]of Object.entries(J))tt.searchParams.set(xt,Kt);const nt=await Xa(s.headers),st=await m(tt.toString(),{method:"GET",headers:nt,signal:X});return st.ok||await hs(st,t),st}:void 0;return new gC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:I,sseResilience:s.sseResilience,encoding:A})}var H0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name="StaleEpochError",this.currentEpoch=s}},xC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name="SequenceGapError",this.expectedSeq=s,this.receivedSeq=t}};function q0(s){return s?s.split(";")[0].trim().toLowerCase():""}var pv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error("epoch must be >= 0");if(l<=0)throw new Error("maxBatchBytes must be > 0");if(o<=0)throw new Error("maxInFlight must be > 0");if(u<0)throw new Error("lingerMs must be >= 0");this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=ov.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener("abort",()=>{this.#A(new te("Producer aborted","ALREADY_CLOSED",void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new te("Producer is closed","ALREADY_CLOSED",void 0,void 0);let t;if(typeof s=="string")t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new te("append() requires string or Uint8Array. For objects, use JSON.stringify().","BAD_REQUEST",400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??"application/octet-stream",i=q0(t)==="application/json";let r;if(s!==void 0){const g=typeof s=="string"?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[z0]:this.#e,[Vo]:this.#n.toString(),[j0]:l.toString(),[In]:"true"},d=await this.#l(this.#t.url,{method:"POST",headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===403){const g=d.headers.get(Vo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new H0(m)}throw await Js.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#D(r,i,void 0)}catch(l){throw this.#D(r,i,l),this.#d&&this.#d(l),l}}#D(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??"application/octet-stream",l=q0(r)==="application/json";let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(",")}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[z0]:this.#e,[Vo]:i.toString(),[j0]:t.toString()},g=await this.#l(u,{method:"POST",headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:"",duplicate:!0};if(g.status===200)return{offset:g.headers.get(On)??"",duplicate:!1};if(g.status===403){const y=g.headers.get(Vo),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new H0(v)}if(g.status===409){const y=g.headers.get(iC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Ch(s){return s?s.split(";")[0].trim().toLowerCase():""}function _C(s){return s!=null&&typeof s.then=="function"}var Ln=class $a{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){OC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=ov.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Bd},l=fv(this.#n,r);this.#e=hC(l)}static async create(t){const i=new $a(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new $a(t);return await i.head(),i}static async head(t){return new $a(t).head()}static async delete(t){return new $a(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:"HEAD",headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await hs(l,this.url)}const o=l.headers.get("content-type")??void 0,u=l.headers.get(On)??void 0,d=l.headers.get("etag")??void 0,p=l.headers.get("cache-control")??void 0,g=l.headers.get(In)?.toLowerCase()==="true";return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i["content-type"]=l),t?.ttlSeconds!==void 0&&(i[nC]=String(t.ttlSeconds)),t?.expiresAt&&(i[sC]=t.expiresAt),t?.closed&&(i[In]="true");const o=TC(t?.body),u=await this.#e(r.toString(),{method:"PUT",headers:i,body:o,signal:this.#t.signal});u.ok||await hs(u,this.url,{operation:"create"});const d=u.headers.get("content-type");return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:"DELETE",headers:i,signal:t?.signal??this.#t.signal});l.ok||await hs(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l),i[In]="true";let o;t?.body!==void 0&&(Ch(l)==="application/json"?o=`[${typeof t.body=="string"?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body=="string",t.body));const u=await this.#e(r.toString(),{method:"POST",headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()==="true"){const g=u.headers.get(On)??void 0;throw new uv(this.url,g)}return u.ok||await hs(u,this.url),{finalOffset:u.headers.get(On)??""}}async append(t,i){const r=_C(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[Sh]=i.seq);const u=Ch(o)==="application/json";let d;u?d=`[${typeof t=="string"?t:new TextDecoder().decode(t)}]`:typeof t=="string"?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:"POST",headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await hs(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[Sh]=o);const u=Ch(l)==="application/json";let d;if(u)d=`[${t.map(v=>typeof v.data=="string"?v.data:new TextDecoder().decode(v.data)).join(",")}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data=="string");if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,R)=>N+R.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join("");else{const b=new TextEncoder,w=t.map(R=>typeof R.data=="string"?b.encode(R.data):R.data),E=w.reduce((R,A)=>R+A.length,0),T=new Uint8Array(E);let N=0;for(const R of w)T.set(R,N),N+=R.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:"POST",headers:i,body:d,signal:g});m.ok||await hs(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[Sh]=i.seq);const u=AC(t),d=await this.#e(l.toString(),{method:"POST",headers:r,body:u,duplex:"half",signal:i?.signal??this.#t.signal});d.ok||await hs(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new pv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return EC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Xa(this.#t.headers)}async#f(){const t=await Xa(this.#t.headers),i=new URL(this.url),r=await Wo(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function TC(s){if(s!==void 0)return typeof s=="string"?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function AC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r=="string"?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o=="string"?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function OC(s){if(!s.url)throw new lC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new oC;dv(s.url,s.warnOnHttp)}const DC="__includes_scalar__";class Ti{}class kr extends Ti{constructor(t,i){super(),this.collection=t,this.alias=i,this.type="collectionRef"}}class Sn extends Ti{constructor(t,i){super(),this.query=t,this.alias=i,this.type="queryRef"}}class Me extends Ti{constructor(t){super(),this.path=t,this.type="ref"}}class Be extends Ti{constructor(t){super(),this.value=t,this.type="val"}}class Je extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type="func"}}class gv extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type="agg"}}class Ai extends Ti{constructor(t,i,r,l,o,u,d="collection",p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type="includesSubquery"}}function Ur(s){return s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof Ai}function Hd(s){return typeof s=="object"&&"expression"in s?s.expression:s}function K0(s){return typeof s=="object"&&"expression"in s?s.expression:s}function V0(s){return typeof s=="object"&&"expression"in s&&s.residual===!0}function RC(s){return{expression:s,residual:!0}}function MC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function el(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type==="ref")return el(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=MC(s,r);return o?o.type==="queryRef"?el(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name="TanStackDBError"}}class G0 extends En{constructor(t,i,r){const l=`${t==="insert"?"Insert":"Update"} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join("")}`;super(r||l),this.name="SchemaValidationError",this.type=t,this.issues=i}}class Oi extends En{constructor(t){super(t),this.name="CollectionConfigurationError"}}class kC extends Oi{constructor(){super("Collection requires a config")}}class UC extends Oi{constructor(){super("Collection requires a sync config")}}class zC extends Oi{constructor(){super("Schema must implement the standard-schema interface")}}class $0 extends Oi{constructor(){super("Schema validation must be synchronous")}}class gl extends En{constructor(t){super(t),this.name="CollectionStateError"}}class jC extends gl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class NC extends gl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class BC extends gl{constructor(){super("Collection is in error state")}}class LC extends gl{constructor(){super("Active subscribers count is negative - this should never happen")}}class Gn extends En{constructor(t){super(t),this.name="CollectionOperationError"}}class IC extends Gn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class HC extends Gn{constructor(t,i){const r=t===null?"null":typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class qC extends Gn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class KC extends Gn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class VC extends Gn{constructor(){super("The first argument to update is missing")}}class GC extends Gn{constructor(){super("No keys were passed to update")}}class $C extends Gn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class YC extends Gn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class QC extends Gn{constructor(){super("No keys were passed to delete")}}class FC extends Gn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class qd extends En{constructor(t){super(t),this.name="MissingHandlerError"}}class JC extends qd{constructor(){super("Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.")}}class XC extends qd{constructor(){super("Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.")}}class ZC extends qd{constructor(){super("Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.")}}class ys extends En{constructor(t){super(t),this.name="TransactionError"}}class WC extends ys{constructor(){super("mutationFn is required when creating a transaction")}}class PC extends ys{constructor(){super("onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate."),this.name="OnMutateMustBeSynchronousError"}}class tx extends ys{constructor(){super("You can no longer call .mutate() as the transaction is no longer pending")}}class ex extends ys{constructor(){super("You can no longer call .rollback() as the transaction is already completed")}}class nx extends ys{constructor(){super("You can no longer call .commit() as the transaction is no longer pending")}}class xh extends ys{constructor(){super("No pending sync transaction to write to")}}class _h extends ys{constructor(){super("The pending sync transaction is already committed, you can't still write to it.")}}class sx extends ys{constructor(){super("No pending sync transaction to commit")}}class ix extends ys{constructor(){super("The pending sync transaction is already committed, you can't commit it again.")}}class Di extends En{constructor(t){super(t),this.name="QueryBuilderError"}}class rx extends Di{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ax extends Di{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class lx extends Di{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class $o extends Di{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class ox extends Di{constructor(){super("Join condition must be an equality expression")}}class cx extends Di{constructor(){super("Query must have a from clause")}}class Y0 extends Di{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: ❌ .where(({ user }) => user.id === 'abc') ✅ .where(({ user }) => eq(user.id, 'abc')) -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name="QueryCompilationError"}}class ux extends Le{constructor(){super("DISTINCT requires a SELECT clause.")}}class fx extends Le{constructor(){super("fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().")}}class hx extends Le{constructor(){super("Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).")}}class dx extends Le{constructor(){super("HAVING clause requires GROUP BY clause")}}class px extends Le{constructor(){super("LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results")}}class yv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(", ")}`:"";super(`Input for ${l} not found in inputs map${o}`)}}class gx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(", ")}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class yx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class mx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class Sx extends Le{constructor(){super("Reference path cannot be empty")}}class vx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class Q0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Mi extends En{constructor(t){super(t),this.name="JoinError"}}class bx extends Mi{constructor(t){super(`Unsupported join type: ${t}`)}}class wx extends Mi{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Ex extends Mi{constructor(){super("Invalid join condition: expressions must reference source aliases")}}class Cx extends Mi{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class xx extends Mi{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class _x extends Mi{constructor(){super("Invalid join condition")}}class Tx extends Mi{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name="GroupByError"}}class Ax extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Ox extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Rx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class F0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name="SyncCleanupError"}}class Mx extends En{constructor(t){super(t),this.name="QueryOptimizerError"}}class kx extends Mx{constructor(){super("Cannot combine empty expression list")}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(", ")}. This indicates a bug in alias tracking.`)}}class Ux extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(", ")}. This indicates a bug in query compilation. Please report this issue.`)}}class jx extends Le{constructor(){super("setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.")}}function Hn(s,t){return tc(s,t,new Map)}function tc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&tc(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!="object"))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;otc(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s=="object"){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&tc(s[u],t[u],i));return i.delete(s),o}return!1}const Nx=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function Zs(s){if(s==null||typeof s!="object")return!1;const t=s[Symbol.toStringTag];return typeof t=="string"&&Nx.has(t)}const mv={direction:"asc",nulls:"first",stringSort:"locale"},Ah=new WeakMap;let Bx=1;function J0(s){if(Ah.has(s))return Ah.get(s);const t=Bx++;return Ah.set(s,t),t}const Kd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r==="first"?-1:1;if(t==null)return r==="first"?1:-1;if(typeof s=="string"&&typeof t=="string"&&i.stringSort==="locale")return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s=="object",o=typeof t=="object";if(l||o){if(l&&o){const u=J0(s),d=J0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Lx=(s,t,i)=>Kd(t,s,{...i,nulls:i.nulls==="first"?"last":"first"});function Za(s){return(t,i)=>s.direction==="asc"?Kd(t,i,s):Lx(t,i,s)}const Ix=Za({direction:"asc",nulls:"first",stringSort:"locale"});function Hx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case"ref":return t?$x(s):Gx(s);case"func":return Yx(s,t);default:throw new mx(s.type)}}function Gx(s){const[t,...i]=s.path;if(!t)throw new Sx;if(t==="$selected"){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function $x(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Yx(s,t){const i=s.args.map(r=>Vd(r,t));switch(s.name){case"eq":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return ve(u)||ve(d)?null:Kx(u,d)}}case"gt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u>d}}case"gte":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u>=d}}case"lt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u{const u=r(o),d=l(o);return ve(u)||ve(d)?null:u<=d}}case"and":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ve(u)&&(l=!0)}return l?null:!0};case"or":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ve(u)&&(l=!0)}return l?null:!1};case"not":{const r=i[0];return l=>{const o=r(l);return ve(o)?null:!o}}case"in":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return ve(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case"like":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:X0(u,d,!1)}}case"ilike":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ve(u)||ve(d)?null:X0(u,d,!0)}}case"upper":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toUpperCase():o}}case"lower":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toLowerCase():o}}case"length":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"||Array.isArray(o)?o.length:0}}case"concat":return r=>i.map(l=>{const o=l(r);try{return String(o??"")}catch{try{return JSON.stringify(o)||""}catch{return"[object]"}}}).join("");case"coalesce":return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case"add":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case"subtract":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case"multiply":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case"divide":{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case"date":{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case"datetime":{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case"strftime":{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!="string")return null;const d=l(o),p=Oh(d);return p?Vx(u,p):null}}case"isUndefined":{const r=i[0];return l=>r(l)===void 0}case"isNull":{const r=i[0];return l=>r(l)===null}default:throw new vx(s.name)}}function X0(s,t,i){if(typeof s!="string"||typeof t!="string")return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return o=o.replace(/%/g,".*"),o=o.replace(/_/g,"."),new RegExp(`^${o}$`,"s").test(r)}class Qx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t==="gt"?"lt":t==="gte"?"lte":t==="lt"?"gt":t==="lte"?"gte":t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function Z0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const rd=["$synced","$origin","$key","$collectionId"];function Fx(s){return rd.includes(s)}function vv(s){return s.some(t=>Fx(t))}function yl(s,t,i){if(vv(t))return;const r=i??{...mv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Qx(l)}function Jx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split("."),u=yl(t,o);if(u&&u.supports("gt")&&u.supports("lt")){let d,p,g=!0,m=!0;for(const{operation:v,value:w}of l)switch(v){case"gt":(d===void 0||w>d)&&(d=w,g=!1);break;case"gte":(d===void 0||w>d)&&(d=w,g=!0);break;case"lt":(p===void 0||w0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Jx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function e_(s,t){if(s.type!=="func"||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=Gd(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!=="func"||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type==="ref"&&r.type==="val"&&Array.isArray(r.value)){const l=i.path,o=r.value,u=yl(t,l);if(u){if(u.supports("in"))return{canOptimize:!0,matchingKeys:u.lookup("in",o)};if(u.supports("eq")){const d=new Set;for(const p of o){const g=u.lookup("eq",p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function bv(s){return s.config.autoIndex==="eager"}function Bc(s,t,i,r,l){if(vv(t)||!bv(i))return;const o=r??{...mv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(".")}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:""}Failed to create auto-index for field path "${t.join(".")}":`,d)}}function s_(s,t){if(!bv(t))return;const i=i_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function i_(s){const t=[];function i(r){if(r.type!=="func")return;const l=r;if(l.name==="and"){for(const g of l.args)i(g);return}if(!["eq","gt","gte","lt","lte","in"].includes(l.name)||l.args.length<1||l.args[0].type!=="ref")return;const d=l.args[0].path;if(d.length===0)return;const p=d.join("_");t.push({fieldName:p,fieldPath:d})}return i(s),t}class r_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Dh=3e4;function Rh(s,t){if(t.length<=Dh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class l_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!="object"||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s=="string"?-1:1}function nl(s){return JSON.stringify(s,(t,i)=>typeof i=="bigint"?i.toString():i instanceof Date?i.toISOString():i)}const c_=Ee(),u_=Ee(),f_=Ee(),h_=Ee(),d_=Ee();function Ee(){return Math.random()*(2**31-1)>>>0}const wv=new ArrayBuffer(8),p_=new DataView(wv),Ys=new Uint8Array(wv);class ml{constructor(){this.hash=c_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case"symbol":{this.update(d_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case"string":this.update(u_);for(let i=0;i>>8&255)}return;case"number":p_.setFloat64(0,t,!0),this.writeByte(Ys[0]),this.writeByte(Ys[1]),this.writeByte(Ys[2]),this.writeByte(Ys[3]),this.writeByte(Ys[4]),this.writeByte(Ys[5]),this.writeByte(Ys[6]),this.writeByte(Ys[7]);return;case"bigint":{let i=t;for(i<0n?(i=-i,this.update(h_)):this.update(f_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const g_=Ee(),y_=Ee(),m_=Ee(),S_=Ee(),v_=Ee(),b_=Ee(),w_=Ee(),E_=Ee(),C_=Ee(),x_=Ee(),__=Ee(),T_=Ee(),A_=Ee(),O_=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function D_(s){const t=s[Symbol.toStringTag];return typeof t=="string"&&O_.has(t)}const R_=128,sl=new WeakMap;function Ne(s){const t=new ml;return Ev(t,s),t.digest()}function M_(s){const t=sl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=k_(s);else if(typeof Buffer<"u"&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=R_)i=z_(s);else return ld(s);else{if(s instanceof File)return ld(s);if(D_(s))i=U_(s);else{let r=s,l=E_;s instanceof Array&&(l=C_),s instanceof Map&&(l=x_,r=[...s.entries()]),s instanceof Set&&(l=__,r=[...s.entries()]),i=j_(r,l)}}return sl.set(s,i),i}function k_(s){const t=new ml;return t.update(w_),t.update(s.getTime()),t.digest()}function z_(s){const t=new ml;t.update(T_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new re(this.#t.filter(([i,r])=>t(i)))}negate(){return new re(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Rh(i,this.#t),Rh(i,t.getInner()),new re(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error("Expected tuple of length 2");const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!="string"&&typeof d!="number")return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+"|"+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new re(l)}#n(){const t=new r_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p=="string")r=!0;else if(typeof p=="number")l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new re(d)}extend(t){const i=t instanceof re?t.getInner():t;Rh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class L_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Mn{#t=[];sendData(t){t instanceof re||(t=new re(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new L_(t)}}class Cv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class ki extends Cv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class I_ extends Cv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class $d extends ki{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class H_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error("Graph already finalized")}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Mn;return new q_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error("Graph not finalized");for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class kn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class q_ extends kn{sendData(t){this.writer.sendData(t)}}class K_ extends ki{run(){const t=this.inputMessages();if(t.length===0)return;const i=new re;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function xv(){return s=>{const t=new kn(s.graph,new Mn),i=new K_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Ya=Symbol("NO_PREFIX");class P0 extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Wa(t),l=this.get(r);if(ec(l)){const[o,u]=l;if(Wa(o)!==r)throw new Error("Mismatching prefixes, this should never happen");if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Fs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Fs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ec(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(ec(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ec(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Wa(r);if(d!==Ya){const p=new P0;p.set(Ya,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Wa(r),p=Wa(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Ya&&d===Ya){const g=new Qa;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new P0;if(p===d){const m=new Qa;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new re(i)}}function Wa(s){return Array.isArray(s)&&(typeof s[0]=="string"||typeof s[0]=="number"||typeof s[0]=="bigint")?s[0]:Ya}function ec(s){return Array.isArray(s)}class V_ extends ki{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new re(i))}}function _v(s){return t=>{const i=new kn(t.graph,new Mn),r=new V_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class G_ extends ki{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new re(i))}}function $_(s=t=>t){return t=>{const i=new kn(t.graph,new Mn),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Y_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function gs(s){return t=>{const i=new kn(t.graph,new Mn),r=new Y_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const Q_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function xr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+" >= "+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error("trailing zero");if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(s.slice(1),null,i)}function Tv(s){if(s.length!==Av(s[0]))throw new Error("invalid integer part of order key: "+s)}function Av(s){if(s>="a"&&s<="z")return s.charCodeAt(0)-97+2;if(s>="A"&&s<="Z")return 90-s.charCodeAt(0)+2;throw new Error("invalid order key head: "+s)}function Fa(s){const t=Av(s[0]);if(t>s.length)throw new Error("invalid order key: "+s);return s.slice(0,t)}function tS(s,t){if(s==="A"+t[0].repeat(26))throw new Error("invalid order key: "+s);const i=Fa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error("invalid order key: "+s)}function eS(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i==="Z")return"a"+t[0];if(i==="z")return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>"a"?r.push(t[0]):r.pop(),o+r.join("")}else return i+r.join("")}function F_(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i==="a")return"Z"+t.slice(-1);if(i==="A")return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<"Z"?r.push(t.slice(-1)):r.pop(),o+r.join("")}else return i+r.join("")}function J_(s,t,i=Q_){if(s!=null&&tS(s,i),t!=null&&tS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+" >= "+t);if(s==null){if(t==null)return"a"+i[0];const p=Fa(t),g=t.slice(p.length);if(p==="A"+i[0].repeat(26))return p+xr("",g,i);if(p{const o=s(i,l);return o!==0?o:ad(t,r)}}class Yd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=o_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:iS(this.#t[r-1]),o=r===this.#t.length?null:iS(this.#t[r]),u=J_(l,o),d=nS(t,u);if(this.#t.splice(r,0,d),rthis.#e(sS(i),sS(r)))}}class Dv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Yd))throw new Error("Cannot move B+-tree implementation of TopK with fractional index");return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class X_ extends ki{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Ov(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Dv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new re(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new re(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function Z_(s,t){return i=>{const r=new kn(i.graph,new Mn),l=new X_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class W_ extends I_{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l,o="inner"){super(t,i,r,l),this.#n=o}run(){const t=Fs.fromMultiSets(this.inputAMessages()),i=Fs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new re;this.#n!=="anti"&&this.emitInnerResults(t,i,r),(this.#n==="left"||this.#n==="full"||this.#n==="anti")&&this.emitLeftOuterResults(t,i,r),(this.#n==="right"||this.#n==="full")&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function Rv(s,t="inner"){return i=>{if(i.graph!==s.graph)throw new Error("Cannot join streams from different graphs");const r=new kn(i.graph,new Mn),l=new W_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class P_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function fe(s){return t=>{const i=new kn(t.graph,new Mn),r=new P_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class tT extends ki{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function od(s){return t=>{const i=new kn(t.graph,new Mn),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function nT(s){return t=>{const i=new kn(t.graph,new Mn),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class sT extends ki{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Ov(l));this.#t=new Dv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new re(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new re(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function iT(s,t){const i=t||{};return r=>{const l=new kn(r.graph,new Mn),o=new sT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function rS(s){return"pipe"in s}function aS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!rS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>rS(l))),r=>{const l="__original_key__";return r.pipe(fe(d=>{const p=s(d),g=nl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(_v(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const w=d.map(([b,E])=>[b[y],E]);g[y]=v.reduce(w)}return[[g,1]]})).pipe(fe(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function rT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function aT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function oT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const uT={sum:rT,count:aT,avg:lT,min:oT,max:cT};function fT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Z_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),xv())}function hT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),xv())}function dT(s,t){return hT(iT,s,t)}const kh="__virtual_synced__",zh="__virtual_has_local__";function lS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l==="$selected")continue;const u=o,d="$synced"in u,p="$origin"in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin==="local"&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:pT,count:gT,avg:yT,min:mT,max:ST}=uT;function vT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type==="agg"||Ur(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ax(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function oS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,b])=>lS(b).synced,reduce:b=>{for(const[E,T]of b)if(!E&&T>0)return!1;return!0}},[zh]:{preMap:([,b])=>lS(b).hasLocal,reduce:b=>{for(const[E,T]of b)if(E&&T>0)return!0;return!1}}};if(t.length===0){const b=d,E={},T={value:0};if(r){for(const[R,O]of Object.entries(r))if(O.type==="agg")b[R]=Qo(O);else if(Ur(O)){const{transformed:k,extracted:$}=cd(O,T);for(const[z,I]of Object.entries($))b[z]=Qo(I);E[R]=pe(k)}}const B=u?([,R])=>({__singleGroup:!0,__correlationKey:R?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(aS(B,b)),s=s.pipe(fe(([,R])=>{const k={...R.$selected||{}};if(r){for(const[F,nt]of Object.entries(r))nt.type==="agg"&&(k[F]=R[F]);cS(k,R,E)}const $=u?R.__correlationKey:void 0,z=$!==void 0?`single_group_${nl($)}`:"single_group",I={...R,$selected:k},X=R[kh],tt=R[zh];return I.$synced=X??!0,I.$origin=tt?"local":"remote",I.$key=z,I.$collectionId=o??I.$collectionId,u&&$!==void 0&&(I[u]={__correlationKey:$}),[z,I]})),i&&i.length>0)for(const R of i){const O=K0(R),k=gc(O,r||{},"$selected"),$=pe(k);s=s.pipe(gs(([,z])=>{const I={$selected:z.$selected};return Tr($(I))}))}if(l&&l.length>0)for(const R of l)s=s.pipe(gs(([,O])=>{const k={$selected:O.$selected};return Tr(R(k))}));return s}const p=vT(t,r),g=t.map(b=>pe(b)),m=([,b])=>{const E={...b};delete E.$selected;const T={};for(let B=0;B{const E=b.$selected||{},T={};if(r){for(const[I,X]of Object.entries(r))if(X.type==="agg")T[I]=b[I];else if(!v[I]){const tt=p.selectToGroupByIndex.get(I);tt!==void 0?T[I]=b[`__key_${tt}`]:T[I]=E[I]}cS(T,b,v)}else for(let I=0;I0)for(const b of i){const E=K0(b),T=gc(E,r||{}),B=pe(T);s=s.pipe(gs(([,R])=>{const O={$selected:R.$selected};return B(O)}))}if(l&&l.length>0)for(const b of l)s=s.pipe(gs(([,E])=>{const T={$selected:E.$selected};return Tr(b(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case"ref":return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case"val":return s.value===t.value;case"func":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case"agg":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Qo(s){const t=pe(s.args[0]),i=([,o])=>{const u=t(o);return typeof u=="number"?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u=="number"||typeof u=="string"||typeof u=="bigint"||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case"sum":return pT(i);case"count":return gT(l);case"avg":return yT(i);case"min":return mT(r);case"max":return ST(r);default:throw new Ox(s.name)}}function gc(s,t,i="$selected"){switch(s.type){case"agg":{const r=s;for(const[l,o]of Object.entries(t))if(o.type==="agg"&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case"func":{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case"ref":return s;case"val":return s;default:throw new Rx(s.type)}}function cS(s,t,i){for(const r of Object.keys(t))r.startsWith("__agg_")&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith("__agg_")&&delete s[r]}function Ur(s){return zr(s)?s.type==="agg"?!0:s.type==="func"&&"args"in s?s.args.some(t=>Ur(t)):!1:!1}function cd(s,t){if(s.type==="agg"){const i=`__agg_${t.value++}`;return{transformed:new Me(["$selected",i]),extracted:{[i]:s}}}if(s.type==="func"){const i={},r=s.args.map(l=>{const o=cd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function wT(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,"$selected");return{compiledExpression:pe(T),compareOptions:ud(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(B=>B.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const B=E,R=T;for(let O=0;O1?String(k.path[0]):s.from.alias}}if(B){const z=i.every(F=>F.expression.type==="ref")?i.map(F=>{const nt=F.expression,st=el(s,nt,l);return pe(st?new Me(st.path):F.expression,!0)}):void 0;b={alias:R,offset:p??0,limit:d,comparator:(F,nt)=>{if(i.length===1){const st=F&&B(F),xt=nt&&B(nt);return v(st,xt)}if(z){const st=xt=>xt&&z.map(Kt=>Kt(xt));return v(st(F),st(nt))}return 0},valueExtractorForRawRow:F=>{if(i.length===1)return B(F);if(z)return z.map(nt=>nt(F))},firstColumnValueExtractor:B,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=b,w=F=>{o[tt].dataNeeded=()=>{const nt=F();return Math.max(0,b.limit-nt)}}}}return g?t.pipe(fT(y,{limit:d,offset:p,comparator:v,setSizeCallback:w,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),b&&(b.offset=T.offset??b.offset,b.limit=T.limit??b.limit)})}})):t.pipe(dT(y,{limit:d,offset:p,comparator:v,setSizeCallback:w,setWindowFn:E=>{u(T=>{E(T),b&&(b.offset=T.offset??b.offset,b.limit=T.limit??b.limit)})}}))}function ud(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function ET(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:"insert",key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error("limit cannot be used without orderBy");if(t.orderBy){const r=t.where?Pa(t.where):void 0,l=xT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Zx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=Pa(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:""}Error processing where clause, falling back to full scan:`,r);const l=Pa(t.where);return t.optimizedOnly?void 0:i(l)}}function Pa(s){const t=Sv(s);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function CT(s,t){const i=Pa(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type==="insert")i(o.value)&&l.push(o);else if(o.type==="update"){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:"insert"}):!u&&d&&l.push({...o,type:"delete",value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function xT(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type==="ref"){const y=g.path,v=ud(p,s);Bc(y[0],y,s,v);const w=yl(s,y,v);if(w&&w.supports("gt")){const b=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return w.takeFromStart(i??w.keyCount,b)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Za(m.compareOptions),v=uS(p.value,m.expression),w=uS(g.value,m.expression),b=y(v,w);if(b!==0)return b}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function uS(s,t){if(t.type==="ref"){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type==="val"?t.value:Sv(t)(s)}class fS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ad(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const nc="__tanstack_db_direct";class _T{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state==="persisting"){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(R=>R.truncate)?.optimisticSnapshot:null;let y,v;const w=new Set;for(const R of r){for(const O of R.operations)w.add(O.key);for(const[O]of R.rowMetadataWrites)w.add(O)}let b=this.preSyncVisibleState;if(b.size===0){b=new Map;for(const R of w){const O=this.get(R);O!==void 0&&b.set(R,O)}}const E=[],T=this.config.sync.rowUpdateMode||"partial",B=new Map;for(const R of this.transactions.values())if(R.state==="completed")for(const O of R.mutations)this.isThisCollection(O.collection)&&O.optimistic&&B.set(O.key,{type:O.type,value:O.modified});for(const R of r){if(R.truncate){const O=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const k of O){if(m?.deletes.has(k))continue;const $=m?.upserts.get(k)||this.syncedData.get(k);$!==void 0&&E.push({type:"delete",key:k,value:$})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const k of w)b.delete(k);this._events.emit("truncate",{type:"truncate",collection:this.collection})}for(const O of R.operations){const k=O.key;this.syncedKeys.add(k);const $=this.isLocalOnly||this.pendingLocalChanges.has(k)||this.pendingLocalOrigins.has(k)||y?.has(k)===!0||v?.has(k)===!0?"local":"remote";switch(O.type){case"insert":this.syncedData.set(k,O.value),this.rowOrigins.set(k,$),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break;case"update":{if(T==="partial"){const z=Object.assign({},this.syncedData.get(k),O.value);this.syncedData.set(k,z)}else this.syncedData.set(k,O.value);this.rowOrigins.set(k,$),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break}case"delete":this.syncedData.delete(k),this.syncedMetadata.delete(k),this.rowOrigins.delete(k),this.pendingLocalChanges.delete(k),this.pendingLocalOrigins.delete(k),this.pendingOptimisticUpserts.delete(k),this.pendingOptimisticDeletes.delete(k),this.pendingOptimisticDirectUpserts.delete(k),this.pendingOptimisticDirectDeletes.delete(k);break}}for(const[O,k]of R.rowMetadataWrites){if(k.type==="delete"){this.syncedMetadata.delete(O);continue}this.syncedMetadata.set(O,k.value)}for(const[O,k]of R.collectionMetadataWrites){if(k.type==="delete"){this.syncedCollectionMetadata.delete(O);continue}this.syncedCollectionMetadata.set(O,k.value)}}if(o){const R=new Set;for(const $ of r)for(const z of $.operations)(z.type==="insert"||z.type==="update")&&R.add(z.key);const O=new Map(m.upserts),k=new Set(m.deletes);for(const[$,z]of O)if(!k.has($))if(R.has($)){let I=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===$&&tt.type==="insert"){tt.value=z,I=!0;break}}I||E.push({type:"insert",key:$,value:z})}else E.push({type:"insert",key:$,value:z});if(E.length>0&&k.size>0){const $=[];for(const z of E)z.type==="insert"&&k.has(z.key)||$.push(z);E.length=0,E.push(...$)}this.lifecycle.status!=="ready"&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[R,O]of m.upserts)this.optimisticUpserts.set(R,O);for(const R of m.deletes)this.optimisticDeletes.add(R)}for(const R of this.transactions.values())if(!["completed","failed"].includes(R.state)){for(const O of R.mutations)if(this.isThisCollection(O.collection)&&O.optimistic)switch(O.type){case"insert":case"update":this.optimisticUpserts.set(O.key,O.modified),this.optimisticDeletes.delete(O.key);break;case"delete":this.optimisticUpserts.delete(O.key),this.optimisticDeletes.add(O.key);break}}for(const R of w){const O=b.get(R),k=this.get(R),$=this.getVirtualPropsSnapshotForState(R,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:B}),z=this.getVirtualPropsSnapshotForState(R),I=$.$synced!==z.$synced||$.$origin!==z.$origin,X=O!==void 0?Z0(O,R,this.collection.id,()=>$.$synced,()=>$.$origin):void 0,tt=B.get(R);let F=!1;tt&&(tt.type==="delete"&&O!==void 0&&k===void 0&&Hn(tt.value,O)||k!==void 0&&Hn(tt.value,k))&&(F=!0);const nt=I&&O!==void 0&&k!==void 0&&Hn(O,k);if(!(F&&!nt))if(O===void 0&&k!==void 0){const st=B.get(R);if(st){const xt=st.value,Kt=Z0(xt,R,this.collection.id,()=>$.$synced,()=>$.$origin);E.push({type:"update",key:R,value:k,previousValue:Kt})}else E.push({type:"insert",key:R,value:k})}else O!==void 0&&k===void 0?E.push({type:"delete",key:R,value:X??O}):O!==void 0&&k!==void 0&&(!Hn(O,k)||nt)&&E.push({type:"update",key:R,value:k,previousValue:X??O})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new fS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new fS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?"local":this.rowOrigins.get(t)??"remote"}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:"local"});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?"local":(i?.rowOrigins??this.rowOrigins).get(t)??"remote"})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[nc]===!0;if(y.state==="completed"){for(const w of y.mutations)if(this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.add(w.key),!!w.optimistic))switch(w.type){case"insert":case"update":this.pendingOptimisticUpserts.set(w.key,w.modified),this.pendingOptimisticDeletes.delete(w.key),v?(this.pendingOptimisticDirectUpserts.add(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break;case"delete":this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.add(w.key),v?(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.add(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break}}else if(y.state==="failed")for(const w of y.mutations)this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.delete(w.key),w.optimistic&&(this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.delete(w.key),this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())["completed","failed"].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case"insert":case"update":this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case"delete":this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const w of this.pendingSyncedTransactions)for(const b of w.operations)y.add(b.key);const v=m.filter(w=>!(w.type==="delete"&&y.has(w.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===w.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:"delete",key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:"insert",key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:"update",key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state==="completed"){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Mv(){const s=new Map;function t(i){const r=i.join(".");if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return i;if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Si(s){const t=new Map;let i=0;function r(o){const u=o.join(".");if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return o;if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(".")}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return[];if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"||typeof u=="string"&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,"__refProxy","__path","__type"]},getOwnPropertyDescriptor(o,u){if(u==="__refProxy"||u==="__path"||u==="__type")return{enumerable:!1,configurable:!0};if(typeof u=="string"&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function hS(s){const t=Si(s),i=new Map;function r(o){const u=o.join(".");if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return["$selected",...o];if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u==="$selected"?l:Reflect.get(o,u,d)},has(o,u){return u==="$selected"?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),"$selected"]},getOwnPropertyDescriptor(o,u){return u==="$selected"?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ae(s){return sc(s)?new Me(s.__path):s&&typeof s=="object"&&"type"in s&&(s.type==="func"||s.type==="ref"||s.type==="val"||s.type==="agg")?s:new Be(s)}function sc(s){return s&&typeof s=="object"&&s.__refProxy===!0}function fd(s,t){return new Je("eq",[ae(s),ae(t)])}function dS(s,t){return new Je("gt",[ae(s),ae(t)])}function TT(s,t){return new Je("gte",[ae(s),ae(t)])}function hd(s,t){return new Je("lt",[ae(s),ae(t)])}function dd(s,t,...i){const r=[s,t,...i];return new Je("and",r.map(l=>ae(l)))}function AT(s,t,...i){const r=[s,t,...i];return new Je("or",r.map(l=>ae(l)))}function OT(s,t){return new Je("in",[ae(s),ae(t)])}class DT{constructor(t){this.query=t}}class RT{constructor(t){this.query=t}}class kv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function MT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction==="asc"?dS:hd)(r,new Be(t[0]))}const i=[];for(let r=0;rdd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>AT(r,l))}class kT extends kv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status="ready",this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on("unsubscribed",o=>r.onUnsubscribe(o)),r.whereExpression&&s_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?CT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on("truncate",()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner("status:change",{type:"status:change",subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus("loadingSubset"),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus("ready")}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if("where"in t){const p=t.where;if(i.where){const g=i.where,m=dd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error("limit is required");if(!this.orderByIndex)throw new Error("Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.");const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?Pa(y):void 0,w=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const F=this.collection.get(tt);return F===void 0?!1:v?.(F)??!0};let b=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],F=this.collection.currentStateAsChanges({where:fd(tt,new Be(g))});if(F){const nt=F.map(xt=>xt.key).filter(xt=>!this.sentKeys.has(xt)&&w(xt));T.push(...nt);const st=m.take(i-T.length,g,w);T.push(...st)}else T=m.take(i,g,w)}else T=m.takeFromStart(i,w);const B=()=>Math.max(i-E.length,0),R=()=>T.length===0,O=t[0].expression,k=O.type==="ref"?pe(new Me(O.path),!0):null;for(;B()>0&&!R();){const tt=new Set;for(const F of T){const nt=this.collection.get(F);E.push({type:"insert",key:F,value:nt}),b=k?k(nt):nt,tt.add(F)}T=m.take(B(),b,w)}const $=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let z;if(r!==void 0&&r.length>0){const tt=MT(t,r);if(tt){const{expression:F}=t[0],nt=r[0];let st;if(nt instanceof Date){const xt=new Date(nt.getTime()+1);st=dd(TT(F,new Be(nt)),hd(F,new Be(xt)))}else st=fd(F,new Be(nt));z={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const I={where:y,limit:i,orderBy:t,cursor:z,offset:l??$,subscription:this},X=this.collection._sync.loadSubset(I);u?.(X),this.loadedSubsets.push(I),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type==="insert")continue;l.type==="delete"&&this.sentKeys.delete(l.key)}else{if(l.type==="update")o={...l,type:"insert",previousValue:void 0};else if(l.type==="delete"&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type==="delete"?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner("unsubscribed",{type:"unsubscribed",subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error("Cannot specify both 'where' and 'whereExpression' options. Use one or the other.");const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Mv(),p=r(d);o=ae(p)}const u=new kT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on("status:change",i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status==="cleaned-up"||this.lifecycle.status==="idle")&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new LC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const UT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),jT=s=>{clearTimeout(s)},NT=typeof window<"u"&&"requestIdleCallback"in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>UT(s),Uh=typeof window<"u"&&"cancelIdleCallback"in window?s=>window.cancelIdleCallback(s):jT,zv=class hs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return hs.instance||(hs.instance=new hs),hs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error("Error in CleanupQueue task:",l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){hs.instance&&(hs.instance.timeoutId!==null&&clearTimeout(hs.instance.timeoutId),hs.instance=null)}};zv.instance=null;let jh=zv;class BT{constructor(t,i){this.status="idle",this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:["loading","error","cleaned-up"],loading:["ready","error","cleaned-up"],ready:["cleaned-up","error"],error:["cleaned-up","idle"],"cleaned-up":["loading","error"]}[t].includes(i))throw new NC(t,i,this.id)}setStatus(t,i=!1){if(t==="ready"&&!i)throw new gl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case"error":throw new jC(t,this.id);case"cleaned-up":this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,"ready"),this.status==="loading"){if(this.setStatus("ready",!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Uh(this.idleCallbackId),this.idleCallbackId=NT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:""}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus("cleaned-up"),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Qd=Symbol("liveQueryInternal");class LT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??"eager"}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!=="idle"&&this.lifecycle.status!=="cleaned-up")){this.lifecycle.setStatus("loading");try{const t=IT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;"key"in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type==="insert"){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o="update";else{const w=this.config.utils[Qd];throw new KC(l,this.id,{hasCustomGetKey:w?.hasCustomGetKey??!1,hasJoins:w?.hasJoins??!1,hasDistinct:w?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o==="delete"?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:"delete"})):o==="insert"?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:"set",value:u.metadata}):r.rowMetadataWrites.set(l,{type:"delete"}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:"set",value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new sx;if(i.committed)throw new ix;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode==="on-demand"&&!this.syncLoadSubsetFn)throw new Di(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus("error"),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type==="delete"?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"delete"})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type==="delete"?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"delete"})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type==="delete"?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode==="on-demand"&&console.warn(`${this.id?`[${this.id}] `:""}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status==="ready"){t();return}if(this.lifecycle.status==="error"){i(new BC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status==="idle"||this.lifecycle.status==="cleaned-up")try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:"start"}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:"end"})})}loadSubset(t){if(this.syncMode==="eager")return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new F0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new F0(this.id,t)})}this.preloadPromise=null}}function IT(s){if(typeof s=="function")return{cleanup:s};if(typeof s=="object")return s}const pS=1;function ic(s,t){return s===t?0:sQs(r)??null);if(s instanceof Date)return{__type:"date",value:s.toISOString()};if(s instanceof Set)return{__type:"set",values:Array.from(s).map(l=>Qs(l)??null).sort((l,o)=>ic(bi(l),bi(o)))};if(s instanceof Map)return{__type:"map",entries:Array.from(s.entries()).map(([l,o])=>({key:Qs(l)??null,value:Qs(o)??null})).sort((l,o)=>ic(bi(l.key),bi(o.key)))};if(s instanceof RegExp)return{__type:"regexp",value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>ic(r,l));for(const[r,l]of i){const o=Qs(l);o!==void 0&&(t[r]=o)}return t}function bi(s){return s===null?"null":Array.isArray(s)?`[${s.map(bi).join(",")}]`:typeof s!="object"?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>ic(r,l)).map(r=>`${JSON.stringify(r)}:${bi(s[r])}`).join(",")}}`}function qT(s,t,i,r,l){const o=HT(r),u=Qs(t)??null,d=Qs(l),g=Qs({signatureVersion:pS,expression:u,options:d??null})??null,m=bi(g);return{signatureVersion:pS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function pd(s){if(s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(i=>pd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=pd(r);return t}function KT(s){return JSON.parse(JSON.stringify(s))}class VT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable("createIndex");const r=++this.indexCounter,l=Mv(),o=t(l),u=ae(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Di(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name="QueryCompilationError"}}class ux extends Le{constructor(){super("DISTINCT requires a SELECT clause.")}}class fx extends Le{constructor(){super("fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().")}}class hx extends Le{constructor(){super("Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).")}}class dx extends Le{constructor(){super("HAVING clause requires GROUP BY clause")}}class px extends Le{constructor(){super("LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results")}}class yv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(", ")}`:"";super(`Input for ${l} not found in inputs map${o}`)}}class gx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(", ")}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class yx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class mx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class Sx extends Le{constructor(){super("Reference path cannot be empty")}}class vx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class Q0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Ri extends En{constructor(t){super(t),this.name="JoinError"}}class wx extends Ri{constructor(t){super(`Unsupported join type: ${t}`)}}class bx extends Ri{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Ex extends Ri{constructor(){super("Invalid join condition: expressions must reference source aliases")}}class Cx extends Ri{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class xx extends Ri{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class _x extends Ri{constructor(){super("Invalid join condition")}}class Tx extends Ri{constructor(t){super(`Unsupported join source type: ${t}`)}}class jc extends En{constructor(t){super(t),this.name="GroupByError"}}class Ax extends jc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Ox extends jc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends jc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Rx extends jc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class F0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name="SyncCleanupError"}}class Mx extends En{constructor(t){super(t),this.name="QueryOptimizerError"}}class kx extends Mx{constructor(){super("Cannot combine empty expression list")}}class Ux extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(", ")}. This indicates a bug in alias tracking.`)}}class zx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(", ")}. This indicates a bug in query compilation. Please report this issue.`)}}class jx extends Le{constructor(){super("setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.")}}function Hn(s,t){return Po(s,t,new Map)}function Po(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&Po(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!="object"))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;oPo(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s=="object"){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&Po(s[u],t[u],i));return i.delete(s),o}return!1}const Nx=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function Xs(s){if(s==null||typeof s!="object")return!1;const t=s[Symbol.toStringTag];return typeof t=="string"&&Nx.has(t)}const mv={direction:"asc",nulls:"first",stringSort:"locale"},Th=new WeakMap;let Bx=1;function J0(s){if(Th.has(s))return Th.get(s);const t=Bx++;return Th.set(s,t),t}const Kd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r==="first"?-1:1;if(t==null)return r==="first"?1:-1;if(typeof s=="string"&&typeof t=="string"&&i.stringSort==="locale")return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s=="object",o=typeof t=="object";if(l||o){if(l&&o){const u=J0(s),d=J0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Lx=(s,t,i)=>Kd(t,s,{...i,nulls:i.nulls==="first"?"last":"first"});function Za(s){return(t,i)=>s.direction==="asc"?Kd(t,i,s):Lx(t,i,s)}const Ix=Za({direction:"asc",nulls:"first",stringSort:"locale"});function Hx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case"ref":return t?$x(s):Gx(s);case"func":return Yx(s,t);default:throw new mx(s.type)}}function Gx(s){const[t,...i]=s.path;if(!t)throw new Sx;if(t==="$selected"){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function $x(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Yx(s,t){const i=s.args.map(r=>Vd(r,t));switch(s.name){case"eq":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return Se(u)||Se(d)?null:Kx(u,d)}}case"gt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u>d}}case"gte":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u>=d}}case"lt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u<=d}}case"and":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;Se(u)&&(l=!0)}return l?null:!0};case"or":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;Se(u)&&(l=!0)}return l?null:!1};case"not":{const r=i[0];return l=>{const o=r(l);return Se(o)?null:!o}}case"in":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return Se(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case"like":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:X0(u,d,!1)}}case"ilike":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:X0(u,d,!0)}}case"upper":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toUpperCase():o}}case"lower":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toLowerCase():o}}case"length":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"||Array.isArray(o)?o.length:0}}case"concat":return r=>i.map(l=>{const o=l(r);try{return String(o??"")}catch{try{return JSON.stringify(o)||""}catch{return"[object]"}}}).join("");case"coalesce":return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case"add":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case"subtract":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case"multiply":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case"divide":{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case"date":{const r=i[0];return l=>{const o=r(l),u=Ah(o);return u?u.toISOString().slice(0,10):null}}case"datetime":{const r=i[0];return l=>{const o=r(l),u=Ah(o);return u?u.toISOString():null}}case"strftime":{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!="string")return null;const d=l(o),p=Ah(d);return p?Vx(u,p):null}}case"isUndefined":{const r=i[0];return l=>r(l)===void 0}case"isNull":{const r=i[0];return l=>r(l)===null}default:throw new vx(s.name)}}function X0(s,t,i){if(typeof s!="string"||typeof t!="string")return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return o=o.replace(/%/g,".*"),o=o.replace(/_/g,"."),new RegExp(`^${o}$`,"s").test(r)}class Qx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t==="gt"?"lt":t==="gte"?"lte":t==="lt"?"gt":t==="lte"?"gte":t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function Z0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const rd=["$synced","$origin","$key","$collectionId"];function Fx(s){return rd.includes(s)}function vv(s){return s.some(t=>Fx(t))}function yl(s,t,i){if(vv(t))return;const r=i??{...mv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Qx(l)}function Jx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split("."),u=yl(t,o);if(u&&u.supports("gt")&&u.supports("lt")){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case"gt":(d===void 0||b>d)&&(d=b,g=!1);break;case"gte":(d===void 0||b>d)&&(d=b,g=!0);break;case"lt":(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Jx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function e_(s,t){if(s.type!=="func"||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=Gd(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!=="func"||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type==="ref"&&r.type==="val"&&Array.isArray(r.value)){const l=i.path,o=r.value,u=yl(t,l);if(u){if(u.supports("in"))return{canOptimize:!0,matchingKeys:u.lookup("in",o)};if(u.supports("eq")){const d=new Set;for(const p of o){const g=u.lookup("eq",p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function wv(s){return s.config.autoIndex==="eager"}function Nc(s,t,i,r,l){if(vv(t)||!wv(i))return;const o=r??{...mv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(".")}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:""}Failed to create auto-index for field path "${t.join(".")}":`,d)}}function s_(s,t){if(!wv(t))return;const i=i_(s);for(const{fieldName:r,fieldPath:l}of i)Nc(r,l,t)}function i_(s){const t=[];function i(r){if(r.type!=="func")return;const l=r;if(l.name==="and"){for(const g of l.args)i(g);return}if(!["eq","gt","gte","lt","lte","in"].includes(l.name)||l.args.length<1||l.args[0].type!=="ref")return;const d=l.args[0].path;if(d.length===0)return;const p=d.join("_");t.push({fieldName:p,fieldPath:d})}return i(s),t}class r_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Oh=3e4;function Dh(s,t){if(t.length<=Oh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class l_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!="object"||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s=="string"?-1:1}function nl(s){return JSON.stringify(s,(t,i)=>typeof i=="bigint"?i.toString():i instanceof Date?i.toISOString():i)}const c_=be(),u_=be(),f_=be(),h_=be(),d_=be();function be(){return Math.random()*(2**31-1)>>>0}const bv=new ArrayBuffer(8),p_=new DataView(bv),$s=new Uint8Array(bv);class ml{constructor(){this.hash=c_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case"symbol":{this.update(d_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case"string":this.update(u_);for(let i=0;i>>8&255)}return;case"number":p_.setFloat64(0,t,!0),this.writeByte($s[0]),this.writeByte($s[1]),this.writeByte($s[2]),this.writeByte($s[3]),this.writeByte($s[4]),this.writeByte($s[5]),this.writeByte($s[6]),this.writeByte($s[7]);return;case"bigint":{let i=t;for(i<0n?(i=-i,this.update(h_)):this.update(f_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const g_=be(),y_=be(),m_=be(),S_=be(),v_=be(),w_=be(),b_=be(),E_=be(),C_=be(),x_=be(),__=be(),T_=be(),A_=be(),O_=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function D_(s){const t=s[Symbol.toStringTag];return typeof t=="string"&&O_.has(t)}const R_=128,sl=new WeakMap;function Ne(s){const t=new ml;return Ev(t,s),t.digest()}function M_(s){const t=sl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=k_(s);else if(typeof Buffer<"u"&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=R_)i=U_(s);else return ld(s);else{if(s instanceof File)return ld(s);if(D_(s))i=z_(s);else{let r=s,l=E_;s instanceof Array&&(l=C_),s instanceof Map&&(l=x_,r=[...s.entries()]),s instanceof Set&&(l=__,r=[...s.entries()]),i=j_(r,l)}}return sl.set(s,i),i}function k_(s){const t=new ml;return t.update(b_),t.update(s.getTime()),t.digest()}function U_(s){const t=new ml;t.update(T_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ie(this.#t.filter(([i,r])=>t(i)))}negate(){return new ie(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new ie(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error("Expected tuple of length 2");const[u,d]=o;return`${Rh.getStringId(u)}|${Rh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!="string"&&typeof d!="number")return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Rh.getStringId(p);const m=d+"|"+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ie(l)}#n(){const t=new r_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p=="string")r=!0;else if(typeof p=="number")l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new ie(d)}extend(t){const i=t instanceof ie?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class L_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Mn{#t=[];sendData(t){t instanceof ie||(t=new ie(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new L_(t)}}class Cv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Mi extends Cv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class I_ extends Cv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class $d extends Mi{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class H_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error("Graph already finalized")}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Mn;return new q_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error("Graph not finalized");for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class kn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class q_ extends kn{sendData(t){this.writer.sendData(t)}}class K_ extends Mi{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ie;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function xv(){return s=>{const t=new kn(s.graph,new Mn),i=new K_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Ya=Symbol("NO_PREFIX");class P0 extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Wa(t),l=this.get(r);if(tc(l)){const[o,u]=l;if(Wa(o)!==r)throw new Error("Mismatching prefixes, this should never happen");if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Qs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Qs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(tc(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(tc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(tc(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Wa(r);if(d!==Ya){const p=new P0;p.set(Ya,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Wa(r),p=Wa(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Ya&&d===Ya){const g=new Qa;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new P0;if(p===d){const m=new Qa;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ie(i)}}function Wa(s){return Array.isArray(s)&&(typeof s[0]=="string"||typeof s[0]=="number"||typeof s[0]=="bigint")?s[0]:Ya}function tc(s){return Array.isArray(s)}class V_ extends Mi{#t=new Qs;#e=new Qs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ie(i))}}function _v(s){return t=>{const i=new kn(t.graph,new Mn),r=new V_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class G_ extends Mi{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ie(i))}}function $_(s=t=>t){return t=>{const i=new kn(t.graph,new Mn),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Y_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ps(s){return t=>{const i=new kn(t.graph,new Mn),r=new Y_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const Q_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function xr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+" >= "+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error("trailing zero");if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(s.slice(1),null,i)}function Tv(s){if(s.length!==Av(s[0]))throw new Error("invalid integer part of order key: "+s)}function Av(s){if(s>="a"&&s<="z")return s.charCodeAt(0)-97+2;if(s>="A"&&s<="Z")return 90-s.charCodeAt(0)+2;throw new Error("invalid order key head: "+s)}function Fa(s){const t=Av(s[0]);if(t>s.length)throw new Error("invalid order key: "+s);return s.slice(0,t)}function tS(s,t){if(s==="A"+t[0].repeat(26))throw new Error("invalid order key: "+s);const i=Fa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error("invalid order key: "+s)}function eS(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i==="Z")return"a"+t[0];if(i==="z")return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>"a"?r.push(t[0]):r.pop(),o+r.join("")}else return i+r.join("")}function F_(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i==="a")return"Z"+t.slice(-1);if(i==="A")return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<"Z"?r.push(t.slice(-1)):r.pop(),o+r.join("")}else return i+r.join("")}function J_(s,t,i=Q_){if(s!=null&&tS(s,i),t!=null&&tS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+" >= "+t);if(s==null){if(t==null)return"a"+i[0];const p=Fa(t),g=t.slice(p.length);if(p==="A"+i[0].repeat(26))return p+xr("",g,i);if(p{const o=s(i,l);return o!==0?o:ad(t,r)}}class Yd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=o_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:iS(this.#t[r-1]),o=r===this.#t.length?null:iS(this.#t[r]),u=J_(l,o),d=nS(t,u);if(this.#t.splice(r,0,d),rthis.#e(sS(i),sS(r)))}}class Dv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Yd))throw new Error("Cannot move B+-tree implementation of TopK with fractional index");return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function fc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class X_ extends Mi{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Ov(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Dv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>fc(d,r)),u.moveOuts.forEach(d=>hc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ie(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ie(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);fc(d.moveIn,l),hc(d.moveOut,l),this.#l(o,u)}}function Z_(s,t){return i=>{const r=new kn(i.graph,new Mn),l=new X_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class W_ extends I_{#t=new Qs;#e=new Qs;#n;constructor(t,i,r,l,o="inner"){super(t,i,r,l),this.#n=o}run(){const t=Qs.fromMultiSets(this.inputAMessages()),i=Qs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ie;this.#n!=="anti"&&this.emitInnerResults(t,i,r),(this.#n==="left"||this.#n==="full"||this.#n==="anti")&&this.emitLeftOuterResults(t,i,r),(this.#n==="right"||this.#n==="full")&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function Rv(s,t="inner"){return i=>{if(i.graph!==s.graph)throw new Error("Cannot join streams from different graphs");const r=new kn(i.graph,new Mn),l=new W_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class P_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ue(s){return t=>{const i=new kn(t.graph,new Mn),r=new P_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class tT extends Mi{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function od(s){return t=>{const i=new kn(t.graph,new Mn),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function nT(s){return t=>{const i=new kn(t.graph,new Mn),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class sT extends Mi{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Ov(l));this.#t=new Dv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>fc(o,r)),l.moveOuts.forEach(o=>hc(o,r)),l.changes&&this.output.sendData(new ie(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ie(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);fc(o.moveIn,l),hc(o.moveOut,l)}}function iT(s,t){const i=t||{};return r=>{const l=new kn(r.graph,new Mn),o=new sT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function rS(s){return"pipe"in s}function aS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!rS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>rS(l))),r=>{const l="__original_key__";return r.pipe(ue(d=>{const p=s(d),g=nl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(_v(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ue(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function rT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function aT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function oT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const uT={sum:rT,count:aT,avg:lT,min:oT,max:cT};function fT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Z_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),xv())}function hT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),xv())}function dT(s,t){return hT(iT,s,t)}const Mh="__virtual_synced__",kh="__virtual_has_local__";function lS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l==="$selected")continue;const u=o,d="$synced"in u,p="$origin"in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin==="local"&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:pT,count:gT,avg:yT,min:mT,max:ST}=uT;function vT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type==="agg"||zr(o))continue;const u=r.findIndex(d=>dc(o,d));if(u===-1)throw new Ax(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function oS(s,t,i,r,l,o,u){const d={[Mh]:{preMap:([,w])=>lS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[kh]:{preMap:([,w])=>lS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[R,A]of Object.entries(r))if(A.type==="agg")w[R]=Qo(A);else if(zr(A)){const{transformed:z,extracted:I}=cd(A,T);for(const[H,K]of Object.entries(I))w[H]=Qo(K);E[R]=de(z)}}const N=u?([,R])=>({__singleGroup:!0,__correlationKey:R?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(aS(N,w)),s=s.pipe(ue(([,R])=>{const z={...R.$selected||{}};if(r){for(const[J,nt]of Object.entries(r))nt.type==="agg"&&(z[J]=R[J]);cS(z,R,E)}const I=u?R.__correlationKey:void 0,H=I!==void 0?`single_group_${nl(I)}`:"single_group",K={...R,$selected:z},X=R[Mh],tt=R[kh];return K.$synced=X??!0,K.$origin=tt?"local":"remote",K.$key=H,K.$collectionId=o??K.$collectionId,u&&I!==void 0&&(K[u]={__correlationKey:I}),[H,K]})),i&&i.length>0)for(const R of i){const A=K0(R),z=pc(A,r||{},"$selected"),I=de(z);s=s.pipe(ps(([,H])=>{const K={$selected:H.$selected};return Tr(I(K))}))}if(l&&l.length>0)for(const R of l)s=s.pipe(ps(([,A])=>{const z={$selected:A.$selected};return Tr(R(z))}));return s}const p=vT(t,r),g=t.map(w=>de(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type==="agg")T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}cS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=K0(w),T=pc(E,r||{}),N=de(T);s=s.pipe(ps(([,R])=>{const A={$selected:R.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ps(([,E])=>{const T={$selected:E.$selected};return Tr(w(T))}));return s}function dc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case"ref":return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case"val":return s.value===t.value;case"func":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>dc(i,t.args[r]));case"agg":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>dc(i,t.args[r]));default:return!1}}function Qo(s){const t=de(s.args[0]),i=([,o])=>{const u=t(o);return typeof u=="number"?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u=="number"||typeof u=="string"||typeof u=="bigint"||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case"sum":return pT(i);case"count":return gT(l);case"avg":return yT(i);case"min":return mT(r);case"max":return ST(r);default:throw new Ox(s.name)}}function pc(s,t,i="$selected"){switch(s.type){case"agg":{const r=s;for(const[l,o]of Object.entries(t))if(o.type==="agg"&&wT(r,o))return new Me([i,l]);throw new Dx(r.name)}case"func":{const r=s,l=r.args.map(o=>pc(o,t));return new Je(r.name,l)}case"ref":return s;case"val":return s;default:throw new Rx(s.type)}}function cS(s,t,i){for(const r of Object.keys(t))r.startsWith("__agg_")&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith("__agg_")&&delete s[r]}function zr(s){return Ur(s)?s.type==="agg"?!0:s.type==="func"&&"args"in s?s.args.some(t=>zr(t)):!1:!1}function cd(s,t){if(s.type==="agg"){const i=`__agg_${t.value++}`;return{transformed:new Me(["$selected",i]),extracted:{[i]:s}}}if(s.type==="func"){const i={},r=s.args.map(l=>{const o=cd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function wT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>dc(i,t.args[r]))}function bT(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=pc(E.expression,r,"$selected");return{compiledExpression:de(T),compareOptions:ud(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,R=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const H=i.every(J=>J.expression.type==="ref")?i.map(J=>{const nt=J.expression,st=el(s,nt,l);return de(st?new Me(st.path):J.expression,!0)}):void 0;w={alias:R,offset:p??0,limit:d,comparator:(J,nt)=>{if(i.length===1){const st=J&&N(J),xt=nt&&N(nt);return v(st,xt)}if(H){const st=xt=>xt&&H.map(Kt=>Kt(xt));return v(st(J),st(nt))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(H)return H.map(nt=>nt(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const nt=J();return Math.max(0,w.limit-nt)}}}}return g?t.pipe(fT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(dT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function ud(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function ET(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:"insert",key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error("limit cannot be used without orderBy");if(t.orderBy){const r=t.where?Pa(t.where):void 0,l=xT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Zx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=Pa(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:""}Error processing where clause, falling back to full scan:`,r);const l=Pa(t.where);return t.optimizedOnly?void 0:i(l)}}function Pa(s){const t=Sv(s);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function CT(s,t){const i=Pa(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type==="insert")i(o.value)&&l.push(o);else if(o.type==="update"){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:"insert"}):!u&&d&&l.push({...o,type:"delete",value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function xT(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type==="ref"){const y=g.path,v=ud(p,s);Nc(y[0],y,s,v);const b=yl(s,y,v);if(b&&b.supports("gt")){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Za(m.compareOptions),v=uS(p.value,m.expression),b=uS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function uS(s,t){if(t.type==="ref"){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type==="val"?t.value:Sv(t)(s)}class fS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ad(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ec="__tanstack_db_direct";class _T{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state==="persisting"){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(R=>R.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const R of r){for(const A of R.operations)b.add(A.key);for(const[A]of R.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const R of b){const A=this.get(R);A!==void 0&&w.set(R,A)}}const E=[],T=this.config.sync.rowUpdateMode||"partial",N=new Map;for(const R of this.transactions.values())if(R.state==="completed")for(const A of R.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const R of r){if(R.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const I=m?.upserts.get(z)||this.syncedData.get(z);I!==void 0&&E.push({type:"delete",key:z,value:I})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit("truncate",{type:"truncate",collection:this.collection})}for(const A of R.operations){const z=A.key;this.syncedKeys.add(z);const I=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?"local":"remote";switch(A.type){case"insert":this.syncedData.set(z,A.value),this.rowOrigins.set(z,I),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case"update":{if(T==="partial"){const H=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,H)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,I),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case"delete":this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of R.rowMetadataWrites){if(z.type==="delete"){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of R.collectionMetadataWrites){if(z.type==="delete"){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const R=new Set;for(const I of r)for(const H of I.operations)(H.type==="insert"||H.type==="update")&&R.add(H.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[I,H]of A)if(!z.has(I))if(R.has(I)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===I&&tt.type==="insert"){tt.value=H,K=!0;break}}K||E.push({type:"insert",key:I,value:H})}else E.push({type:"insert",key:I,value:H});if(E.length>0&&z.size>0){const I=[];for(const H of E)H.type==="insert"&&z.has(H.key)||I.push(H);E.length=0,E.push(...I)}this.lifecycle.status!=="ready"&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[R,A]of m.upserts)this.optimisticUpserts.set(R,A);for(const R of m.deletes)this.optimisticDeletes.add(R)}for(const R of this.transactions.values())if(!["completed","failed"].includes(R.state)){for(const A of R.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case"insert":case"update":this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case"delete":this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const R of b){const A=w.get(R),z=this.get(R),I=this.getVirtualPropsSnapshotForState(R,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),H=this.getVirtualPropsSnapshotForState(R),K=I.$synced!==H.$synced||I.$origin!==H.$origin,X=A!==void 0?Z0(A,R,this.collection.id,()=>I.$synced,()=>I.$origin):void 0,tt=N.get(R);let J=!1;tt&&(tt.type==="delete"&&A!==void 0&&z===void 0&&Hn(tt.value,A)||z!==void 0&&Hn(tt.value,z))&&(J=!0);const nt=K&&A!==void 0&&z!==void 0&&Hn(A,z);if(!(J&&!nt))if(A===void 0&&z!==void 0){const st=N.get(R);if(st){const xt=st.value,Kt=Z0(xt,R,this.collection.id,()=>I.$synced,()=>I.$origin);E.push({type:"update",key:R,value:z,previousValue:Kt})}else E.push({type:"insert",key:R,value:z})}else A!==void 0&&z===void 0?E.push({type:"delete",key:R,value:X??A}):A!==void 0&&z!==void 0&&(!Hn(A,z)||nt)&&E.push({type:"update",key:R,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new fS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new fS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?"local":this.rowOrigins.get(t)??"remote"}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:"local"});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?"local":(i?.rowOrigins??this.rowOrigins).get(t)??"remote"})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ec]===!0;if(y.state==="completed"){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case"insert":case"update":this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case"delete":this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state==="failed")for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())["completed","failed"].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case"insert":case"update":this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case"delete":this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type==="delete"&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:"delete",key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:"insert",key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:"update",key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state==="completed"){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Mv(){const s=new Map;function t(i){const r=i.join(".");if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return i;if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function mi(s){const t=new Map;let i=0;function r(o){const u=o.join(".");if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return o;if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(".")}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return[];if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"||typeof u=="string"&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,"__refProxy","__path","__type"]},getOwnPropertyDescriptor(o,u){if(u==="__refProxy"||u==="__path"||u==="__type")return{enumerable:!1,configurable:!0};if(typeof u=="string"&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function hS(s){const t=mi(s),i=new Map;function r(o){const u=o.join(".");if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return["$selected",...o];if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u==="$selected"?l:Reflect.get(o,u,d)},has(o,u){return u==="$selected"?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),"$selected"]},getOwnPropertyDescriptor(o,u){return u==="$selected"?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function re(s){return nc(s)?new Me(s.__path):s&&typeof s=="object"&&"type"in s&&(s.type==="func"||s.type==="ref"||s.type==="val"||s.type==="agg")?s:new Be(s)}function nc(s){return s&&typeof s=="object"&&s.__refProxy===!0}function fd(s,t){return new Je("eq",[re(s),re(t)])}function dS(s,t){return new Je("gt",[re(s),re(t)])}function TT(s,t){return new Je("gte",[re(s),re(t)])}function hd(s,t){return new Je("lt",[re(s),re(t)])}function dd(s,t,...i){const r=[s,t,...i];return new Je("and",r.map(l=>re(l)))}function AT(s,t,...i){const r=[s,t,...i];return new Je("or",r.map(l=>re(l)))}function OT(s,t){return new Je("in",[re(s),re(t)])}class DT{constructor(t){this.query=t}}class RT{constructor(t){this.query=t}}class kv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function MT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction==="asc"?dS:hd)(r,new Be(t[0]))}const i=[];for(let r=0;rdd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>AT(r,l))}class kT extends kv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status="ready",this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on("unsubscribed",o=>r.onUnsubscribe(o)),r.whereExpression&&s_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?CT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on("truncate",()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner("status:change",{type:"status:change",subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus("loadingSubset"),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus("ready")}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if("where"in t){const p=t.where;if(i.where){const g=i.where,m=dd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error("limit is required");if(!this.orderByIndex)throw new Error("Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.");const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?Pa(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:fd(tt,new Be(g))});if(J){const nt=J.map(xt=>xt.key).filter(xt=>!this.sentKeys.has(xt)&&b(xt));T.push(...nt);const st=m.take(i-T.length,g,b);T.push(...st)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),R=()=>T.length===0,A=t[0].expression,z=A.type==="ref"?de(new Me(A.path),!0):null;for(;N()>0&&!R();){const tt=new Set;for(const J of T){const nt=this.collection.get(J);E.push({type:"insert",key:J,value:nt}),w=z?z(nt):nt,tt.add(J)}T=m.take(N(),w,b)}const I=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let H;if(r!==void 0&&r.length>0){const tt=MT(t,r);if(tt){const{expression:J}=t[0],nt=r[0];let st;if(nt instanceof Date){const xt=new Date(nt.getTime()+1);st=dd(TT(J,new Be(nt)),hd(J,new Be(xt)))}else st=fd(J,new Be(nt));H={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:H,offset:l??I,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type==="insert")continue;l.type==="delete"&&this.sentKeys.delete(l.key)}else{if(l.type==="update")o={...l,type:"insert",previousValue:void 0};else if(l.type==="delete"&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type==="delete"?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner("unsubscribed",{type:"unsubscribed",subscription:this}),this.clearListeners()}}class UT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error("Cannot specify both 'where' and 'whereExpression' options. Use one or the other.");const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Mv(),p=r(d);o=re(p)}const u=new kT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on("status:change",i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status==="cleaned-up"||this.lifecycle.status==="idle")&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new LC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const zT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),jT=s=>{clearTimeout(s)},NT=typeof window<"u"&&"requestIdleCallback"in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>zT(s),Uh=typeof window<"u"&&"cancelIdleCallback"in window?s=>window.cancelIdleCallback(s):jT,Uv=class fs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return fs.instance||(fs.instance=new fs),fs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error("Error in CleanupQueue task:",l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){fs.instance&&(fs.instance.timeoutId!==null&&clearTimeout(fs.instance.timeoutId),fs.instance=null)}};Uv.instance=null;let zh=Uv;class BT{constructor(t,i){this.status="idle",this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:["loading","error","cleaned-up"],loading:["ready","error","cleaned-up"],ready:["cleaned-up","error"],error:["cleaned-up","idle"],"cleaned-up":["loading","error"]}[t].includes(i))throw new NC(t,i,this.id)}setStatus(t,i=!1){if(t==="ready"&&!i)throw new gl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case"error":throw new jC(t,this.id);case"cleaned-up":this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,"ready"),this.status==="loading"){if(this.setStatus("ready",!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||zh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){zh.getInstance().cancel(this),this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Uh(this.idleCallbackId),this.idleCallbackId=NT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),zh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:""}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus("cleaned-up"),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Qd=Symbol("liveQueryInternal");class LT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??"eager"}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!=="idle"&&this.lifecycle.status!=="cleaned-up")){this.lifecycle.setStatus("loading");try{const t=IT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new xh;if(r.committed)throw new _h;let l;"key"in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type==="insert"){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o="update";else{const b=this.config.utils[Qd];throw new KC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o==="delete"?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:"delete"})):o==="insert"?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:"set",value:u.metadata}):r.rowMetadataWrites.set(l,{type:"delete"}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:"set",value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new sx;if(i.committed)throw new ix;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new xh;if(i.committed)throw new _h;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode==="on-demand"&&!this.syncLoadSubsetFn)throw new Oi(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus("error"),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new xh;if(t.committed)throw new _h;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type==="delete"?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"delete"})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type==="delete"?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"delete"})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type==="delete"?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode==="on-demand"&&console.warn(`${this.id?`[${this.id}] `:""}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status==="ready"){t();return}if(this.lifecycle.status==="error"){i(new BC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status==="idle"||this.lifecycle.status==="cleaned-up")try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:"start"}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:"end"})})}loadSubset(t){if(this.syncMode==="eager")return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new F0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new F0(this.id,t)})}this.preloadPromise=null}}function IT(s){if(typeof s=="function")return{cleanup:s};if(typeof s=="object")return s}const pS=1;function sc(s,t){return s===t?0:sYs(r)??null);if(s instanceof Date)return{__type:"date",value:s.toISOString()};if(s instanceof Set)return{__type:"set",values:Array.from(s).map(l=>Ys(l)??null).sort((l,o)=>sc(vi(l),vi(o)))};if(s instanceof Map)return{__type:"map",entries:Array.from(s.entries()).map(([l,o])=>({key:Ys(l)??null,value:Ys(o)??null})).sort((l,o)=>sc(vi(l.key),vi(o.key)))};if(s instanceof RegExp)return{__type:"regexp",value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>sc(r,l));for(const[r,l]of i){const o=Ys(l);o!==void 0&&(t[r]=o)}return t}function vi(s){return s===null?"null":Array.isArray(s)?`[${s.map(vi).join(",")}]`:typeof s!="object"?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>sc(r,l)).map(r=>`${JSON.stringify(r)}:${vi(s[r])}`).join(",")}}`}function qT(s,t,i,r,l){const o=HT(r),u=Ys(t)??null,d=Ys(l),g=Ys({signatureVersion:pS,expression:u,options:d??null})??null,m=vi(g);return{signatureVersion:pS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function pd(s){if(s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(i=>pd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=pd(r);return t}function KT(s){return JSON.parse(JSON.stringify(s))}class VT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable("createIndex");const r=++this.indexCounter,l=Mv(),o=t(l),u=re(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Oi(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=qT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable("removeIndex");const i=typeof t=="number"?t:t.id,r=this.indexes.get(i);if(!r||typeof t!="number"&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:KT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:pd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case"insert":i.add(r.key,r.value);break;case"update":r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case"delete":i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var GT={};const $T=new Set(["find","findLast","findIndex","findLastIndex","filter","map","flatMap","forEach","some","every","reduce","reduceRight"]),YT=new Set(["pop","push","shift","unshift","splice","sort","reverse","fill","copyWithin"]),QT=new Set(["set","delete","clear","add"]),FT=new Set(["entries","keys","values","forEach"]);function Fd(s){return s!==null&&typeof s=="object"&&!(s instanceof Date)&&!(s instanceof RegExp)&&!Zs(s)}function JT(s,t,i,r){if($T.has(s))return function(...l){const o=l[0];if(typeof o!="function")return t.apply(i.copy_,l);const u=(g,m)=>{if(Fd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s==="reduce"||s==="reduceRight"){const g=function(m,y,v,w){const b=u(y,v);return o.call(this,m,b,v,w)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s==="find"||s==="findLast")&&p&&typeof p=="object"){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s==="filter"&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function XT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Fd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function gS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function ZT(s,t,i,r,l,o,u){if(FT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s==="forEach"){const y=p[0];if(typeof y=="function"){const v=function(w,b,E){const T=y.call(this,w,b,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s==="entries"||s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s==="values"&&r instanceof Map)for(const[b,E]of l.copy_.entries())v.set(E,b);const w=new Map;if(r instanceof Set)for(const b of l.copy_.values())w.set(b,b);return{next(){const b=y.next();if(!b.done&&b.value&&typeof b.value=="object"){if(s==="entries"&&Array.isArray(b.value)&&b.value.length===2){if(b.value[1]&&typeof b.value[1]=="object"){const E=b.value[0],T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:B}=o(b.value[1],T);b.value[1]=B}}else if(s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s==="values"&&r instanceof Map){const E=v.get(b.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:B}=o(b.value,T);b.value=B}}else if(r instanceof Set){const E=b.value,T={tracker:l,prop:E,updateSet:R=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(R),w.set(E,R))}},{proxy:B}=o(b.value,T);b.value=B}else{const E=Symbol("iterator-value"),{proxy:T}=o(b.value,{tracker:l,prop:E});b.value=T}}return b},[Symbol.iterator](){return this}}}return g}}function At(...s){const t=typeof window<"u"&&typeof localStorage<"u";t&&localStorage.getItem("DEBUG")==="true"?console.log("[proxy]",...s):!t&&typeof process<"u"&>.DEBUG==="true"&&console.log("[proxy]",...s)}function ps(s,t=new WeakMap){if(s==null||typeof s!="object")return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=ps(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,ps(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(ps(o,t))}),l}if(Zs(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=ps(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=ps(s[l],t);return i}let yS=0;function WT(){return yS+=1,yS}function Jd(s,t){const i=new Map;function r(y,v){if(At("Object ID:",y.constructor.name),i.has(y))return i.get(y);{const w=Jd(y,v);return i.set(y,w),w}}const l=new Map,o={copy_:ps(s),originalObject:ps(s),proxyCount:WT(),modified:!1,assigned_:{},parent:t,target:s};At("createChangeProxy called for target",s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At("propagating change to parent"),"updateMap"in y.parent?y.parent.updateMap(y.copy_):"updateSet"in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At("checkIfReverted called with assigned keys:",Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At("No assigned properties, returning true"),!0;for(const w in y.assigned_)if(y.assigned_[w]===!0){const b=y.copy_[w],E=y.originalObject[w];if(At(`Checking property ${String(w)}, current:`,b,"original:",E),!Hn(b,E))return At(`Property ${String(w)} is different, returning false`),!1}else if(y.assigned_[w]===!1)return At(`Property ${String(w)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const w of v)if(y.assigned_[w]===!0){const b=y.copy_[w],E=y.originalObject[w];if(!Hn(b,E))return At("Symbol property is different, returning false"),!1}else if(y.assigned_[w]===!1)return At("Symbol property was deleted, returning false"),!1;return At("All properties match original values, returning true"),!0}function p(y,v){At("checkParentStatus called for child prop:",v);const w=d(y);At("Parent checkIfReverted returned:",w),w&&(At("Parent is fully reverted, clearing tracking"),y.modified=!1,y.assigned_={},y.parent&&(At("Continuing up the parent chain"),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At("createObjectProxy",y),l.has(y))return At("proxyCache found match"),l.get(y);const v=new Proxy(y,{get(w,b){At("get",w,b);const E=o.copy_[b]??o.originalObject[b],T=o.originalObject[b];if(At("value (at top of proxy get)",E),Object.getOwnPropertyDescriptor(w,b)?.get)return E;if(typeof E=="function"){if(Array.isArray(w)){const R=b.toString();if(YT.has(R))return gS(E,o,u);const O=JT(R,E,o,r);if(O)return O;if(b===Symbol.iterator)return XT(o,r)}if(w instanceof Map||w instanceof Set){const R=b.toString();if(QT.has(R))return gS(E,o,u);const O=ZT(R,b,E,w,o,r,u);if(O)return O}return E.bind(w)}if(Fd(E)){const R={tracker:o,prop:String(b)},{proxy:O}=r(T,R);return l.set(E,O),O}return E},set(w,b,E){const T=o.copy_[b];if(At(`set called for property ${String(b)}, current:`,T,"new:",E),Hn(T,E))At("Value unchanged, not tracking");else{const B=o.originalObject[b],R=Hn(E,B);if(At("value:",E,"original:",B,"isRevertToOriginal:",R),R){At(`Reverting property ${String(b)} to original value`),delete o.assigned_[b.toString()],At(`Updating copy with original value for ${String(b)}`),o.copy_[b]=ps(B),At("Checking if all properties reverted");const O=d(o);At("All reverted:",O),O?(At("All properties reverted, clearing tracking"),o.modified=!1,o.assigned_={},t&&(At("Updating parent for property:",t.prop),p(t.tracker,t.prop))):(At("Some properties still changed, keeping modified flag"),o.modified=!0)}else At(`Setting new value for property ${String(b)}`),o.copy_[b]=E,o.assigned_[b.toString()]=!0,At("Marking object and ancestors as modified",o),u(o)}return!0},defineProperty(w,b,E){const T=Reflect.defineProperty(w,b,E);return T&&"value"in E&&(o.copy_[b]=ps(E.value),o.assigned_[b.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(w,b){return Reflect.getOwnPropertyDescriptor(w,b)},preventExtensions(w){return Reflect.preventExtensions(w)},isExtensible(w){return Reflect.isExtensible(w)},deleteProperty(w,b){At("deleteProperty",w,b);const E=typeof b=="symbol"?b.toString():b;if(E in w){const T=E in o.originalObject,B=Reflect.deleteProperty(w,b);return B&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),B}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At("getChanges called, modified:",o.modified),At(o),!o.modified)return At("Object not modified, returning empty object"),{};if(typeof o.copy_!="object"||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At("Returning copy:",y),y}}}function PT(s){const t=s.map(i=>Jd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function tA(s,t){const{proxy:i,getChanges:r}=Jd(s);return t(i),r()}function eA(s,t){const{proxies:i,getChanges:r}=PT(s);return t(i),r()}function nA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function sA(s){return typeof s=="object"&&s!==null&&typeof s.hasPendingGraphRun=="function"}class iA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>"u"){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new iA,mc=[];let il=[],rA=0;function aA(s,t){switch(`${s.type}-${t.type}`){case"insert-update":return{...s,type:"insert",original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case"insert-delete":return null;case"update-delete":return t;case"update-update":return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case"delete-delete":case"insert-insert":return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(s){const t=new uA(s);return mc.push(t),t}function rc(){if(il.length>0)return il.slice(-1)[0]}function lA(s){yc.clear(s.id),il.push(s)}function oA(s){try{yc.flush(s.id)}finally{il=il.filter(t=>t.id!==s.id)}}function cA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let uA=class{constructor(t){if(typeof t.mutationFn>"u")throw new WC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state="pending",this.mutations=[],this.isPersisted=nA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=rA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t==="completed"||t==="failed")&&cA(this)}mutate(t){if(this.state!=="pending")throw new tx;lA(this);try{t()}finally{oA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=aA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state==="completed")throw new ex;if(this.setState("failed"),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state==="pending"&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!=="pending")throw new nx;if(this.setState("persisting"),this.mutations.length===0)return this.setState("completed"),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState("completed"),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class fA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable("insert");const o=this.state,u=rc();if(!u&&!this.config.onInsert)throw new JC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,"insert"),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new qC(v);g.add(v);const w=this.generateGlobalKey(v,m),b={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:w,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:"insert",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(b)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[nc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable("delete");const u=rc();if(!u&&!this.config.onDelete)throw new ZC;if(Array.isArray(r)&&r.length===0)throw new QC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new FC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:"delete",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[nc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&"~standard"in t)return t;throw new UC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i==="update"&&r){const u=this.state.get(r);if(u&&t&&typeof t=="object"&&typeof u=="object"){const d=Object.assign({},u,t),p=l["~standard"].validate(d);if(p instanceof Promise)throw new $0;if("issues"in p&&p.issues){const v=p.issues.map(w=>({message:w.message,path:w.path?.map(b=>String(b))}));throw new G0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l["~standard"].validate(t);if(o instanceof Promise)throw new $0;if("issues"in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new G0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!="string"&&typeof t!="number")throw typeof t>"u"?new IC(i):new HC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>"u")throw new VC;const l=this.state;this.lifecycle.validateCollectionUsable("update");const o=rc();if(!o&&!this.config.onUpdate)throw new XC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new GC;const p=typeof i=="function"?i:r,g=typeof i=="function"?{}:i,m=d.map(b=>{const E=this.state.get(b);if(!E)throw new $C(b);return E});let y;u?y=eA(m,p):y=[tA(m[0],p)];const v=d.map((b,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const B=m[E],R=this.validateData(T,"update",b),O=Object.assign({},B,R),k=this.config.getKey(B),$=this.config.getKey(O);if(k!==$)throw new YC(k,$);const z=this.generateGlobalKey($,O);return{mutationId:crypto.randomUUID(),original:B,modified:O,changes:Object.fromEntries(Object.keys(T).map(I=>[I,O[I]])),globalKey:z,key:b,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(b)||{},optimistic:g.optimistic??!0,type:"update",createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const b=Ja({mutationFn:async()=>{}});return b.commit().catch(()=>{}),l.scheduleTransactionCleanup(b),b}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const w=Ja({metadata:{[nc]:!0},mutationFn:async b=>this.config.onUpdate({transaction:b.transaction,collection:this.collection})});return w.applyMutations(v),this.markPendingLocalOrigins(v),w.commit().catch(()=>{}),l.transactions.set(w.id,w),l.scheduleTransactionCleanup(w),l.recomputeOptimisticState(!0),w}}class hA extends kv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit("status:change",{type:"status:change",collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit("subscribers:change",{type:"subscribers:change",collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit("index:added",{type:"index:added",collection:this.collection,index:t})}emitIndexRemoved(t){this.emit("index:removed",{type:"index:removed",collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Xd(s){const t=new Zd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Zd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new kC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??"off"},this.config.autoIndex==="eager"&&!t.defaultIndexType)throw new Di(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=qT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable("removeIndex");const i=typeof t=="number"?t:t.id,r=this.indexes.get(i);if(!r||typeof t!="number"&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:KT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:pd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case"insert":i.add(r.key,r.value);break;case"update":r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case"delete":i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var GT={};const $T=new Set(["find","findLast","findIndex","findLastIndex","filter","map","flatMap","forEach","some","every","reduce","reduceRight"]),YT=new Set(["pop","push","shift","unshift","splice","sort","reverse","fill","copyWithin"]),QT=new Set(["set","delete","clear","add"]),FT=new Set(["entries","keys","values","forEach"]);function Fd(s){return s!==null&&typeof s=="object"&&!(s instanceof Date)&&!(s instanceof RegExp)&&!Xs(s)}function JT(s,t,i,r){if($T.has(s))return function(...l){const o=l[0];if(typeof o!="function")return t.apply(i.copy_,l);const u=(g,m)=>{if(Fd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s==="reduce"||s==="reduceRight"){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s==="find"||s==="findLast")&&p&&typeof p=="object"){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s==="filter"&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function XT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Fd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function gS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function ZT(s,t,i,r,l,o,u){if(FT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s==="forEach"){const y=p[0];if(typeof y=="function"){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s==="entries"||s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s==="values"&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value=="object"){if(s==="entries"&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]=="object"){const E=w.value[0],T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s==="values"&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:R=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(R),b.set(E,R))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol("iterator-value"),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...s){const t=typeof window<"u"&&typeof localStorage<"u";t&&localStorage.getItem("DEBUG")==="true"?console.log("[proxy]",...s):!t&&typeof process<"u"&>.DEBUG==="true"&&console.log("[proxy]",...s)}function ds(s,t=new WeakMap){if(s==null||typeof s!="object")return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=ds(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,ds(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(ds(o,t))}),l}if(Xs(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=ds(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=ds(s[l],t);return i}let yS=0;function WT(){return yS+=1,yS}function Jd(s,t){const i=new Map;function r(y,v){if(At("Object ID:",y.constructor.name),i.has(y))return i.get(y);{const b=Jd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:ds(s),originalObject:ds(s),proxyCount:WT(),modified:!1,assigned_:{},parent:t,target:s};At("createChangeProxy called for target",s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At("propagating change to parent"),"updateMap"in y.parent?y.parent.updateMap(y.copy_):"updateSet"in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At("checkIfReverted called with assigned keys:",Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At("No assigned properties, returning true"),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,"original:",E),!Hn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Hn(w,E))return At("Symbol property is different, returning false"),!1}else if(y.assigned_[b]===!1)return At("Symbol property was deleted, returning false"),!1;return At("All properties match original values, returning true"),!0}function p(y,v){At("checkParentStatus called for child prop:",v);const b=d(y);At("Parent checkIfReverted returned:",b),b&&(At("Parent is fully reverted, clearing tracking"),y.modified=!1,y.assigned_={},y.parent&&(At("Continuing up the parent chain"),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At("createObjectProxy",y),l.has(y))return At("proxyCache found match"),l.get(y);const v=new Proxy(y,{get(b,w){At("get",b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At("value (at top of proxy get)",E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E=="function"){if(Array.isArray(b)){const R=w.toString();if(YT.has(R))return gS(E,o,u);const A=JT(R,E,o,r);if(A)return A;if(w===Symbol.iterator)return XT(o,r)}if(b instanceof Map||b instanceof Set){const R=w.toString();if(QT.has(R))return gS(E,o,u);const A=ZT(R,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Fd(E)){const R={tracker:o,prop:String(w)},{proxy:A}=r(T,R);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,"new:",E),Hn(T,E))At("Value unchanged, not tracking");else{const N=o.originalObject[w],R=Hn(E,N);if(At("value:",E,"original:",N,"isRevertToOriginal:",R),R){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=ds(N),At("Checking if all properties reverted");const A=d(o);At("All reverted:",A),A?(At("All properties reverted, clearing tracking"),o.modified=!1,o.assigned_={},t&&(At("Updating parent for property:",t.prop),p(t.tracker,t.prop))):(At("Some properties still changed, keeping modified flag"),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At("Marking object and ancestors as modified",o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&"value"in E&&(o.copy_[w]=ds(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At("deleteProperty",b,w);const E=typeof w=="symbol"?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At("getChanges called, modified:",o.modified),At(o),!o.modified)return At("Object not modified, returning empty object"),{};if(typeof o.copy_!="object"||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At("Returning copy:",y),y}}}function PT(s){const t=s.map(i=>Jd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function tA(s,t){const{proxy:i,getChanges:r}=Jd(s);return t(i),r()}function eA(s,t){const{proxies:i,getChanges:r}=PT(s);return t(i),r()}function nA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function sA(s){return typeof s=="object"&&s!==null&&typeof s.hasPendingGraphRun=="function"}class iA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>"u"){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const gc=new iA,yc=[];let il=[],rA=0;function aA(s,t){switch(`${s.type}-${t.type}`){case"insert-update":return{...s,type:"insert",original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case"insert-delete":return null;case"update-delete":return t;case"update-update":return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case"delete-delete":case"insert-insert":return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(s){const t=new uA(s);return yc.push(t),t}function ic(){if(il.length>0)return il.slice(-1)[0]}function lA(s){gc.clear(s.id),il.push(s)}function oA(s){try{gc.flush(s.id)}finally{il=il.filter(t=>t.id!==s.id)}}function cA(s){const t=yc.findIndex(i=>i.id===s.id);t!==-1&&yc.splice(t,1)}let uA=class{constructor(t){if(typeof t.mutationFn>"u")throw new WC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state="pending",this.mutations=[],this.isPersisted=nA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=rA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t==="completed"||t==="failed")&&cA(this)}mutate(t){if(this.state!=="pending")throw new tx;lA(this);try{t()}finally{oA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=aA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state==="completed")throw new ex;if(this.setState("failed"),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of yc)l.state==="pending"&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!=="pending")throw new nx;if(this.setState("persisting"),this.mutations.length===0)return this.setState("completed"),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState("completed"),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class fA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable("insert");const o=this.state,u=ic();if(!u&&!this.config.onInsert)throw new JC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,"insert"),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new qC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:"insert",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[ec]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable("delete");const u=ic();if(!u&&!this.config.onDelete)throw new ZC;if(Array.isArray(r)&&r.length===0)throw new QC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new FC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:"delete",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[ec]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&"~standard"in t)return t;throw new zC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i==="update"&&r){const u=this.state.get(r);if(u&&t&&typeof t=="object"&&typeof u=="object"){const d=Object.assign({},u,t),p=l["~standard"].validate(d);if(p instanceof Promise)throw new $0;if("issues"in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new G0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l["~standard"].validate(t);if(o instanceof Promise)throw new $0;if("issues"in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new G0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!="string"&&typeof t!="number")throw typeof t>"u"?new IC(i):new HC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>"u")throw new VC;const l=this.state;this.lifecycle.validateCollectionUsable("update");const o=ic();if(!o&&!this.config.onUpdate)throw new XC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new GC;const p=typeof i=="function"?i:r,g=typeof i=="function"?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new $C(w);return E});let y;u?y=eA(m,p):y=[tA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],R=this.validateData(T,"update",w),A=Object.assign({},N,R),z=this.config.getKey(N),I=this.config.getKey(A);if(z!==I)throw new YC(z,I);const H=this.generateGlobalKey(I,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:H,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:"update",createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Ja({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Ja({metadata:{[ec]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class hA extends kv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit("status:change",{type:"status:change",collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit("subscribers:change",{type:"subscribers:change",collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit("index:added",{type:"index:added",collection:this.collection,index:t})}emitIndexRemoved(t){this.emit("index:removed",{type:"index:removed",collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Xd(s){const t=new Zd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Zd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new kC;if(!t.sync)throw new UC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??"off"},this.config.autoIndex==="eager"&&!t.defaultIndexType)throw new Oi(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new hA,this._indexes=new VT,this._lifecycle=new BT(t,this.id),this._mutations=new fA(t,this.id),this._state=new _T(t),this._sync=new LT(t,this.id),this.comparisonOpts=dA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status==="ready"}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return ET(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function dA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??"locale",locale:t.stringSort==="locale"?t.locale:void 0,localeOptions:t.stringSort==="locale"?t.localeOptions:void 0}}else return{stringSort:"locale"}}function pA(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function gA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(pA(u))throw new PC}),o}}function yA(s){const t=mA(s);let i=s,r,l=0;const o=10;for(;lNv(u)),l=Bv(r),o=Uv(s);for(const[u,d]of l.singleSource)SA(s,u)&&!o.has(u)&&t.set(u,d);return t}function SA(s,t){if(s.from.alias===t)return s.from.type==="collectionRef";if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type==="collectionRef"}return!1}function Uv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type==="left"||r.type==="full")&&t.add(l),(r.type==="right"||r.type==="full")&&t.add(i)}}return t}function gd(s){const t={...s,from:s.from.type==="queryRef"?new Sn(gd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type==="queryRef"?new Sn(gd(i.from.query),i.from.alias):i.from}))};return vA(t)}function vA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=md(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!V0(d)),r=md(t).map(d=>Nv(d)),l=Bv(r),o=wA(s,l),u=s.where.filter(d=>V0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function jv(s){return{...s,from:yd(s.from),join:s.join?.map(t=>({...t,from:yd(t.from)}))}}function yd(s){if(s.type==="collectionRef")return s;const t=jv(s.query);if(bA(t)){const i=yd(t.from);return i.type==="collectionRef"?new kr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function md(s){const t=[];for(const i of s){const r=Hd(i);t.push(...Wd(r))}return t}function Wd(s){if(s.type==="func"&&s.name==="and"){const t=[];for(const i of s.args)t.push(...Wd(i));return t}else return[s]}function Nv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case"ref":if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case"func":l.args&&l.args.forEach(r);break;case"val":break;case"agg":l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Bv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function wA(s,t){const i=new Set,r=Uv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=mS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:mS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(RC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Wd(Hd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(s){return{from:s.from.type==="collectionRef"?new kr(s.from.collection,s.from.alias):new Sn(_r(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type==="collectionRef"?new kr(t.from.collection,t.from.alias):new Sn(_r(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function mS(s,t,i){const r=t.get(s.alias);if(!r)return s.type==="collectionRef"?new kr(s.collection,s.alias):new Sn(_r(s.query),s.alias);if(s.type==="collectionRef"){const u={from:new kr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!AA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);const l=s.query.where||[],o={..._r(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function EA(s,t,i){return s.select?Lv(s.select)||OA(s.select,t,i):!1}function CA(s){return s.groupBy&&s.groupBy.length>0}function xA(s){return s.having&&s.having.length>0}function _A(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function TA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function AA(s,t,i){return!(EA(s,t,i)||CA(s)||xA(s)||_A(s)||TA(s))}function Lv(s){for(const t of Object.values(s))if(typeof t=="object"){const i=t;if(i.type==="agg"||!("type"in i)&&Lv(i))return!0}return!1}function Pd(s){const t=[];if(s==null||typeof s!="object")return t;switch(s.type){case"ref":t.push(s);break;case"func":case"agg":for(const i of s.args??[])t.push(...Pd(i));break}return t}function OA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith("__SPREAD_SENTINEL__")||u instanceof Me||r.add(o);const l=Pd(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=Pd(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new kx;return s.length===1?s[0]:new Je("and",s)}function RA(s,t,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R){let O=s;for(const k of t)O=MA(O,k,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R);return O}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,w,b,E,T,B,R){const O=t.from.type==="collectionRef",{alias:k,input:$,collectionId:z}=zA(t.from,o,p,g,m,y,v,w,u,d,E,T,B,R);i[k]=$,O&&(T[k]=z);const I=p[r],X=p[z];if(!I)throw new Q0(r);if(!X)throw new Q0(z);const{activeSource:tt,lazySource:F}=jA(t.type,I,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:xt}=kA(t.left,t.right,nt,k),Kt=pe(st),ht=pe(xt);let M=s.pipe(fe(([Z,at])=>[Cr(Kt(at)),[Z,at]])),q=$.pipe(fe(([Z,at])=>{const ft={[k]:at};return[Cr(ht(ft)),[Z,ft]]}));if(!["inner","left","right","full"].includes(t.type))throw new bx(t.type);if(tt){const Z=tt==="main"?t.from:b.from,at=Z.type==="queryRef"&&(Z.query.limit||Z.query.offset),ft=st.type==="func"||xt.type==="func";if(!at&&!ft){const _=tt==="main"?k:l;y.add(_);const H=tt==="main"?M:q,J=el(b,tt==="main"?xt:st,F),lt=J.collection,it=J.path[0];it&&Bc(it,J.path,lt);const St=H.pipe(nT(Ut=>{const vt=B[_]||_,et=g[vt];if(!et)throw new zx(vt,_,F.id,Object.keys(g));if(et.hasLoadedInitialState())return;const P=Ut.getInner().map(([[bt]])=>bt),pt=new Me(J.path);et.requestSnapshot({where:OT(pt,P),optimizedOnly:!0})||et.requestSnapshot()}));tt==="main"?M=St:q=St}}return M.pipe(Rv(q,t.type),UA(t.type))}function kA(s,t,i,r){const l=i.filter(d=>d!==r),o=Sd(s),u=Sd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Ex:o===u?new wx(o):l.includes(o)?u!==r?new xx(r):new _x:new Cx(o)}function Sd(s){switch(s.type){case"ref":return s.path[0]||null;case"func":{const t=new Set;for(const i of s.args){const r=Sd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,w){switch(s.type){case"collectionRef":{const b=t[s.alias];if(!b)throw new yv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case"queryRef":{const b=g.get(s.query)||s.query,E=m(b,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),B=s.query.from.alias;if(!(!T&&s.alias===B))for(const[z,I]of E.sourceWhereClauses)w.set(z,I);const O=Object.keys(E.aliasToCollectionId).find(z=>E.aliasToCollectionId[z]===E.collectionId);O&&O!==s.alias&&(v[s.alias]=O);const $=E.pipeline.pipe(fe(z=>{const[I,[X,tt]]=z;return[I,X]}));return{alias:s.alias,input:$,collectionId:E.collectionId}}default:throw new Tx(s.type)}}function UA(s){return function(t){return t.pipe(gs(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s==="inner"?!!(u&&d):s==="left"?!!u:s==="right"?!!d:!0}),fe(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function jA(s,t,i){switch(s){case"left":return{activeSource:"main",lazySource:i};case"right":return{activeSource:"joined",lazySource:t};case"inner":return t.sizeLA(l,r)))}function HA(s){return s.type==="agg"}function qA(s){return s&&typeof s=="object"&&!zr(s)}function Iv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith("__SPREAD_SENTINEL__")){const u=r.slice(19),d=u.lastIndexOf("__"),p=d>=0?u.slice(0,d):u,g=l&&typeof l=="object"&&"type"in l&&l.type==="ref";if(p.includes(".")||g){const m=[...s],y=g?l:new Me(p.split(".")),v=pe(y);i.push({kind:"merge",targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:"merge",targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type==="includesSubquery"){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});continue}if(qA(o)){Iv([...s,r],o,i);continue}if(HA(o)||Ur(o))i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});else{if(o===void 0||!zr(o)){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>u})}else i.push({kind:"field",alias:[...s,r].join("."),compiled:pe(o)})}}}const Ar=Symbol("includesRouting");function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:w,sourceWhereClauses:b}=yA(s);let E=w;g.set(E,s),Ed(E,s,g);const T={...t},B={},R={},O={},{alias:k,input:$,collectionId:z}=VA(E.from,T,i,r,l,o,u,d,p,g,B,R,b);O[k]=$;let I=$;if(m&&y){const ht=y.path.slice(1);I=$.pipe(fe(([Z,at])=>[QA(at,ht),[Z,at]])).pipe(Rv(m,"inner")).pipe(gs(([Z,[at]])=>at!=null),fe(([Z,[at,ft]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),O[k]=I}let X=I.pipe(fe(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[k]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=RA(X,E.join,O,z,k,T,p,g,i,r,l,o,u,d,s,vc,B,R,b)),E.where&&E.where.length>0)for(const ht of E.where){const M=Hd(ht),q=pe(M);X=X.pipe(gs(([Z,at])=>Tr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(gs(([M,q])=>Tr(ht(q))));const tt=[],F=[];if(E.select){const ht=$A(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=pe(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:pe(Y)}));at=X.pipe(fe(([Y,J])=>{const lt={};for(const it of H){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(J);let Ut=lt[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(_v(H=>H.map(([Y,J])=>[Y,J>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ft,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(B,_.aliasToCollectionId),Object.assign(R,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(J=>({alias:J.path[0],field:J.path.slice(1),compiled:pe(J)})),Y=Z;F.push({fieldName:q.fieldName,getRouting:J=>{const lt={};for(const it of H){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(J);let Ut=lt[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});YA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new ux;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new fx;E.fnSelect?X=X.pipe(fe(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=IA(X,E.select):X=X.pipe(fe(([ht,M])=>{const q=!E.join&&!E.groupBy?M[k]:M;return[ht,{...M,$selected:q}]})),F.length>0&&(X=X.pipe(fe(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of F)q[Z]=at(M);return M.$selected[Ar]=q,[ht,M]})));const nt=m?k:void 0;if(E.groupBy&&E.groupBy.length>0?X=oS(X,E.groupBy,E.having,E.select,E.fnHaving,z,nt):E.select&&Object.values(E.select).some(M=>M.type==="agg"||Ur(M))&&(X=oS(X,[],E.having,E.select,E.fnHaving,z,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type==="agg"):!1))throw new dx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(gs(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe($_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const H=_?.[k]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=wT(s,X,E.orderBy,E.select||{},i[z],u,d,E.limit,E.offset,ht).pipe(fe(([ft,[_,H]])=>{const Y=_.$selected,J=SS(wd(Y),_);if(m){const lt=_[k]?.__correlationKey,it=_.__parentContext??null;return delete J.__correlationKey,delete J.__parentContext,[ft,[J,H,lt,it]]}return[ft,[J,H]]})),at={collectionId:z,pipeline:Z,sourceWhereClauses:b,aliasToCollectionId:B,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new px;const xt=X.pipe(fe(([ht,M])=>{const q=M.$selected,Z=SS(wd(q),M);if(m){const at=M[k]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ft]]}return[ht,[Z,void 0]]})),Kt={collectionId:z,pipeline:xt,sourceWhereClauses:b,aliasToCollectionId:B,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function KA(s){const t=new Set;if(s.from.type==="collectionRef"&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type==="collectionRef"&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=KA(s);for(const l of i)if(t.has(l))throw new gx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type==="queryRef"&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type==="queryRef"&&bd(l.from.query,r)}function VA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case"collectionRef":{const w=t[s.alias];if(!w)throw new yv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case"queryRef":{const w=g.get(s.query)||s.query,b=vc(w,t,i,r,l,o,u,d,p,g);Object.assign(m,b.aliasToCollectionId),Object.assign(y,b.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[$,z]of b.sourceWhereClauses)v.set($,z);const R=Object.keys(b.aliasToCollectionId).find($=>b.aliasToCollectionId[$]===b.collectionId);R&&R!==s.alias&&(y[s.alias]=R);const k=b.pipeline.pipe(fe($=>{const[z,[I,X]]=$,tt=wd(I);return[z,tt]}));return{alias:s.alias,input:k,collectionId:b.collectionId}}default:throw new yx(s.type)}}function GA(s){return s instanceof Be||s&&typeof s=="object"&&"type"in s&&s.type==="val"}function wd(s){return GA(s)?s.value:s}function SS(s,t){if(!s||typeof s!="object")return s;let i=!1;for(const r of rd)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of rd)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Ed(s,t,i){if(s.from.type==="queryRef"&&t.from.type==="queryRef"&&(i.set(s.from.query,t.from.query),Ed(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=tp(l,t);r.push(o)}return new Je(s.name,r)}}function ep(s,t){return s.map(r=>{const l=tp(r.expression,t);return{...r,expression:l}})}const Kv=new WeakMap;function FA(s){return s.utils?.[Qd]?.getBuilder?.()}function JA(s,t){Kv.set(s,t)}function XA(s){return Kv.get(s)}class Pt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?"null":"undefined";throw new $o(i,d)}if(Array.isArray(t))throw new $o(i,"array");if(r.length!==1)throw r.length===0?new $o(i,"empty object"):r.every(d=>!isNaN(Number(d)))?new $o(i,"string"):new rx(i);const l=r[0],o=t[l];let u;if(o instanceof Zd)u=new kr(o,l);else if(o instanceof Pt){const d=o._getQuery();if(!d.from)throw new ax(i);u=new Sn(d,l)}else throw new lx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,"from clause");return new Pt({...this.query,from:i})}join(t,i,r="left"){const[l,o]=this._createRefForSource(t,"join clause"),d=[...this._getCurrentAliases(),l],p=Si(d),g=i(p);let m,y;if(g.type==="func"&&g.name==="eq"&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new ox;const v={from:o,type:r,left:m,right:y},w=this.query.join||[];return new Pt({...this.query,join:[...w,v]})}leftJoin(t,i){return this.join(t,i,"left")}rightJoin(t,i){return this.join(t,i,"right")}innerJoin(t,i){return this.join(t,i,"inner")}fullJoin(t,i){return this.join(t,i,"full")}where(t){const i=this._getCurrentAliases(),r=Si(i),l=t(r),o=sc(l)?ae(l):l;if(!zr(o))throw new Y0(vS(o));const u=this.query.where||[];return new Pt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?hS(i):Si(i),l=t(r),o=sc(l)?ae(l):l;if(!zr(o))throw new Y0(vS(o));const u=this.query.having||[];return new Pt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Si(i);let l=t(r);sc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Gv(l,i);return new Pt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i="asc"){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?hS(r):Si(r),o=t(l),u=typeof i=="string"?{direction:i,nulls:"first"}:{direction:i.direction??"asc",nulls:i.nulls??"first",stringSort:i.stringSort,locale:i.stringSort==="locale"?i.locale:void 0,localeOptions:i.stringSort==="locale"?i.localeOptions:void 0},d=m=>({expression:ae(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Pt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Si(i),l=t(r),o=Array.isArray(l)?l.map(d=>ae(d)):[ae(l)],u=this.query.groupBy||[];return new Pt({...this.query,groupBy:[...u,...o]})}limit(t){return new Pt({...this.query,limit:t})}offset(t){return new Pt({...this.query,offset:t})}distinct(){return new Pt({...this.query,distinct:!0})}findOne(){return new Pt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Pt({...t.query,select:void 0,fnSelect:i})},where(i){return new Pt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Pt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new cx;return this.query}}function vS(s){return s===null?"null":s===void 0?"undefined":typeof s=="object"?"object":typeof s}function ZA(s){return s===void 0?ae(null):s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be?s:ae(s)}function Vv(s){return s!==null&&typeof s=="object"&&!zr(s)&&!s.__refProxy}function Gv(s,t=[]){if(!Vv(s))return ZA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r=="string"&&r.startsWith("__SPREAD_SENTINEL__")){i[r]=l;continue}if(l instanceof Pt){i[r]=Nh(l,r,t,"collection");continue}if(l instanceof DT){if(!(l.query instanceof Pt))throw new Error("toArray() must wrap a subquery builder");i[r]=Nh(l.query,r,t,"array");continue}if(l instanceof RT){if(!(l.query instanceof Pt))throw new Error("concat(toArray(...)) must wrap a subquery builder");i[r]=Nh(l.query,r,t,"concat");continue}i[r]=Gv(l,t)}return i}function np(s){const t=[];switch(s.type){case"ref":t.push(s);break;case"func":for(const i of s.args??[])t.push(...np(i));break}return t}function WA(s,t){const i=typeof s=="object"&&"expression"in s?s.expression:s;return np(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const O of l.join)o.push(O.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let O=0;O=2){for(let z=0;z<$.args.length;z++){const I=$.args[z];if(I.type==="func"&&I.name==="eq"&&I.args.length===2){const X=bS(I.args[0],I.args[1],i,o);if(X){u=X.parentRef,d=X.childRef,p=O,g=z;break}}}if(u)break}}if(!u||!d||p===-1)throw new Error(`Includes subquery for "${t}" must have a WHERE clause with an eq() condition that correlates a parent field with a child field. Example: .where(({child}) => eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const O=m[p],$=(typeof O=="object"&&"expression"in O?O.expression:O).args.filter((z,I)=>I!==g);if($.length===1){const z=typeof O=="object"&&"expression"in O&&O.residual;m[p]=z?{expression:$[0],residual:!0}:$[0]}else{const z=new Je("and",$),I=typeof O=="object"&&"expression"in O&&O.residual;m[p]=I?{expression:z,residual:!0}:z}}else m.splice(p,1);const y=[],v=[];for(const O of m)WA(O,i)?v.push(O):y.push(O);let w;if(v.length>0){const O=new Set;w=[];for(const k of v){const $=typeof k=="object"&&"expression"in k?k.expression:k;for(const z of np($))z.path[0]!=null&&i.includes(z.path[0])&&!O.has(z.path.join("."))&&(O.add(z.path.join(".")),w.push(z))}}const b={...l,where:y.length>0?y:void 0},E=b.select,T=E===void 0||Vv(E);let B=b,R;if(r==="concat"&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r==="collection")throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);R=DC,B={...b,select:{[R]:E}}}return new Oi(B,u,d,t,v.length>0?v:void 0,w,r,R)}function bS(s,t,i,r){if(s.type==="ref"&&t.type==="ref"){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function PA(s){const t=s(new Pt);return $v(t)}function $v(s){return s._getQuery()}function tO(s){const t={};function i(o){o.type==="collectionRef"?t[o.collection.id]=o.collection:o.type==="queryRef"&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Oi?r(d.query):sp(d)&&l(d))}return r(s),t}function Yv(s){const t=s.from;if(t.type==="collectionRef")return t.collection;if(t.type==="queryRef")return Yv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function eO(s){const t=new Map;function i(o){if(o)if(o.type==="collectionRef"){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type==="queryRef"&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Oi?l(d.query):sp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function sp(s){return!(s===null||typeof s!="object"||s instanceof Oi||"type"in s&&typeof s.type=="string"||s.__refProxy)}function nO(s){const t=typeof s.query=="function"?PA(s.query):$v(s.query);if(t.select&&!sp(t.select))throw new hx;return t}function sO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type==="insert"?r.push([[o,l.value],1]):l.type==="update"?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new re(r)),r.length}function*iO(s){for(const t of s)t.type==="update"?(yield{type:"delete",key:t.key,value:t.previousValue},yield{type:"insert",key:t.key,value:t.value}):yield t}function rO(s,t){const i=[];for(const r of s){if(r.type==="insert"){if(t.has(r.key))continue;t.add(r.key)}else r.type==="delete"&&t.delete(r.key);i.push(r)}return i}function aO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type==="delete")continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function lO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?ep(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!=="ref")return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function oO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=nl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=ep(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const wS=Symbol.for("@tanstack/db.collection-config-builder");class cO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=tp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status==="loadingSubset")this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status==="loadingSubset"&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=rO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=sO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=lO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const B=iO(T);this.sendChangesToPipelineWithTracking(B,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const w=this.collection.on("truncate",()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on("unsubscribed",()=>{w()});const b=ep(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:b,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:b,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[wS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[wS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=oO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=aO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let uO=0;class fO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++uO}`,this.query=nO({query:t.query}),this.collections=tO(this.query);const i=eO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Qv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Yv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type==="queryRef"&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Qd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new jx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on("loadingSubset:change",l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("maybeRunGraph called without active sync session. This should not happen.");this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??rc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun=="function"&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("scheduleGraphRun called without active sync session. This should not happen.");let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:"full",sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on("loadingSubset:change",u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new H_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new Ux(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(od(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(SO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=yO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const w=new Map;for(const[,b]of p){const E=this.config.getKey(b.value),T=w.get(E);T?(T.inserts+=b.inserts,T.deletes+=b.deletes,b.inserts>0&&(T.value=b.value,b.orderByIndex!==void 0&&(T.orderByIndex=b.orderByIndex))):w.set(E,{...b})}v=w}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Cd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(od(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,w]=p,b=jr(v,w);let E=l.pendingChildChanges.get(b);E||(E=new Map,l.pendingChildChanges.set(b,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Fv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:"insert"});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:"update"});else if(u>0)l({value:p,type:"delete"});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l==="error"){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l==="cleaned-up"){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus("error")}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=XA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new cO(u,d,p,this),y=p.on("status:change",b=>{this.handleSourceStatusChange(t,d,b)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Qv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function ES(s){return s.materialization!=="collection"}function CS(s,t){if(!t)return s.materialization==="array"?[]:s.materialization==="concat"?"":void 0;if(s.materialization==="collection")return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization==="array"?r:r.map(l=>String(l??"")).join("")}function Fv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(od(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,w]=p,b=jr(v,w);let E=r.get(b);E||(E=new Map,r.set(b,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Fv(i.childCompilationResult.includes,t)),l})}function hO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function dO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(w.value=y.value,y.orderByIndex!==void 0&&(w.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function pO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function gO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Jv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function jr(s,t){return t==null?s:JSON.stringify([s,t])}function xS(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Qv(u):void 0,m={collection:Xd({id:`__child-collection:${s}-${t}-${nl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:"full",sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=hO(l)),m}function Cd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,w=v[Ar]?.[o.fieldName],b=w?.correlationKey,E=w?.parentContext??null,T=jr(b,E);if(b!=null){if(!o.childRegistry.has(T)){const k=xS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,k)}let B=o.correlationToParentKeys.get(T);B||(B=new Set,o.correlationToParentKeys.set(T,B)),B.add(m);const R=CS(o,o.childRegistry.get(T));v[o.fieldName]=R;const O=t.get(m);O&&O!==v&&(O[o.fieldName]=R)}}}const u=ES(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=xS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization==="collection"&&mO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[w,b]of y)v.resultKeys.set(b.value,w),v.orderByIndices&&b.orderByIndex!==void 0&&v.orderByIndices.set(b.value,b.orderByIndex),b.inserts>0&&b.deletes===0?v.syncMethods.write({value:b.value,type:"insert"}):b.inserts>b.deletes||b.inserts===b.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(b.value))?v.syncMethods.write({value:b.value,type:"update"}):b.deletes>0&&v.syncMethods.write({value:b.value,type:"delete"});v.syncMethods.commit()}pO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=dO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Cd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Cd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=ES(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const w=o.childRegistry.get(y);for(const b of v){const E=t.get(b);if(E){const T=l.collection.getKeyFromItem(E),B={...E};E[o.fieldName]=CS(o,w),m.push({type:"update",key:T,value:E,previousValue:B})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],w=v?.correlationKey,b=v?.parentContext??null,E=jr(w,b);if(w!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(gO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function yO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function mO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function SO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function _S(s){return new fO(s).getConfig()}function Bh(s){if(typeof s=="function"){const i=_S({query:s});return TS(i)}else{const t=s,i=_S(t);return t.utils&&(i.utils={...i.utils,...t.utils}),TS(i)}}function TS(s){const t=Xd(s),i=FA(s);return i&&JA(t,i),t}function Xv(s){return s!=null&&"operation"in s.headers}function Zv(s){return s!=null&&"control"in s.headers}var vO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Xv(s))return;s.headers.txid&&typeof s.headers.txid=="string"&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!=="delete"&&(typeof s.value!="object"||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i==="upsert"&&(i=this.existingKeys.get(s.type)?.has(s.key)?"update":"insert");const o=this.existingKeys.get(s.type);i==="insert"||i==="update"?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error("[StreamDB] Error in handler.write():",u),console.error("[StreamDB] Event that caused error:",{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Zv(s))switch(s.headers.control){case"reset":for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error("[StreamDB] Error in handler.commit():",t),t instanceof Error&&t.message.includes("already exists in the collection")&&t.message.includes("live-query")){console.warn("[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error"),console.warn("[StreamDB] Queries with groupBy may show stale data until fixed");continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const AS=new Set(["collections","preload","close","utils","actions"]);function wO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"insert"}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(", ")??"Unknown validation error"}`);if(o!==void 0){const m=i["~standard"].validate(o);if("issues"in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(", ")??"Unknown validation error"}`)}const p=l[t],g=r??(p!=null&&p!==""?String(p):void 0);if(g==null||g==="")throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:"update"}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(", ")??"Unknown validation error"}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:"delete"}}},upsert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"upsert"}}}}}function Wv(s){for(const r of Object.keys(s))if(AS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(AS).join(", ")})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...wO(l.type,l.primaryKey,l.schema)};return i}function Pv(s){const{streamOptions:t,state:i,actions:r}=s,l=new Ln(t),o=new vO,u={};for(const[w,b]of Object.entries(i)){const E=Xd({id:`stream-db:${w}`,schema:b.schema,getKey:T=>String(T[b.primaryKey]),sync:bO(b.type,o,b.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${w}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:"size"in E}),u[w]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let w=0,b=Date.now();d.subscribeJson(T=>{try{w++,b=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${w}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const B of T.items)Xv(B)?o.dispatchChange(B):Zv(B)&&o.dispatchControl(B);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${w}`),o.markUpToDate(),console.log("[StreamDB] Successfully marked up-to-date")),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${w}`)}catch(B){console.error("[StreamDB] Error processing batch:",B),console.error("[StreamDB] Failed batch:",T),o.rejectAll(B),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-b;console.log(`[StreamDB] Health: ${w} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener("abort",()=>{clearInterval(E),console.log("[StreamDB] Aborted - cleaning up health check")})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error("StreamDB closed")),p.abort()},utils:{awaitTxId:(w,b)=>o.awaitTxId(w,b)}};console.log("[StreamDB] Creating db object with collections:",Object.keys(u));const v={collections:u,...y};if(console.log("[StreamDB] db.collections:",Object.keys(v.collections)),console.log("[StreamDB] db.collections.events:",v.collections.events),r){const w=r({db:v,stream:l}),b={};for(const[E,T]of Object.entries(w))b[E]=gA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:b}}return v}const ip=600,EO=ip/2*1e3,CO=3600*24,xO={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.roomId!="string"||t.roomId.length===0?{issues:[{message:"roomId must be a non-empty string"}]}:typeof t.name!="string"||t.name.length===0?{issues:[{message:"name must be a non-empty string"}]}:typeof t.boardSize!="string"?{issues:[{message:"boardSize must be a string"}]}:typeof t.createdAt!="number"?{issues:[{message:"createdAt must be a number"}]}:typeof t.expiresAt!="number"?{issues:[{message:"expiresAt must be a number"}]}:t.playerCount!==void 0&&typeof t.playerCount!="number"?{issues:[{message:"playerCount must be a number"}]}:{value:t}}}},Lh=Wv({rooms:{schema:xO,type:"stream",primaryKey:"roomId"}}),_O={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.playerName!="string"||t.playerName.length===0?{issues:[{message:"playerName must be a non-empty string"}]}:typeof t.score!="number"?{issues:[{message:"score must be a number"}]}:typeof t.timestamp!="number"?{issues:[{message:"timestamp must be a number"}]}:{value:t}}}},OS=Wv({scores:{schema:_O,type:"stream",primaryKey:"playerName"}});function TO(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const tb=W.createContext(null);function eb(){const s=W.useContext(tb);if(!s)throw new Error("useRegistryContext must be used within RegistryProvider");return s}function AO({children:s}){const{dsEndpoint:t,dsHeaders:i}=jd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:"application/json"}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:"application/json",ttlSeconds:CO}),o=await TO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error("[Registry] Failed to initialize:",g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f",color:"rgba(235,235,245,0.68)",fontSize:8},children:"LOADING..."}):r.error||!r.registryDB?Q.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:12,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},children:Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Registry Error: ",r.error?.message||"Failed to load"]})}):Q.jsx(tb.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function OO(s,t=[]){const i=s&&typeof s=="object"&&typeof s.subscribeChanges=="function"&&typeof s.startSyncImmediate=="function"&&typeof s.id=="string",r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((b,E)=>b!==t[E]));if(p)if(i)s.config?.syncMode==="on-demand"&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new UT,this._events=new hA,this._indexes=new VT,this._lifecycle=new BT(t,this.id),this._mutations=new fA(t,this.id),this._state=new _T(t),this._sync=new LT(t,this.id),this.comparisonOpts=dA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status==="ready"}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return ET(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function dA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??"locale",locale:t.stringSort==="locale"?t.locale:void 0,localeOptions:t.stringSort==="locale"?t.localeOptions:void 0}}else return{stringSort:"locale"}}function pA(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function gA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(pA(u))throw new PC}),o}}function yA(s){const t=mA(s);let i=s,r,l=0;const o=10;for(;lNv(u)),l=Bv(r),o=zv(s);for(const[u,d]of l.singleSource)SA(s,u)&&!o.has(u)&&t.set(u,d);return t}function SA(s,t){if(s.from.alias===t)return s.from.type==="collectionRef";if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type==="collectionRef"}return!1}function zv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type==="left"||r.type==="full")&&t.add(l),(r.type==="right"||r.type==="full")&&t.add(i)}}return t}function gd(s){const t={...s,from:s.from.type==="queryRef"?new Sn(gd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type==="queryRef"?new Sn(gd(i.from.query),i.from.alias):i.from}))};return vA(t)}function vA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=md(s.where),p=mc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!V0(d)),r=md(t).map(d=>Nv(d)),l=Bv(r),o=bA(s,l),u=s.where.filter(d=>V0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function jv(s){return{...s,from:yd(s.from),join:s.join?.map(t=>({...t,from:yd(t.from)}))}}function yd(s){if(s.type==="collectionRef")return s;const t=jv(s.query);if(wA(t)){const i=yd(t.from);return i.type==="collectionRef"?new kr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function wA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function md(s){const t=[];for(const i of s){const r=Hd(i);t.push(...Wd(r))}return t}function Wd(s){if(s.type==="func"&&s.name==="and"){const t=[];for(const i of s.args)t.push(...Wd(i));return t}else return[s]}function Nv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case"ref":if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case"func":l.args&&l.args.forEach(r);break;case"val":break;case"agg":l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Bv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,mc(u));const l=i.length>0?mc(i):void 0;return{singleSource:r,multiSource:l}}function bA(s,t){const i=new Set,r=zv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=mS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:mS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(RC(v)):d.push(v);const g=d.length>1?[mc(d.flatMap(y=>Wd(Hd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(s){return{from:s.from.type==="collectionRef"?new kr(s.from.collection,s.from.alias):new Sn(_r(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type==="collectionRef"?new kr(t.from.collection,t.from.alias):new Sn(_r(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function mS(s,t,i){const r=t.get(s.alias);if(!r)return s.type==="collectionRef"?new kr(s.collection,s.alias):new Sn(_r(s.query),s.alias);if(s.type==="collectionRef"){const u={from:new kr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!AA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);const l=s.query.where||[],o={..._r(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function EA(s,t,i){return s.select?Lv(s.select)||OA(s.select,t,i):!1}function CA(s){return s.groupBy&&s.groupBy.length>0}function xA(s){return s.having&&s.having.length>0}function _A(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function TA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function AA(s,t,i){return!(EA(s,t,i)||CA(s)||xA(s)||_A(s)||TA(s))}function Lv(s){for(const t of Object.values(s))if(typeof t=="object"){const i=t;if(i.type==="agg"||!("type"in i)&&Lv(i))return!0}return!1}function Pd(s){const t=[];if(s==null||typeof s!="object")return t;switch(s.type){case"ref":t.push(s);break;case"func":case"agg":for(const i of s.args??[])t.push(...Pd(i));break}return t}function OA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith("__SPREAD_SENTINEL__")||u instanceof Me||r.add(o);const l=Pd(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=Pd(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function mc(s){if(s.length===0)throw new kx;return s.length===1?s[0]:new Je("and",s)}function RA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R){let A=s;for(const z of t)A=MA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R);return A}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R){const A=t.from.type==="collectionRef",{alias:z,input:I,collectionId:H}=UA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,R);i[z]=I,A&&(T[z]=H);const K=p[r],X=p[H];if(!K)throw new Q0(r);if(!X)throw new Q0(H);const{activeSource:tt,lazySource:J}=jA(t.type,K,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:xt}=kA(t.left,t.right,nt,z),Kt=de(st),ht=de(xt);let M=s.pipe(ue(([Z,at])=>[Cr(Kt(at)),[Z,at]])),q=I.pipe(ue(([Z,at])=>{const ft={[z]:at};return[Cr(ht(ft)),[Z,ft]]}));if(!["inner","left","right","full"].includes(t.type))throw new wx(t.type);if(tt){const Z=tt==="main"?t.from:w.from,at=Z.type==="queryRef"&&(Z.query.limit||Z.query.offset),ft=st.type==="func"||xt.type==="func";if(!at&&!ft){const _=tt==="main"?z:l;y.add(_);const L=tt==="main"?M:q,F=el(w,tt==="main"?xt:st,J),lt=F.collection,it=F.path[0];it&&Nc(it,F.path,lt);const St=L.pipe(nT(zt=>{const vt=N[_]||_,et=g[vt];if(!et)throw new Ux(vt,_,J.id,Object.keys(g));if(et.hasLoadedInitialState())return;const P=zt.getInner().map(([[wt]])=>wt),pt=new Me(F.path);et.requestSnapshot({where:OT(pt,P),optimizedOnly:!0})||et.requestSnapshot()}));tt==="main"?M=St:q=St}}return M.pipe(Rv(q,t.type),zA(t.type))}function kA(s,t,i,r){const l=i.filter(d=>d!==r),o=Sd(s),u=Sd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Ex:o===u?new bx(o):l.includes(o)?u!==r?new xx(r):new _x:new Cx(o)}function Sd(s){switch(s.type){case"ref":return s.path[0]||null;case"func":{const t=new Set;for(const i of s.args){const r=Sd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function UA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case"collectionRef":{const w=t[s.alias];if(!w)throw new yv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case"queryRef":{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[H,K]of E.sourceWhereClauses)b.set(H,K);const A=Object.keys(E.aliasToCollectionId).find(H=>E.aliasToCollectionId[H]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const I=E.pipeline.pipe(ue(H=>{const[K,[X,tt]]=H;return[K,X]}));return{alias:s.alias,input:I,collectionId:E.collectionId}}default:throw new Tx(s.type)}}function zA(s){return function(t){return t.pipe(ps(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s==="inner"?!!(u&&d):s==="left"?!!u:s==="right"?!!d:!0}),ue(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function jA(s,t,i){switch(s){case"left":return{activeSource:"main",lazySource:i};case"right":return{activeSource:"joined",lazySource:t};case"inner":return t.sizeLA(l,r)))}function HA(s){return s.type==="agg"}function qA(s){return s&&typeof s=="object"&&!Ur(s)}function Iv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith("__SPREAD_SENTINEL__")){const u=r.slice(19),d=u.lastIndexOf("__"),p=d>=0?u.slice(0,d):u,g=l&&typeof l=="object"&&"type"in l&&l.type==="ref";if(p.includes(".")||g){const m=[...s],y=g?l:new Me(p.split(".")),v=de(y);i.push({kind:"merge",targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:"merge",targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type==="includesSubquery"){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});continue}if(qA(o)){Iv([...s,r],o,i);continue}if(HA(o)||zr(o))i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});else{if(o===void 0||!Ur(o)){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>u})}else i.push({kind:"field",alias:[...s,r].join("."),compiled:de(o)})}}}const Ar=Symbol("includesRouting");function Sc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;wd(s);const{optimizedQuery:b,sourceWhereClauses:w}=yA(s);let E=b;g.set(E,s),Ed(E,s,g);const T={...t},N={},R={},A={},{alias:z,input:I,collectionId:H}=VA(E.from,T,i,r,l,o,u,d,p,g,N,R,w);A[z]=I;let K=I;if(m&&y){const ht=y.path.slice(1);K=I.pipe(ue(([Z,at])=>[QA(at,ht),[Z,at]])).pipe(Rv(m,"inner")).pipe(ps(([Z,[at]])=>at!=null),ue(([Z,[at,ft]])=>{const[_,L]=at,Y={...L,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),A[z]=K}let X=K.pipe(ue(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=RA(X,E.join,A,H,z,T,p,g,i,r,l,o,u,d,s,Sc,N,R,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=Hd(ht),q=de(M);X=X.pipe(ps(([Z,at])=>Tr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ps(([M,q])=>Tr(ht(q))));const tt=[],J=[];if(E.select){const ht=$A(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=de(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:de(Y)}));at=X.pipe(ue(([Y,F])=>{const lt={};for(const it of L){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(F);let zt=lt[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(_v(L=>L.map(([Y,F])=>[Y,F>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=Sc(ft,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(R,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:de(F)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:F=>{const lt={};for(const it of L){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(F);let zt=lt[it.alias];for(let vt=0;vt({correlationKey:Z(L),parentContext:null})});YA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new ux;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new fx;E.fnSelect?X=X.pipe(ue(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=IA(X,E.select):X=X.pipe(ue(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ue(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[Ar]=q,[ht,M]})));const nt=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=oS(X,E.groupBy,E.having,E.select,E.fnHaving,H,nt):E.select&&Object.values(E.select).some(M=>M.type==="agg"||zr(M))&&(X=oS(X,[],E.having,E.select,E.fnHaving,H,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type==="agg"):!1))throw new dx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ps(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe($_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const L=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([L,Y]):L}:void 0,Z=bT(s,X,E.orderBy,E.select||{},i[H],u,d,E.limit,E.offset,ht).pipe(ue(([ft,[_,L]])=>{const Y=_.$selected,F=SS(bd(Y),_);if(m){const lt=_[z]?.__correlationKey,it=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ft,[F,L,lt,it]]}return[ft,[F,L]]})),at={collectionId:H,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new px;const xt=X.pipe(ue(([ht,M])=>{const q=M.$selected,Z=SS(bd(q),M);if(m){const at=M[z]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ft]]}return[ht,[Z,void 0]]})),Kt={collectionId:H,pipeline:xt,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function KA(s){const t=new Set;if(s.from.type==="collectionRef"&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type==="collectionRef"&&t.add(i.from.alias);return t}function wd(s,t=new Set){const i=KA(s);for(const l of i)if(t.has(l))throw new gx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type==="queryRef"&&wd(s.from.query,r),s.join)for(const l of s.join)l.from.type==="queryRef"&&wd(l.from.query,r)}function VA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case"collectionRef":{const b=t[s.alias];if(!b)throw new yv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case"queryRef":{const b=g.get(s.query)||s.query,w=Sc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[I,H]of w.sourceWhereClauses)v.set(I,H);const R=Object.keys(w.aliasToCollectionId).find(I=>w.aliasToCollectionId[I]===w.collectionId);R&&R!==s.alias&&(y[s.alias]=R);const z=w.pipeline.pipe(ue(I=>{const[H,[K,X]]=I,tt=bd(K);return[H,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new yx(s.type)}}function GA(s){return s instanceof Be||s&&typeof s=="object"&&"type"in s&&s.type==="val"}function bd(s){return GA(s)?s.value:s}function SS(s,t){if(!s||typeof s!="object")return s;let i=!1;for(const r of rd)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of rd)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Ed(s,t,i){if(s.from.type==="queryRef"&&t.from.type==="queryRef"&&(i.set(s.from.query,t.from.query),Ed(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=tp(l,t);r.push(o)}return new Je(s.name,r)}}function ep(s,t){return s.map(r=>{const l=tp(r.expression,t);return{...r,expression:l}})}const Kv=new WeakMap;function FA(s){return s.utils?.[Qd]?.getBuilder?.()}function JA(s,t){Kv.set(s,t)}function XA(s){return Kv.get(s)}class Pt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?"null":"undefined";throw new $o(i,d)}if(Array.isArray(t))throw new $o(i,"array");if(r.length!==1)throw r.length===0?new $o(i,"empty object"):r.every(d=>!isNaN(Number(d)))?new $o(i,"string"):new rx(i);const l=r[0],o=t[l];let u;if(o instanceof Zd)u=new kr(o,l);else if(o instanceof Pt){const d=o._getQuery();if(!d.from)throw new ax(i);u=new Sn(d,l)}else throw new lx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,"from clause");return new Pt({...this.query,from:i})}join(t,i,r="left"){const[l,o]=this._createRefForSource(t,"join clause"),d=[...this._getCurrentAliases(),l],p=mi(d),g=i(p);let m,y;if(g.type==="func"&&g.name==="eq"&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new ox;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Pt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,"left")}rightJoin(t,i){return this.join(t,i,"right")}innerJoin(t,i){return this.join(t,i,"inner")}fullJoin(t,i){return this.join(t,i,"full")}where(t){const i=this._getCurrentAliases(),r=mi(i),l=t(r),o=nc(l)?re(l):l;if(!Ur(o))throw new Y0(vS(o));const u=this.query.where||[];return new Pt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?hS(i):mi(i),l=t(r),o=nc(l)?re(l):l;if(!Ur(o))throw new Y0(vS(o));const u=this.query.having||[];return new Pt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=mi(i);let l=t(r);nc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Gv(l,i);return new Pt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i="asc"){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?hS(r):mi(r),o=t(l),u=typeof i=="string"?{direction:i,nulls:"first"}:{direction:i.direction??"asc",nulls:i.nulls??"first",stringSort:i.stringSort,locale:i.stringSort==="locale"?i.locale:void 0,localeOptions:i.stringSort==="locale"?i.localeOptions:void 0},d=m=>({expression:re(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Pt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=mi(i),l=t(r),o=Array.isArray(l)?l.map(d=>re(d)):[re(l)],u=this.query.groupBy||[];return new Pt({...this.query,groupBy:[...u,...o]})}limit(t){return new Pt({...this.query,limit:t})}offset(t){return new Pt({...this.query,offset:t})}distinct(){return new Pt({...this.query,distinct:!0})}findOne(){return new Pt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Pt({...t.query,select:void 0,fnSelect:i})},where(i){return new Pt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Pt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new cx;return this.query}}function vS(s){return s===null?"null":s===void 0?"undefined":typeof s=="object"?"object":typeof s}function ZA(s){return s===void 0?re(null):s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be?s:re(s)}function Vv(s){return s!==null&&typeof s=="object"&&!Ur(s)&&!s.__refProxy}function Gv(s,t=[]){if(!Vv(s))return ZA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r=="string"&&r.startsWith("__SPREAD_SENTINEL__")){i[r]=l;continue}if(l instanceof Pt){i[r]=jh(l,r,t,"collection");continue}if(l instanceof DT){if(!(l.query instanceof Pt))throw new Error("toArray() must wrap a subquery builder");i[r]=jh(l.query,r,t,"array");continue}if(l instanceof RT){if(!(l.query instanceof Pt))throw new Error("concat(toArray(...)) must wrap a subquery builder");i[r]=jh(l.query,r,t,"concat");continue}i[r]=Gv(l,t)}return i}function np(s){const t=[];switch(s.type){case"ref":t.push(s);break;case"func":for(const i of s.args??[])t.push(...np(i));break}return t}function WA(s,t){const i=typeof s=="object"&&"expression"in s?s.expression:s;return np(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function jh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let H=0;H eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],I=(typeof A=="object"&&"expression"in A?A.expression:A).args.filter((H,K)=>K!==g);if(I.length===1){const H=typeof A=="object"&&"expression"in A&&A.residual;m[p]=H?{expression:I[0],residual:!0}:I[0]}else{const H=new Je("and",I),K=typeof A=="object"&&"expression"in A&&A.residual;m[p]=K?{expression:H,residual:!0}:H}}else m.splice(p,1);const y=[],v=[];for(const A of m)WA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const I=typeof z=="object"&&"expression"in z?z.expression:z;for(const H of np(I))H.path[0]!=null&&i.includes(H.path[0])&&!A.has(H.path.join("."))&&(A.add(H.path.join(".")),b.push(H))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||Vv(E);let N=w,R;if(r==="concat"&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r==="collection")throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);R=DC,N={...w,select:{[R]:E}}}return new Ai(N,u,d,t,v.length>0?v:void 0,b,r,R)}function wS(s,t,i,r){if(s.type==="ref"&&t.type==="ref"){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function PA(s){const t=s(new Pt);return $v(t)}function $v(s){return s._getQuery()}function tO(s){const t={};function i(o){o.type==="collectionRef"?t[o.collection.id]=o.collection:o.type==="queryRef"&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Ai?r(d.query):sp(d)&&l(d))}return r(s),t}function Yv(s){const t=s.from;if(t.type==="collectionRef")return t.collection;if(t.type==="queryRef")return Yv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function eO(s){const t=new Map;function i(o){if(o)if(o.type==="collectionRef"){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type==="queryRef"&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Ai?l(d.query):sp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function sp(s){return!(s===null||typeof s!="object"||s instanceof Ai||"type"in s&&typeof s.type=="string"||s.__refProxy)}function nO(s){const t=typeof s.query=="function"?PA(s.query):$v(s.query);if(t.select&&!sp(t.select))throw new hx;return t}function sO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type==="insert"?r.push([[o,l.value],1]):l.type==="update"?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new ie(r)),r.length}function*iO(s){for(const t of s)t.type==="update"?(yield{type:"delete",key:t.key,value:t.previousValue},yield{type:"insert",key:t.key,value:t.value}):yield t}function rO(s,t){const i=[];for(const r of s){if(r.type==="insert"){if(t.has(r.key))continue;t.add(r.key)}else r.type==="delete"&&t.delete(r.key);i.push(r)}return i}function aO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type==="delete")continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function lO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?ep(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!=="ref")return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function oO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=nl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=ep(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const bS=Symbol.for("@tanstack/db.collection-config-builder");class cO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=tp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status==="loadingSubset")this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status==="loadingSubset"&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=rO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=sO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=lO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=iO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on("truncate",()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on("unsubscribed",()=>{b()});const w=ep(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[bS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[bS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=oO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=aO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let uO=0;class fO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++uO}`,this.query=nO({query:t.query}),this.collections=tO(this.query);const i=eO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Qv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Yv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type==="queryRef"&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Qd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new jx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on("loadingSubset:change",l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("maybeRunGraph called without active sync session. This should not happen.");this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ic()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun=="function"&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("scheduleGraphRun called without active sync session. This should not happen.");let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;gc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:"full",sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=gc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on("loadingSubset:change",u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new H_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=Sc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new zx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(od(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(SO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=yO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Cd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(od(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=jr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Fv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:"insert"});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:"update"});else if(u>0)l({value:p,type:"delete"});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l==="error"){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l==="cleaned-up"){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus("error")}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=XA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new cO(u,d,p,this),y=p.on("status:change",w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Qv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function ES(s){return s.materialization!=="collection"}function CS(s,t){if(!t)return s.materialization==="array"?[]:s.materialization==="concat"?"":void 0;if(s.materialization==="collection")return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization==="array"?r:r.map(l=>String(l??"")).join("")}function Fv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(od(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=jr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Fv(i.childCompilationResult.includes,t)),l})}function hO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function dO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function pO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function gO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Jv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function jr(s,t){return t==null?s:JSON.stringify([s,t])}function xS(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Qv(u):void 0,m={collection:Xd({id:`__child-collection:${s}-${t}-${nl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:"full",sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=hO(l)),m}function Cd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Ar]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=jr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=xS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const R=CS(o,o.childRegistry.get(T));v[o.fieldName]=R;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=R)}}}const u=ES(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=xS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization==="collection"&&mO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:"insert"}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:"update"}):w.deletes>0&&v.syncMethods.write({value:w.value,type:"delete"});v.syncMethods.commit()}pO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=dO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Cd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Cd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=ES(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=CS(o,b),m.push({type:"update",key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=jr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(gO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function yO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function mO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function SO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function _S(s){return new fO(s).getConfig()}function Nh(s){if(typeof s=="function"){const i=_S({query:s});return TS(i)}else{const t=s,i=_S(t);return t.utils&&(i.utils={...i.utils,...t.utils}),TS(i)}}function TS(s){const t=Xd(s),i=FA(s);return i&&JA(t,i),t}function Xv(s){return s!=null&&"operation"in s.headers}function Zv(s){return s!=null&&"control"in s.headers}var vO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Xv(s))return;s.headers.txid&&typeof s.headers.txid=="string"&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!=="delete"&&(typeof s.value!="object"||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i==="upsert"&&(i=this.existingKeys.get(s.type)?.has(s.key)?"update":"insert");const o=this.existingKeys.get(s.type);i==="insert"||i==="update"?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error("[StreamDB] Error in handler.write():",u),console.error("[StreamDB] Event that caused error:",{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Zv(s))switch(s.headers.control){case"reset":for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error("[StreamDB] Error in handler.commit():",t),t instanceof Error&&t.message.includes("already exists in the collection")&&t.message.includes("live-query")){console.warn("[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error"),console.warn("[StreamDB] Queries with groupBy may show stale data until fixed");continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function wO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const AS=new Set(["collections","preload","close","utils","actions"]);function bO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"insert"}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(", ")??"Unknown validation error"}`);if(o!==void 0){const m=i["~standard"].validate(o);if("issues"in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(", ")??"Unknown validation error"}`)}const p=l[t],g=r??(p!=null&&p!==""?String(p):void 0);if(g==null||g==="")throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:"update"}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(", ")??"Unknown validation error"}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:"delete"}}},upsert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"upsert"}}}}}function Wv(s){for(const r of Object.keys(s))if(AS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(AS).join(", ")})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...bO(l.type,l.primaryKey,l.schema)};return i}function Pv(s){const{streamOptions:t,state:i,actions:r}=s,l=new Ln(t),o=new vO,u={};for(const[b,w]of Object.entries(i)){const E=Xd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:wO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:"size"in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Xv(N)?o.dispatchChange(N):Zv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log("[StreamDB] Successfully marked up-to-date")),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error("[StreamDB] Error processing batch:",N),console.error("[StreamDB] Failed batch:",T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener("abort",()=>{clearInterval(E),console.log("[StreamDB] Aborted - cleaning up health check")})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error("StreamDB closed")),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log("[StreamDB] Creating db object with collections:",Object.keys(u));const v={collections:u,...y};if(console.log("[StreamDB] db.collections:",Object.keys(v.collections)),console.log("[StreamDB] db.collections.events:",v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=gA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const ip=600,EO=ip/2*1e3,CO=3600*24,xO={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.roomId!="string"||t.roomId.length===0?{issues:[{message:"roomId must be a non-empty string"}]}:typeof t.name!="string"||t.name.length===0?{issues:[{message:"name must be a non-empty string"}]}:typeof t.boardSize!="string"?{issues:[{message:"boardSize must be a string"}]}:typeof t.createdAt!="number"?{issues:[{message:"createdAt must be a number"}]}:typeof t.expiresAt!="number"?{issues:[{message:"expiresAt must be a number"}]}:t.playerCount!==void 0&&typeof t.playerCount!="number"?{issues:[{message:"playerCount must be a number"}]}:{value:t}}}},Bh=Wv({rooms:{schema:xO,type:"stream",primaryKey:"roomId"}}),_O={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.playerName!="string"||t.playerName.length===0?{issues:[{message:"playerName must be a non-empty string"}]}:typeof t.score!="number"?{issues:[{message:"score must be a number"}]}:typeof t.timestamp!="number"?{issues:[{message:"timestamp must be a number"}]}:{value:t}}}},OS=Wv({scores:{schema:_O,type:"stream",primaryKey:"playerName"}});function TO(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:Bh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Bh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Bh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const tw=W.createContext(null);function ew(){const s=W.useContext(tw);if(!s)throw new Error("useRegistryContext must be used within RegistryProvider");return s}function AO({children:s}){const{dsEndpoint:t,dsHeaders:i}=jd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:"application/json"}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:"application/json",ttlSeconds:CO}),o=await TO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error("[Registry] Failed to initialize:",g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f",color:"rgba(235,235,245,0.68)",fontSize:8},children:"LOADING..."}):r.error||!r.registryDB?Q.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:12,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},children:Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Registry Error: ",r.error?.message||"Failed to load"]})}):Q.jsx(tw.Provider,{value:{registryDB:r.registryDB},children:s})}const Lh=1;function OO(s,t=[]){const i=s&&typeof s=="object"&&typeof s.subscribeChanges=="function"&&typeof s.startSyncImmediate=="function"&&typeof s.id=="string",r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode==="on-demand"&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. Instead, use a query builder function: const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const b=new Pt,E=s(b);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E=="object")r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=b=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,b()});return r.current.status==="ready"&&(u.current+=1,b()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const b=u.current,E=r.current;return(!d.current||d.current.version!==b||d.current.collection!==E)&&(d.current={collection:E,version:b}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),w=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)w.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const b=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let B=null,R=null;w.current={get state(){return B||(B=new Map(b)),B},get data(){return R||(R=b.map(([,O])=>O)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return w.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Fo=[{label:"Small (20x20)",cols:20,rows:20},{label:"Medium (30x30)",cols:30,rows:30},{label:"Large (40x40)",cols:40,rows:40}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=eb(),[l,o]=W.useState(DO),[u,d]=W.useState(1),[p,g]=W.useState(!1),[m,y]=W.useState(0),[v,w]=W.useState(!1),[b,E]=W.useState(""),[,T]=W.useState(0);W.useEffect(()=>{const z=setInterval(()=>T(I=>I+1),1e3);return()=>clearInterval(z)},[]);const{data:B=[]}=OO(z=>z.from({rooms:r.collections.rooms})),R=Date.now(),k=[...B.filter(z=>z.expiresAt>R)].sort((z,I)=>I.createdAt-z.createdAt),$=async()=>{if(!p){g(!0);try{const z=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Fo[u],X=Hh(z,I),tt=Date.now(),F={roomId:X,name:z,boardSize:`${I.cols}x${I.rows}`,createdAt:tt,expiresAt:tt+ip*1e3};await r.actions.addRoom(F),o(""),i(X)}catch(z){console.error("Failed to create room:",z)}finally{g(!1)}}};return Q.jsxs("div",{style:ie.container,children:[Q.jsx("style",{children:` +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"Small (20x20)",cols:20,rows:20},{label:"Medium (30x30)",cols:30,rows:30},{label:"Large (40x40)",cols:40,rows:40}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=1,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx("div",{style:ie.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"NAME"}),Q.jsx("input",{style:ie.input,value:s,onChange:z=>t(z.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"ROOM"}),Q.jsx("input",{style:ie.input,value:l,onChange:z=>o(z.target.value),placeholder:"room name",onKeyDown:z=>z.key==="Enter"&&$()}),Q.jsx("div",{style:{display:"flex",gap:4,marginBottom:10},children:Fo.map((z,I)=>Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,...I===u?ie.sizeBtnActive:{}},onClick:()=>d(I),children:z.label},z.label))}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.createBtn,flex:1,opacity:p?.6:1},onClick:$,disabled:p,children:p?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...ie.joinBtn,flex:1},onClick:()=>w(!0),children:"JOIN"})]})]}),v&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>w(!1),children:Q.jsxs("div",{style:{...ie.card,marginBottom:0},onClick:z=>z.stopPropagation(),children:[Q.jsx("div",{style:ie.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:ie.input,value:b,onChange:z=>E(z.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:z=>{if(z.key==="Enter"&&b.trim()){const I=k.find(X=>X.name===b.trim());i(I?I.roomId:Hh(b.trim(),Fo[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.joinBtn,flex:1},onClick:()=>w(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...ie.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const z=k.find(I=>I.name===b.trim());i(z?z.roomId:Hh(b.trim(),Fo[u]))}},children:"JOIN"})]})]})}),k.length>0&&Q.jsxs("div",{style:ie.card,children:[Q.jsx("div",{style:ie.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:k.slice(m*5,m*5+5).map(z=>Q.jsx(MO,{room:z,onJoin:()=>i(z.roomId)},z.roomId))}),k.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,width:28,padding:"4px 0",opacity:m===0?.3:1},disabled:m===0,onClick:()=>y(z=>z-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[m+1,"/",Math.ceil(k.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{...ie.sizeBtn,width:28,padding:"4px 0",opacity:m>=Math.ceil(k.length/5)-1?.3:1},disabled:m>=Math.ceil(k.length/5)-1,onClick:()=>y(z=>z+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:[Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name}),Q.jsx("span",{style:{fontSize:7,color:Jt.dim},children:s.boardSize})]}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const ie={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100dvh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},sizeBtn:{flex:1,padding:"6px 4px",fontSize:6,fontFamily:"inherit",background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer"},sizeBtnActive:{background:"rgba(208,188,255,0.1)",color:Jt.accent,borderColor:Jt.accent},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},Ss=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},xi=()=>new Set,qh=s=>s[s.length-1],UO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ws((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){Ss(this._observers,t,xi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ws((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,ac=Math.abs,ib=(s,t)=>ss>t?s:t,rb=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,ys=64,an=128,Ic=31,_d=63,wi=127,BO=2147483647,bc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=be,Ot=(s,t)=>{for(;t>wi;)be(s,an|wi&t),t=Rn(t/128);be(s,wi&t)},ap=(s,t)=>{const i=rb(t);for(i&&(t=-t),be(s,(t>_d?an:0)|(i?ys:0)|_d&t),t=Rn(t/64);t>0;)be(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=ib(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Hc(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),nD=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":be(s,119),Ei(s,t);break;case"number":LO(t)&&ac(t)<=BO?(be(s,125),ap(s,t)):nD(t)?(be(s,124),PO(s,t)):(be(s,123),tD(s,t));break;case"bigint":be(s,122),eD(s,t);break;case"object":if(t===null)be(s,126);else if(Lc(t)){be(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),bn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),bn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",Ei(t,this.sarr.join("")),Hc(t,this.lensE.toUint8Array()),bn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},wn=()=>{throw qn("Unexpected case")},ab=qn("Unexpected end of array"),lb=qn("Integer out of Range");class qc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new qc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,wt(s)),Br=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posbc)throw lb}throw ab},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&ys)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posbc)throw lb}throw ab},rD=s=>{let t=wt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ci=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ci,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rb(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class $h extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new oc(t),this.str=Ci(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ob=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ob()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cb=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cb=localStorage,yD=!1)}catch{}const mD=cb,cl=Symbol("Equality"),ub=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,bD=Object.keys,wD=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||Ec(s)===Ec(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&ub(t[r],i)),xD=Object.freeze,fb=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fb(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hb={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Cc=s=>IS(ul?hb[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),db=s=>Dd("--"+s)||Cc(s)!==null,AD=db("production"),OD=ul&&_D(hb.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!db("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Cc("COLORTERM")!==null||(Cc("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const fs=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pb=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pb(s,t,i),zD=s=>IO(hp(s,97,122)),UD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?ub(s,t):Lc(s)?rp(s,i=>nb(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,Yc)}get optional(){return new mb(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const he=(s,t=null)=>new dp(s,t);he(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ce=s=>new pp(s);he(pp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Vc=(...s)=>new Kc(s),gb=he(Kc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yb=s=>{if(Lr.check(s))return[BD(s)];if(gb.check(s))return s.shape.map(t=>t+"");if(Tb.check(s))return["[+-]?\\d+.?\\d*"];if(Ab.check(s))return[".*"];if(xc.check(s))return s.shape.map(yb).flat(1);wn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yb).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}he(LD);const ID=Symbol("optional");class mb extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=he(mb);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}he(qD);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Gc(s),VD=he(Gc),GD=Ce(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sb extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vb=(s,t)=>new Sb(s,t),$D=he(Sb);class bb extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new bb(s);he(bb);class wb extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Lc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Eb=(...s)=>new wb(s),QD=he(wb),FD=Ce(s=>Lc(s));class Cb extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cb(s,t);he(Cb);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=he(ZD),PD=Ce(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}he(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nb(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),xc=he(gp),xb=()=>!0,_c=Ce(xb),eR=he(pp,s=>s.shape===xb),yp=Ce(s=>typeof s=="bigint"),nR=Ce(s=>s===yp),_b=Ce(s=>typeof s=="symbol");Ce(s=>s===_b);const Dr=Ce(s=>typeof s=="number"),Tb=Ce(s=>s===Dr),Lr=Ce(s=>typeof s=="string"),Ab=Ce(s=>s===Lr),$c=Ce(s=>typeof s=="boolean"),sR=Ce(s=>s===$c),Ob=Vc(void 0);he(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),iR=he(Kc,s=>s.shape.length===1&&s.shape[0]===null);he(Uint8Array);he(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,Yc,Ob,yp,$c,_b);(()=>{const s=Eb(_c),t=vb(Lr,_c),i=Gr(Dr,Lr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Vc(s);if(PD.check(s))return he(s)}wn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Db=lR(_c).if(Tb,(s,t)=>Yh(t,MS,bc)).if(Ab,(s,t)=>UD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,bc))).if(xc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Db(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pb(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,Yc,Ob,yp,$c,Eb(Dr),vb(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDb(fl(t),s),Qc=typeof document<"u"?document:{};Ce(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ce(s=>s.nodeType===cR);Ce(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Qc.ELEMENT_NODE,uR=Qc.TEXT_NODE,fR=Qc.DOCUMENT_NODE,hR=Qc.DOCUMENT_FRAGMENT_NODE;Ce(s=>s.nodeType===fR);const vs=Symbol,Rb=vs(),Mb=vs(),dR=vs(),pR=vs(),gR=vs(),kb=vs(),yR=vs(),mp=vs(),mR=vs(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...zb(s)),Ub.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...zb(s)),s.unshift(mp),Ub.forEach(t=>t.print(s))},Ub=xi(),jb=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jb(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jb(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nb{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Bb=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{Ss(s.clients,t,()=>[]).push(new Nb(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Ws(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=Ss(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Ib=ob;class $r extends sb{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Ib(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vb,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ws(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=Ss(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,_i)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ws(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Mt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ci(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ci(this.restDecoder))}readKey(){return Ci(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DR{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new oc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new oc(je(t)),this.lenDecoder=new oc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Ws(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zR(s,t.clients.get(l),l,o)})},UR=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=Ws(i.keys()).sort((w,b)=>w-b);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let w=i.get(l[l.length-1]);for(;w.refs.length===w.i;)if(l.pop(),l.length>0)w=i.get(l[l.length-1]);else return null;return w};let u=o();if(u===null)return null;const d=new Vb,p=new Map,g=(w,b)=>{const E=p.get(w);(E==null||E>b)&&p.set(w,b)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const w of r){const b=w.id.client,E=i.get(b);E?(E.i--,d.clients.set(b,E.refs.slice(E.i)),i.delete(b),E.i=0,E.refs=[]):d.clients.set(b,[w]),l=l.filter(T=>T!==b)}r.length=0};for(;;){if(m.constructor!==An){const b=Ss(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(b<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(b===0||b0)m=r.pop();else if(u!==null&&u.i0){const w=new Jc;return Hb(w,d,new Map),Ot(w.restEncoder,0),{missing:p,update:w.toUint8Array()}}return null},NR=(s,t)=>Hb(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Ac(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=UR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,w]of m.missing)if(ww)&&m.missing.set(v,w)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Ac(Nr(d.pendingDs));wt(v.restDecoder);const w=KS(v,l,d);y&&w?d.pendingDs=XS([y,w]):d.pendingDs=y||w}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qb(l.doc,v)}},i,!1),qb=(s,t,i,r=Ac)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qb(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kb=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Jo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw wn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lb(t.ds,s.id),Md=(s,t)=>{const i=Ss(s.meta,Md,xi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gb=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw wn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,zc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$b=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ss(s.changed,t,xi).add(i)},cc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof ge&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=ib(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+cc(l,p)}})},Yb=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kb(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const w=l.clients.get(y),b=Kr(Kn(w,v),1);for(let E=w.length-1;E>=b;)E-=1+cc(w,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,w=l.clients.get(y),b=Kn(w,v);b+11||b>0&&cc(w,b)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(wR(mp,Rb,"[yjs] ",Mb,kb,"Changed the client-id because another client seems to be using it."),r.clientID=Ib()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Jc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yb(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yb(l,0)}}return u};function*$R(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new ge(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,w)=>{if(v.curr.id.client===w.curr.id.client){const b=v.curr.id.clock-w.curr.id.clock;return b===0?v.curr.constructor===w.curr.constructor?0:v.curr.constructor===An?1:-1:b}else return w.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,w=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),w=!0;if(v===null||v.id.client!==y||w&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=b:v=FR(v,b)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qb=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:bn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qb(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qb(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=xi(),l=xi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fb=80;let wp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=wp++}}const WR=s=>{s.timestamp=wp++},Jb=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=wp++},PR=(s,t,i)=>{if(s.length>=Fb){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>ac(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&ac(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;Ss(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kb(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xb=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zb=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ti(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new ge(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tw=()=>qn("Length exceeded!"),ew=(s,t,i,r)=>{if(i>t._length)throw tw();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},nw=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tw();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Dc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Ti([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Ti([r]);break;case Uint8Array:d=new bl(r);break;case $r:d=new wl(r);break;default:if(r instanceof De)d=new bs(r);else throw new Error("Unexpected content type")}new ge(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sw=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},iw=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Xo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Xc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{ew(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nw(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pb(this,t)}toArray(){return Zb(this)}slice(t=0,i=this.length){return Xb(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Wb(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Xo(this)].length}keys(){return Fh(Xo(this),t=>t[0])}values(){return Fh(Xo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Xo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return iw(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Dc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Js=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&wn(),this.right.content.constructor){case ye:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ye:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return WS(s,u,i)}},rw=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ye&&Js(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new ge(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ye(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},aw=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ye&&Js(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lw=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Js(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new ge(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ye(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,w)=>{l[w]===void 0&&(l[w]=null)});const o=s.doc,u=o.clientID;aw(i,l);const d=lw(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new bs(r):new zi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new ge(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rw(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;aw(i,l);const d=lw(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ye));){if(!i.right.deleted)switch(i.right.content.constructor){case ye:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Js(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` -`;i.right=new ge(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rw(s,t,i,d)},ow=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ye){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ye:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ye){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ye:Yr(u,l.content);break;default:t+=ow(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$b(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ye&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bb(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ye?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case zi:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let w=null;switch(d){case"delete":y>0&&(w={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(w={insert:g},l.size>0&&(w.attributes={},l.forEach((b,E)=>{b!==null&&(w.attributes[E]=b)}))),g="";break;case"retain":m>0&&(w={retain:m},ED(p)||(w.attributes=vD({},p))),m=0;break}w&&i.push(w),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case zi:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ye:{const{key:w,value:b}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(w)??null;Js(E,b)?b!==null&&u.delete(r):(d==="retain"&&v(),Js(b,o.get(w)??null)?delete p[w]:p[w]=b)}}else if(this.deletes(u)){o.set(w,b);const E=l.get(w)??null;Js(E,b)||(d==="retain"&&v(),p[w]=E)}else if(!u.deleted){o.set(w,b);const E=p[w];E!==void 0&&(Js(E,b)?E!==null&&u.delete(r):(d==="retain"&&v(),b===null?delete p[w]:p[w]=b))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const w=i[i.length-1];if(w.retain!==void 0&&w.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((b,E)=>{v=!0,y[E]=b});const w={insert:d};v&&(w.attributes=y),l.push(w),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case bs:case zi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((w,b)=>{v[b]=w})}l.push(y);break}case ye:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sw(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===_i)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class _i extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new _i}clone(){const t=new _i;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ws(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new pM(this,i,t))}toString(){return Wb(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{ew(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nw(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pb(this,t)}slice(t=0,i=this.length){return Xb(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new _i;class qr extends _i{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return wD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Dc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return iw(this,t)}getAttributes(t){return t?nM(this,t):sw(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Rc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Rc(this.hookName)}clone(){const t=new Rc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const gM=s=>new Rc(s.readKey());class Mc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(UM)}}const yM=s=>new Mc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gb(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class bl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new bl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new bl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cw=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class wl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new wl(cw(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new wl(cw(s.readString(),s.readAny()));class zi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new zi(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const wM=s=>new zi(s.readJSON());class ye{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ye(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ye(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,zM=5,UM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new bs(AM[s.readTypeRef()](s)),zc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new ge(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class ge extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ps(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===ge?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===ge&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw wn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ys)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):wn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const uw=(s,t)=>NM[t&Ic](s),NM=[()=>{wn()},vM,CM,SM,TM,wM,EM,jM,_M,bM,()=>{wn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){wn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hw="__ $YJS$ __";fw[hw]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fw[hw]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class uc extends sb{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),bn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(uc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(uc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Xs&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Xs&&(t.status===401||t.status===403)}};const dw=W.createContext(null);function GM(){const s=W.useContext(dw);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,b=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(b.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=30,JM=120,XM=1500,Wo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const br={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap("territoryCell")}function vi(s){return s.getMap("players")}function Ph(s,t){const i=vi(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,w]of[[0,-1],[0,1],[-1,0],[1,0]]){const b=m+v,E=y+w;if(b<0||b>=i||E<0||E>=r)continue;const T=`${b},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:b,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,w]=W.useState(new Map),[b,E]=W.useState({x:0,y:0}),[T,B]=W.useState(1),[R,O]=W.useState(!1),[k,$]=W.useState(!1),[z,I]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),F=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((bt,Dt)=>{bt>et&&(et=bt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=vi(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=fc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=fc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const bt=Wo*g;dt.forEach((Dt,ee)=>{if(Dt>=bt){const ze=vi(t).get(ee);ze?I(ze.name):ee===l&&I(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=vi(t),P=()=>{w(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((bt,Dt)=>{if(Dt!==i.clientID){bt.playerId&&P.add(bt.playerId);const ee=bt.user?.name;ee&&pt.add(ee)}}),B(bt=>{const Dt=pt.size;return bt===Dt?bt:Dt});const dt=vi(t);dt.forEach((bt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in br){dt.preventDefault();const bt=!F.current;et.add(dt.key),F.current=br[dt.key],bt&&H.current?.(br[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in br){let bt=!1;for(const Dt of et)if(Dt in br){F.current=br[Dt],bt=!0;break}bt||(F.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const bt=pt.getScreenCTM();if(!bt)return;const Dt=dt.matrixTransform(bt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,ze=nt.current,ln=ee-ze.x,Cn=$n-ze.y;if(ln===0&&Cn===0)return;const Yn=Math.abs(ln)>Math.abs(Cn)?{dx:ln>0?1:-1,dy:0}:{dx:0,dy:Cn>0?1:-1};F.current=Yn,H.current?.(Yn)},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?F.current={dx:pt>0?1:-1,dy:0}:F.current={dx:0,dy:dt>0?1:-1},q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null,F.current=null},[]),H=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const bt=pt.matrixTransform(dt.inverse()),Dt=bt.x/Yt-.5,ee=bt.y/Yt-.5,$n=nt.current,ze=Dt-$n.x,ln=ee-$n.y;ze===0&&ln===0||(Math.abs(ze)>Math.abs(ln)?H.current?.({dx:ze>0?1:-1,dy:0}):H.current?.({dx:0,dy:ln>0?1:-1}))},[]),J=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,bt=Date.now();if(dt.stunnedUntil&&btXt.x===Dt&&Xt.y===ee);if(ze){const[Xt,Qr]=ze,Ui=bt+XM;dt.stunnedUntil=Ui;const Fr=vi(t);Fr.set(Xt,{...Qr,stunnedUntil:Ui}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:Ui});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),vi(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=fc(t),Yn=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Yn})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Yn})})};H.current=et;const P=setInterval(()=>{const pt=F.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),O(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>O(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const Ut=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` + `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*5,g*5+5).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/5)-1?.3:1},disabled:g>=Math.ceil(A.length/5)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100dvh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` +`;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=30,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } .live-dot { animation: blink 1.5s ease-in-out infinite; } @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsx("button",{onClick:J,style:{background:"none",border:"none",color:Ft.accent,fontFamily:"inherit",fontSize:Ga,padding:"4px 0",cursor:"pointer"},children:"EXIT"}),Q.jsxs("div",{style:{display:"flex",gap:6,cursor:"pointer"},onClick:St,title:"Click to copy room name",children:[Q.jsx("span",{style:{color:Ft.accent},children:o}),Q.jsx("span",{style:{color:Ft.dim},children:"@"}),Q.jsx("span",{style:{color:R?Ft.accent:Ft.text,textDecoration:"underline",textUnderlineOffset:3},children:R?"COPIED":X})]}),Q.jsxs("div",{style:{color:Ft.accent,position:"relative",cursor:"pointer"},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),onClick:()=>$(et=>!et),children:[T," PLAYERS",k&&Q.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,padding:"3px 0"},children:[Q.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[Q.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:et.color,display:"inline-block"}}),et.name]}),Q.jsxs("span",{style:{color:Ft.accent},children:[pt,"%"]})]},et.id)})})]})]}),Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsxs("div",{children:[Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[xt,"%"]})," ",Q.jsx("span",{style:{color:Ft.dim},children:"TERRITORY"})]}),Q.jsxs("div",{style:{textAlign:"right"},children:[Q.jsxs("div",{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?"#FF3D71":Ft.dim},children:["WIN AT ",Math.round(Wo*100),"%"]}),ht&&Q.jsxs("div",{children:[Q.jsx("span",{style:{color:Ft.dim},children:ht.name})," ",Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[ht.pct,"%"]})]})]})]}),Q.jsxs("svg",{ref:M,viewBox:`0 0 ${lt} ${it}`,onTouchStart:at,onTouchMove:ft,onTouchEnd:_,onClick:Y,style:{width:"100%",maxWidth:lt,height:"auto",background:Ft.grid,border:`1px solid ${Ft.border}`,flex:"1 1 auto",minHeight:0,maxHeight:"calc(100dvh - 120px)",objectFit:"contain",userSelect:"none",WebkitUserSelect:"none"},children:[Ut,Array.from(m.entries()).map(([et,P])=>{const[pt,dt]=et.split(",").map(Number),bt=vt.get(P.owner)||Ft.accent;return Q.jsx("rect",{x:pt*Yt,y:dt*Yt,width:Yt,height:Yt,fill:bt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const R=`player-${Math.random().toString(36).slice(2,10)}`,O=i2(r);return{playerId:R,playerColor:s2(O)}}),[{doc:p,awareness:g}]=W.useState(()=>{const R=new $r,O=new LM(R);return O.setLocalState({user:{name:r,color:d},playerId:u}),{doc:R,awareness:O}}),[m,y]=W.useState(!0),[v,w]=W.useState(!1),[b,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const R=new VM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return R.on("synced",O=>{w(O),O&&y(!1)}),R.on("status",O=>{O==="connected"&&y(!1)}),R.on("error",O=>{E(O),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=R,R.connect(),()=>{R.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const O=setInterval(()=>{const k=new Set([u]);if(g.getStates().forEach(I=>{I.playerId&&k.add(I.playerId)}),[...k].sort()[0]!==u)return;const z=o.collections.rooms.toArray.find(I=>I.roomId===s);if(z)try{o.actions.addRoom({...z,expiresAt:Date.now()+ip*1e3})}catch{}},EO);return()=>clearInterval(O)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const B=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return b?Q.jsxs("div",{style:td.center,children:[Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Connection error: ",b.message]}),Q.jsx("button",{onClick:l,style:td.btn,children:"BACK"})]}):m?Q.jsxs("div",{style:td.center,children:[Q.jsx("style",{children:"@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');"}),Q.jsx("div",{style:{color:"#d0bcff",fontSize:8},children:"CONNECTING..."})]}):Q.jsx(dw.Provider,{value:B,children:Q.jsx(YM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const td={center:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:16,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},btn:{fontFamily:"inherit",fontSize:8,padding:"8px 24px",background:"#d0bcff",color:"#000",border:"none",cursor:"pointer"}},rv=["Swift","Bold","Sly","Keen","Cool","Neon","Rad","Zen"],av=["Fox","Wolf","Hawk","Bear","Lynx","Crow","Stag","Hare"];function a2(){const s=rv[Math.floor(Math.random()*rv.length)],t=av[Math.floor(Math.random()*av.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem("territory-player-name");if(s)return s;const t=a2();return localStorage.setItem("territory-player-name",t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=jd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem("territory-player-name",u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=""}}):Q.jsx(RO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(W1,{children:Q.jsx(AO,{children:Q.jsx(c2,{})})})}V1.createRoot(document.getElementById("root")).render(Q.jsx(u2,{})); + `}),Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsx("button",{onClick:F,style:{background:"none",border:"none",color:Ft.accent,fontFamily:"inherit",fontSize:Ga,padding:"4px 0",cursor:"pointer"},children:"EXIT"}),Q.jsxs("div",{style:{display:"flex",gap:6,cursor:"pointer"},onClick:St,title:"Click to copy room name",children:[Q.jsx("span",{style:{color:Ft.accent},children:o}),Q.jsx("span",{style:{color:Ft.dim},children:"@"}),Q.jsx("span",{style:{color:R?Ft.accent:Ft.text,textDecoration:"underline",textUnderlineOffset:3},children:R?"COPIED":X})]}),Q.jsxs("div",{style:{color:Ft.accent,position:"relative",cursor:"pointer"},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),onClick:()=>I(et=>!et),children:[T," PLAYERS",z&&Q.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,padding:"3px 0"},children:[Q.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[Q.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:et.color,display:"inline-block"}}),et.name]}),Q.jsxs("span",{style:{color:Ft.accent},children:[pt,"%"]})]},et.id)})})]})]}),Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsxs("div",{children:[Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[xt,"%"]})," ",Q.jsx("span",{style:{color:Ft.dim},children:"TERRITORY"})]}),Q.jsxs("div",{style:{textAlign:"right"},children:[Q.jsxs("div",{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Zo*100)-5?"#FF3D71":Ft.dim},children:["WIN AT ",Math.round(Zo*100),"%"]}),ht&&Q.jsxs("div",{children:[Q.jsx("span",{style:{color:Ft.dim},children:ht.name})," ",Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[ht.pct,"%"]})]})]})]}),Q.jsxs("svg",{ref:M,viewBox:`0 0 ${lt} ${it}`,onTouchStart:at,onTouchMove:ft,onTouchEnd:_,onClick:Y,style:{width:"100%",maxWidth:lt,height:"auto",background:Ft.grid,border:`1px solid ${Ft.border}`,flex:"1 1 auto",minHeight:0,maxHeight:"calc(100dvh - 120px)",objectFit:"contain",userSelect:"none",WebkitUserSelect:"none"},children:[zt,Array.from(m.entries()).map(([et,P])=>{const[pt,dt]=et.split(",").map(Number),wt=vt.get(P.owner)||Ft.accent;return Q.jsx("rect",{x:pt*Yt,y:dt*Yt,width:Yt,height:Yt,fill:wt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const R=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:R,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const R=new $r,A=new LM(R);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:R,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const R=new VM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return R.on("synced",A=>{b(A),A&&y(!1)}),R.on("status",A=>{A==="connected"&&y(!1)}),R.on("error",A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=R,R.connect(),()=>{R.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const H=o.collections.rooms.toArray.find(K=>K.roomId===s);if(H)try{o.actions.addRoom({...H,expiresAt:Date.now()+ip*1e3})}catch{}},EO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs("div",{style:td.center,children:[Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Connection error: ",w.message]}),Q.jsx("button",{onClick:l,style:td.btn,children:"BACK"})]}):m?Q.jsxs("div",{style:td.center,children:[Q.jsx("style",{children:"@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');"}),Q.jsx("div",{style:{color:"#d0bcff",fontSize:8},children:"CONNECTING..."})]}):Q.jsx(db.Provider,{value:N,children:Q.jsx(YM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const td={center:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:16,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},btn:{fontFamily:"inherit",fontSize:8,padding:"8px 24px",background:"#d0bcff",color:"#000",border:"none",cursor:"pointer"}},rv=["Swift","Bold","Sly","Keen","Cool","Neon","Rad","Zen"],av=["Fox","Wolf","Hawk","Bear","Lynx","Crow","Stag","Hare"];function a2(){const s=rv[Math.floor(Math.random()*rv.length)],t=av[Math.floor(Math.random()*av.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem("territory-player-name");if(s)return s;const t=a2();return localStorage.setItem("territory-player-name",t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=jd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem("territory-player-name",u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=""}}):Q.jsx(RO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(W1,{children:Q.jsx(AO,{children:Q.jsx(c2,{})})})}V1.createRoot(document.getElementById("root")).render(Q.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index 8922052c0b..8d5599fb27 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -10,12 +10,13 @@ padding: 0; box-sizing: border-box; } - body { + html, body { + height: 100%; background: #1b1b1f; overflow: hidden; } - +
From 32b18af9eed8a5f748d5b3f2c7eab97075942a81 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:10:18 +0000 Subject: [PATCH 06/36] docs: re-add Territory Wars demo embed to blog post Co-Authored-By: Claude Opus 4.6 (1M context) --- ...5-yjs-durable-streams-on-electric-cloud.md | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 671c209bea..41127e6b42 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -1,27 +1,23 @@ --- title: 'Yjs CRDTs over HTTP on Durable Streams' description: >- - A new Yjs provider built on Durable Streams. Sync collaborative documents over plain HTTP with built-in compaction, presence, and CDN caching. Open protocol, now live on Electric Cloud. + Yjs sync over HTTP instead of WebSockets. y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching. Now live on Electric Cloud. excerpt: >- - We've built a new Yjs provider on Durable Streams — sync documents over plain HTTP instead of WebSockets. Open protocol with built-in compaction, now live on Electric Cloud. + We've released y-durable-streams — a new Yjs provider that syncs collaborative documents over plain HTTP instead of WebSockets. Open protocol with built-in compaction, now live on Electric Cloud. authors: [balegas] -image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg +image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png tags: [durable-streams, cloud, release, sync, collaboration] outline: [2, 3] post: true published: true --- -Yjs durable streams are now available on [Electric Cloud](/cloud). Real-time collaborative editing, as a managed service. - -We've built a new Yjs provider on [Durable Streams](/primitives/durable-streams) — sync Yjs documents over plain HTTP instead of WebSockets. Open protocol with built‑in compaction, now live on [Electric Cloud](/cloud). - -> [!info] 🚀  Try it now -> Sign up to [Electric Cloud](https://dashboard.electric-sql.com), create a Yjs service, and connect your app. -> See the [`y-durable-streams` source](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) and [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub. - [Yjs](https://yjs.dev) is the de facto library for collaborative editing on the web. It's battle-proven, CRDT-based, and powers tools like [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), [BlockNote](https://www.blocknotejs.org/) and more. And it's not just collaboration between humans anymore — agents are increasingly editing documents, generating code, and filling in forms alongside users. Whether it's humans or agents collaborating, they need reliable, conflict-free sync. +>[!info] 🚀  Try it now +>Sign up to [Electric Cloud](https://dashboard.electric-sql.com), create a Yjs service, and connect your app. +>See the [`y-durable-streams` source](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) and [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub. + ## The problem with WebSockets Most Yjs setups are built on WebSockets to relay updates to clients. WebSockets are point-to-point connections with no fan-out distribution. They require sticky connections and content can't be cached at a CDN, which means there is a latency penalty for every user or agent that needs to retrieve the initial state of a document. @@ -38,12 +34,13 @@ The provider handles document sync, server-side compaction, and awareness out of ## How it works -`y-durable-streams` uses a four-step sync protocol over HTTP. For the full wire format and details, see the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) specification. +`y-durable-streams` syncs documents over HTTP using the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md). + +**Initial sync** — the client requests `?offset=snapshot`. The server responds with a `307` redirect to the latest compacted snapshot — a stable, offset-addressed URL. The client loads the snapshot and reads the `Stream-Next-Offset` header to know where to resume. If no snapshot exists yet, the redirect points to `offset=-1` and the client reads all updates from the beginning. + +**Live updates** — from the snapshot's offset, the client subscribes via long-polling or SSE. Local edits are POSTed to the same URL. All reads and writes use a binary protocol. -1. **Snapshot discovery** — requests `?offset=snapshot`. The server responds with a `307` redirect to the latest snapshot offset, or to `-1` if no snapshot exists. -2. **Snapshot loading** — fetches the binary Yjs snapshot and applies it to the local document. The response includes a `Stream-Next-Offset` header indicating where to continue. -3. **Live updates** — streams incremental updates from the offset via long-polling or SSE. Local edits are sent through an idempotent producer for exactly-once delivery. -4. **Awareness** — presence data (cursors, selections, user info) is delivered over the same document URL with parameter `?awareness=...` , it's just a durable stream and clients always subscribe at the tip of the stream. Awareness streams have a built-in TTL, so stale state from disconnected clients is pruned automatically. +**Awareness** — presence data (cursors, selections, user info) is delivered over the same document URL with `?awareness=...`. It's just a durable stream — clients subscribe at the tip with `offset=now`, so there's no history to replay. Awareness streams have a built-in TTL, so stale state from disconnected clients is pruned automatically. Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting the durable streams server. As documents grow, the server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) updates into a new snapshot — transparent to connected clients, fast for new ones. @@ -90,9 +87,9 @@ Clone the [demo app](https://github.com/durable-streams/durable-streams/tre ## No lock-in -Durable Streams is [open source](https://github.com/durable-streams/durable-streams) under the MIT license. The Yjs protocol is [fully documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) with a conformance test suite — you can self-host, switch providers, or build your own compatible server at any time. +The Yjs Durable Streams protocol is [fully documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) with a conformance test suite — you can self-host, switch providers, or build your own compatible server at any time. -Electric Cloud runs the same open protocol as a managed service. No proprietary APIs, no migration path to worry about — just a faster way to get started. +Electric Cloud implements the documented protocol strictly — no proprietary extensions, no vendor-specific APIs. It's just a faster way to get started. ## Territory Wars demo From 83b09bf0517db30e2c16f60028c93a9455058bd0 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:16:18 +0000 Subject: [PATCH 07/36] docs: shorter demo section, fixed 600px iframe height, rebuilt bundle Co-Authored-By: Claude Opus 4.6 (1M context) --- .../2026-03-25-yjs-durable-streams-on-electric-cloud.md | 6 +++--- .../assets/{index-DktWL1Q6.js => index-C69yBkyF.js} | 2 +- website/public/demos/territory-wars/index.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename website/public/demos/territory-wars/assets/{index-DktWL1Q6.js => index-C69yBkyF.js} (97%) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 41127e6b42..c0edf3421b 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -91,11 +91,11 @@ The Yjs Durable Streams protocol is [fully documented](https://github.com/durabl Electric Cloud implements the documented protocol strictly — no proprietary extensions, no vendor-specific APIs. It's just a faster way to get started. -## Territory Wars demo +## Demo -To show what Yjs on Durable Streams can do beyond text editing, we built a multiplayer territory game. Players claim cells by moving over them — each cell is a Yjs CRDT entry, with last-writer-wins resolving contention when two players claim the same cell. Encircle an area to fill it. +Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. - + ## Next steps diff --git a/website/public/demos/territory-wars/assets/index-DktWL1Q6.js b/website/public/demos/territory-wars/assets/index-C69yBkyF.js similarity index 97% rename from website/public/demos/territory-wars/assets/index-DktWL1Q6.js rename to website/public/demos/territory-wars/assets/index-C69yBkyF.js index b1602212da..783208a7dc 100644 --- a/website/public/demos/territory-wars/assets/index-DktWL1Q6.js +++ b/website/public/demos/territory-wars/assets/index-C69yBkyF.js @@ -29,7 +29,7 @@ Instead, use a query builder function: Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"Small (20x20)",cols:20,rows:20},{label:"Medium (30x30)",cols:30,rows:30},{label:"Large (40x40)",cols:40,rows:40}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=1,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*5,g*5+5).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/5)-1?.3:1},disabled:g>=Math.ceil(A.length/5)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100dvh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` + `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*5,g*5+5).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/5)-1?.3:1},disabled:g>=Math.ceil(A.length/5)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` `)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. ${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` `;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o - +
From 1f5afa650099a0c418bc7e3ca11e00db7d73cced Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:18:33 +0000 Subject: [PATCH 08/36] fix: remove border from territory wars iframe Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index c0edf3421b..0dc9accf5a 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -95,7 +95,7 @@ Electric Cloud implements the documented protocol strictly — no proprietary ex Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. - + ## Next steps From cc1cae2cf20d01611286816e34050a1443900fac Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:19:54 +0000 Subject: [PATCH 09/36] docs: rename "try the demo app" to "check the example app" Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 0dc9accf5a..c4ec02bd69 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -100,5 +100,5 @@ Multiplayer territory game running on Yjs Durable Streams on Electric Cloud ## Next steps - sign up to [Electric Cloud](https://dashboard.electric-sql.com) -- try the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) +- check the [example app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) - any questions, let us know in [Discord](https://discord.electric-sql.com) From fee16a0d3f453c111d48148c020d415443acdf7b Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:21:36 +0000 Subject: [PATCH 10/36] docs: move demo section before get started Co-Authored-By: Claude Opus 4.6 (1M context) --- ...26-03-25-yjs-durable-streams-on-electric-cloud.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index c4ec02bd69..496bb0831f 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -44,6 +44,12 @@ The provider handles document sync, server-side compaction, and awareness out of Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting the durable streams server. As documents grow, the server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) updates into a new snapshot — transparent to connected clients, fast for new ones. +## Demo + +Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. + + + ## Get started Create a Yjs document with awareness and point it at your endpoint: @@ -91,12 +97,6 @@ The Yjs Durable Streams protocol is [fully documented](https://github.com/durabl Electric Cloud implements the documented protocol strictly — no proprietary extensions, no vendor-specific APIs. It's just a faster way to get started. -## Demo - -Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. - - - ## Next steps - sign up to [Electric Cloud](https://dashboard.electric-sql.com) From 397d463b31d7764d629fcd171682c187f6420bb8 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:24:30 +0000 Subject: [PATCH 11/36] docs: halved board height, 450px iframe, rebuilt bundle Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- .../assets/{index-C69yBkyF.js => index-CEZAWTQs.js} | 4 ++-- website/public/demos/territory-wars/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename website/public/demos/territory-wars/assets/{index-C69yBkyF.js => index-CEZAWTQs.js} (99%) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 496bb0831f..3a3da191d1 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -48,7 +48,7 @@ Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. - + ## Get started diff --git a/website/public/demos/territory-wars/assets/index-C69yBkyF.js b/website/public/demos/territory-wars/assets/index-CEZAWTQs.js similarity index 99% rename from website/public/demos/territory-wars/assets/index-C69yBkyF.js rename to website/public/demos/territory-wars/assets/index-CEZAWTQs.js index 783208a7dc..5af605db46 100644 --- a/website/public/demos/territory-wars/assets/index-C69yBkyF.js +++ b/website/public/demos/territory-wars/assets/index-CEZAWTQs.js @@ -26,14 +26,14 @@ Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, Instead, use a query builder function: const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"Small (20x20)",cols:20,rows:20},{label:"Medium (30x30)",cols:30,rows:30},{label:"Large (40x40)",cols:40,rows:40}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=1,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"30x15",cols:30,rows:15}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*5,g*5+5).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/5)-1?.3:1},disabled:g>=Math.ceil(A.length/5)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` `)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. ${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` `;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=30,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` +`?u.insert.slice(0,-1):u.insert;(typeof d!="string"||d.length>0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=15,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } .live-dot { animation: blink 1.5s ease-in-out infinite; } diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index a8a43c3178..f4555396f1 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From 153a28e7e8be5340093622d4d4e41303410d5ec0 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:34:05 +0000 Subject: [PATCH 12/36] docs: 3-room pagination, 500px iframe height, rebuilt bundle Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- .../assets/{index-CEZAWTQs.js => index-CMJDU8_0.js} | 2 +- website/public/demos/territory-wars/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename website/public/demos/territory-wars/assets/{index-CEZAWTQs.js => index-CMJDU8_0.js} (99%) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 3a3da191d1..e3aa886b41 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -48,7 +48,7 @@ Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. - + ## Get started diff --git a/website/public/demos/territory-wars/assets/index-CEZAWTQs.js b/website/public/demos/territory-wars/assets/index-CMJDU8_0.js similarity index 99% rename from website/public/demos/territory-wars/assets/index-CEZAWTQs.js rename to website/public/demos/territory-wars/assets/index-CMJDU8_0.js index 5af605db46..5735132490 100644 --- a/website/public/demos/territory-wars/assets/index-CEZAWTQs.js +++ b/website/public/demos/territory-wars/assets/index-CMJDU8_0.js @@ -29,7 +29,7 @@ Instead, use a query builder function: Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"30x15",cols:30,rows:15}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*5,g*5+5).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>5&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/5)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/5)-1?.3:1},disabled:g>=Math.ceil(A.length/5)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` + `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*3,g*3+3).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>3&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/3)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` `)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. ${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` `;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o - +
From de80976d5fe209e1c5ce591ba891af0d84de8b69 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:36:16 +0000 Subject: [PATCH 13/36] =?UTF-8?q?docs:=20update=20bundle=20=E2=80=94=2030x?= =?UTF-8?q?25=20board=20to=20fill=20iframe=20height?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../assets/{index-CMJDU8_0.js => index-BZNOlb45.js} | 4 ++-- website/public/demos/territory-wars/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename website/public/demos/territory-wars/assets/{index-CMJDU8_0.js => index-BZNOlb45.js} (99%) diff --git a/website/public/demos/territory-wars/assets/index-CMJDU8_0.js b/website/public/demos/territory-wars/assets/index-BZNOlb45.js similarity index 99% rename from website/public/demos/territory-wars/assets/index-CMJDU8_0.js rename to website/public/demos/territory-wars/assets/index-BZNOlb45.js index 5735132490..db9610d833 100644 --- a/website/public/demos/territory-wars/assets/index-CMJDU8_0.js +++ b/website/public/demos/territory-wars/assets/index-BZNOlb45.js @@ -26,14 +26,14 @@ Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, Instead, use a query builder function: const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"30x15",cols:30,rows:15}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"30x25",cols:30,rows:25}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*3,g*3+3).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>3&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/3)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` `)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. ${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` `;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=15,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` +`?u.insert.slice(0,-1):u.insert;(typeof d!="string"||d.length>0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=25,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } .live-dot { animation: blink 1.5s ease-in-out infinite; } diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index b5d8f86d54..92a842edef 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From c84835f56e482970e35b5d233b08be71266336fc Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:44:25 +0000 Subject: [PATCH 14/36] blog: add header image for yjs durable streams post Co-Authored-By: Claude Opus 4.6 (1M context) --- .../header.png | Bin 0 -> 1844622 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.png diff --git a/website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.png b/website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.png new file mode 100644 index 0000000000000000000000000000000000000000..fe43803818b4720b90245eecd13d60111d32d4bc GIT binary patch literal 1844622 zcmeFZWmFwaw=UXvf(Dla2?TeS1Pczq-2)4ES-3`k;KAM9-6c4|-7UBi+~qFFyTASI zbM_ra#=Za24Ct<^SygjBQ%brEe>oX36hs0<002-V#Dx_A0G=BFU}m2|Lvkc9ibw$9 zP6MR(UhVO2=3uE0$tHr_4L~e5dH_1`!W#hc0j>mFn5PT?;N<#;O6(7n<$tAeu(RTM zq~u{XF9Q4er2JBp1T+Hmu94wH&pbr0Oj`~k?diMWQ zrwn@b_J(#~Q)?@GNCn{bp9+Fc74)s`{=EX`W8VyVpeJeu$HyK3JP?b$Nz41rD|+nk zo9gBR%UCP&V@Q4l2vRxC_#fiW8AgAeES{PG*%|7A4Gk>qt&PA=dUl3_#)eklGy^L= zOG6_uIVE~FYg+?TV^gr6g`%~C9mr70#m3NC)C3H+;bCM1IWm~qfI$q_cE*fWhEDb% zYXd`j#((JTpXk95dPcCFo~f0gfuM!4wVf&0#L^TbZD?Ssm-Y`QR)09LwsM4sZ)gBv zx&0s61^(Y;0$b-ygnzqf9jx47EcDc(#-VDR6rfJQ)4SVu!EhUv$VaTg%Q~kAiRu^RE+;e*8Wt5 z;a|KPj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OX9TqcwpNk4dn1_uj$A38yf!-n8*%LCh0R_&q=fppw&?%5%EqvC&4hM~TLaMdKy`@&JW=C#;r%_899MrNDyWN&G7qp~~ zzIp4y@|^16+TfCb#^F;DPxU_Qxca4|@0V@JP%rStdH85+aNOMuqY5xX5^6F?If zr6O>gs(qk_l*Ytc4ueW+iz`$A@f}ryMtS3aUdn1*F(xR9j4ck23wu|!{!r?cG+LW^ z%C?yWfyHMD9bni-;5!{2VVzl6GjNa>r1r6bwooMZSK-p@C>|#oy=6TE$Fp&D45Pj_ z8wrQRKF4|zhMKaWy<4J=WQO8Qj6cob)wUw-_~zKhqn~~h6wa@twrM-=NH8?)=$X4A z`cuIA97BPDlloG-#+*1^+|O@^oq$G1>;_*A|tn>snbUvlTx+56tt;i=Az%WGp zlH(CWXZRFaa@qi|mi4v)O(MU}CwsEzpybLJ+&((Vw?&)yd9*WZwPhp6nYrWTE6Q^X z83i&a2O+1k)hIgQfGBChEHxi7~zo;KGW~BljWBk{eU9g5iw(2GLaw8 zf;JF65oxJOvdz})mO7^0+8k%W5iOE#gwe$PEJaa`d_=2bMlO|gWVZ&>PS=*%BRr{- zMtF$90#BRtQRXc*l@uMKw`opO2S`8%RM)Tl(kR4IOt92(0-301xlW U%Qg?A>;M1&07*qoM6N<$g44X+*8l(j literal 0 HcmV?d00001 From db7ee454a1ec68eef8bcf5c8184b7ed9fed204fb Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:47:17 +0000 Subject: [PATCH 15/36] blog: fix dead link in outline file Co-Authored-By: Claude Opus 4.6 (1M context) --- .../2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md index b629dfdeae..82ae6c1a1b 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md @@ -26,7 +26,7 @@ infrastructure to manage. Create a service, point your Yjs app at it. Expand each line slightly into prose but keep it tight. --> :::info -- [Create a Yjs service on Electric Cloud](...) +- [Create a Yjs service on Electric Cloud](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) - [`y-durable-streams` on GitHub](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) - [Demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) ::: From cebc5b988ff95bc2ab3ef1b0a78e3ee0b513a2b9 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sat, 28 Mar 2026 01:53:44 +0000 Subject: [PATCH 16/36] blog: simplify how it works section to high-level overview Co-Authored-By: Claude Opus 4.6 (1M context) --- ...2026-03-25-yjs-durable-streams-on-electric-cloud.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index e3aa886b41..aa9740ac79 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -34,15 +34,11 @@ The provider handles document sync, server-side compaction, and awareness out of ## How it works -`y-durable-streams` syncs documents over HTTP using the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md). +Each document is backed by a durable stream — a persistent, append-only log. Every edit is appended to the stream, and all connected clients receive it in real time. When a new client joins, it doesn't replay the full history. Instead, it loads a **snapshot** — a compacted version of the document at a point in time — and subscribes for live updates from there. As documents grow, the server automatically compacts accumulated updates into new snapshots, so initial sync stays fast. -**Initial sync** — the client requests `?offset=snapshot`. The server responds with a `307` redirect to the latest compacted snapshot — a stable, offset-addressed URL. The client loads the snapshot and reads the `Stream-Next-Offset` header to know where to resume. If no snapshot exists yet, the redirect points to `offset=-1` and the client reads all updates from the beginning. +Presence — cursors, selections, user info — is handled through **awareness streams**. These are ephemeral: clients only receive the latest changes, and each stream has a built-in TTL that garbage-collects stale state from disconnected clients. A default awareness stream is created with every document, and you can create additional named ones for different purposes. -**Live updates** — from the snapshot's offset, the client subscribes via long-polling or SSE. Local edits are POSTed to the same URL. All reads and writes use a binary protocol. - -**Awareness** — presence data (cursors, selections, user info) is delivered over the same document URL with `?awareness=...`. It's just a durable stream — clients subscribe at the tip with `offset=now`, so there's no history to replay. Awareness streams have a built-in TTL, so stale state from disconnected clients is pruned automatically. - -Snapshot URLs are immutable, so CDNs can cache and fan them out without hitting the durable streams server. As documents grow, the server automatically [compacts](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md#8-compaction) updates into a new snapshot — transparent to connected clients, fast for new ones. +For the full details, see the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) specification. ## Demo From ca5ff5df7e7de89ac5d20a216bf41f8f6515f690 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Sun, 29 Mar 2026 14:02:16 +0100 Subject: [PATCH 17/36] =?UTF-8?q?docs:=20update=20territory=20wars=20bundl?= =?UTF-8?q?e=20=E2=80=94=2030x25=20board,=20rate-limited=20touch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../territory-wars/assets/index-BZNOlb45.js | 42 ------------------- .../territory-wars/assets/index-BoLuCJpH.js | 42 +++++++++++++++++++ .../public/demos/territory-wars/index.html | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 website/public/demos/territory-wars/assets/index-BZNOlb45.js create mode 100644 website/public/demos/territory-wars/assets/index-BoLuCJpH.js diff --git a/website/public/demos/territory-wars/assets/index-BZNOlb45.js b/website/public/demos/territory-wars/assets/index-BZNOlb45.js deleted file mode 100644 index db9610d833..0000000000 --- a/website/public/demos/territory-wars/assets/index-BZNOlb45.js +++ /dev/null @@ -1,42 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function U1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var fh={exports:{}},qa={};var E0;function z1(){if(E0)return qa;E0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return qa.Fragment=t,qa.jsx=i,qa.jsxs=i,qa}var C0;function j1(){return C0||(C0=1,fh.exports=z1()),fh.exports}var Q=j1(),hh={exports:{}},Ka={},dh={exports:{}},ph={};var x0;function N1(){return x0||(x0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[at];if(0>>1;at<_;){var L=2*(at+1)-1,Y=M[L],F=L+1,lt=M[F];if(0>l(Y,Z))Fl(lt,Y)?(M[at]=lt,M[F]=Z,at=F):(M[at]=Y,M[L]=Z,at=L);else if(Fl(lt,Z))M[at]=lt,M[F]=Z,at=F;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function I(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,H||(H=!0,st());else{var q=i(g);q!==null&&ht(I,q.startTime-M)}}var H=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at=="function"){y.callback=null,v=y.priorityLevel;var ft=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft=="function"){y.callback=ft,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(I,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?st():H=!1}}}var st;if(typeof A=="function")st=function(){A(nt)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,Kt=xt.port2;xt.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){N(nt,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(R(K),K=-1):E=!0,ht(I,Z-at))):(M.sortIndex=ft,t(p,M),w||b||(w=!0,H||(H=!0,st()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(ph)),ph}var _0;function B1(){return _0||(_0=1,dh.exports=N1()),dh.exports}var gh={exports:{}},gt={};var T0;function L1(){if(T0)return gt;T0=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,L,"setState")},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=N.prototype;function A(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}var z=A.prototype=new R;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var I=Array.isArray;function H(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,L,Y){var F=Y.ref;return{$$typeof:s,type:_,key:L,ref:F!==void 0?F:null,props:Y}}function J(_,L){return tt(_.type,L,_.props)}function nt(_){return typeof _=="object"&&_!==null&&_.$$typeof===s}function st(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Y){return L[Y]})}var xt=/\/+/g;function Kt(_,L){return typeof _=="object"&&_!==null&&_.key!=null?st(""+_.key):L.toString(36)}function ht(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,L,Y,F,lt){var it=typeof _;(it==="undefined"||it==="boolean")&&(_=null);var St=!1;if(_===null)St=!0;else switch(it){case"bigint":case"string":case"number":St=!0;break;case"object":switch(_.$$typeof){case s:case t:St=!0;break;case m:return St=_._init,M(St(_._payload),L,Y,F,lt)}}if(St)return lt=lt(_),St=F===""?"."+Kt(_,0):F,I(lt)?(Y="",St!=null&&(Y=St.replace(xt,"$&/")+"/"),M(lt,L,Y,"",function(et){return et})):lt!=null&&(nt(lt)&&(lt=J(lt,Y+(lt.key==null||_&&_.key===lt.key?"":(""+lt.key).replace(xt,"$&/")+"/")+St)),L.push(lt)),1;St=0;var zt=F===""?".":F+":";if(I(_))for(var vt=0;vt<_.length;vt++)F=_[vt],it=zt+Kt(F,vt),St+=M(F,L,Y,it,lt);else if(vt=b(_),typeof vt=="function")for(_=vt.call(_),vt=0;!(F=_.next()).done;)F=F.value,it=zt+Kt(F,vt++),St+=M(F,L,Y,it,lt);else if(it==="object"){if(typeof _.then=="function")return M(ht(_),L,Y,F,lt);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return St}function q(_,L,Y){if(_==null)return _;var F=[],lt=0;return M(_,F,"","",function(it){return L.call(Y,it,lt++)}),F}function Z(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ft={map:q,forEach:function(_,L,Y){q(_,function(){L.apply(this,arguments)},Y)},count:function(_){var L=0;return q(_,function(){L++}),L},toArray:function(_){return q(_,function(L){return L})||[]},only:function(_){if(!nt(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return gt.Activity=y,gt.Children=ft,gt.Component=N,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=A,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,L,Y){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var F=E({},_.props),lt=_.key;if(L!=null)for(it in L.key!==void 0&&(lt=""+L.key),L)!X.call(L,it)||it==="key"||it==="__self"||it==="__source"||it==="ref"&&L.ref===void 0||(F[it]=L[it]);var it=arguments.length-2;if(it===1)F.children=Y;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),yh.exports=I1(),yh.exports}var R0;function q1(){if(R0)return Ka;R0=1;var s=B1(),t=zd(),i=H1();function r(e){var n="https://react.dev/errors/"+e;if(1ft||(e.current=at[ft],at[ft]=null,ft--)}function Y(e,n){ft++,at[ft]=e.current,e.current=n}var F=_(null),lt=_(null),it=_(null),St=_(null);function zt(e,n){switch(Y(it,n),Y(lt,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?$m(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=$m(n),e=Ym(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(F),Y(F,e)}function vt(){L(F),L(lt),L(it)}function et(e){e.memoizedState!==null&&Y(St,e);var n=F.current,a=Ym(n,e.type);n!==a&&(Y(lt,e),Y(F,a))}function P(e){lt.current===e&&(L(F),L(lt)),St.current===e&&(L(St),Ba._currentValue=Z)}var pt,dt;function wt(e){if(pt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);pt=n&&n[1]||"",dt=-1)":-1f||x[c]!==U[f]){var V=` -`+x[c].replace(" at new "," at ");return e.displayName&&V.includes("")&&(V=V.replace("",e.displayName)),V}while(1<=c&&0<=f);break}}}finally{Dt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?wt(a):""}function $n(e,n){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==n&&n!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return wt("Activity");default:return""}}function Ue(e){try{var n="",a=null;do n+=$n(e,a),a=e,e=e.return;while(e);return n}catch(c){return` -Error generating stack: `+c.message+` -`+c.stack}}var ln=Object.prototype.hasOwnProperty,Cn=s.unstable_scheduleCallback,Ui=s.unstable_cancelCallback,El=s.unstable_shouldYield,Cl=s.unstable_requestPaint,Xt=s.unstable_now,Qr=s.unstable_getCurrentPriorityLevel,zi=s.unstable_ImmediatePriority,Fr=s.unstable_UserBlockingPriority,xl=s.unstable_NormalPriority,pb=s.unstable_LowPriority,_p=s.unstable_IdlePriority,gb=s.log,yb=s.unstable_setDisableYieldValue,Jr=null,Xe=null;function ws(e){if(typeof gb=="function"&&yb(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Jr,e)}catch{}}var Ze=Math.clz32?Math.clz32:vb,mb=Math.log,Sb=Math.LN2;function vb(e){return e>>>=0,e===0?32:31-(mb(e)/Sb|0)|0}var _l=256,Tl=262144,Al=4194304;function Ps(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ol(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=Ps(c):(S&=C,S!==0?f=Ps(S):a||(a=C&~e,a!==0&&(f=Ps(a))))):(C=c&~h,C!==0?f=Ps(C):S!==0?f=Ps(S):a||(a=c&~e,a!==0&&(f=Ps(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Xr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function wb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tp(){var e=Al;return Al<<=1,(Al&62914560)===0&&(Al=4194304),e}function Wc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Zr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ab=/[\n"\\]/g;function cn(e){return e.replace(Ab,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function iu(e,n,a,c,f,h,S,C){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+on(n)):e.value!==""+on(n)&&(e.value=""+on(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?ru(e,S,on(n)):a!=null?ru(e,S,on(a)):c!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+on(C):e.removeAttribute("name")}function Ip(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){su(e);return}a=a!=null?""+on(a):"",n=n!=null?""+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),su(e)}function ru(e,n,a){n==="number"&&Ml(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(Fn)try{var ea={};Object.defineProperty(ea,"passive",{get:function(){uu=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{uu=!1}var Es=null,fu=null,Ul=null;function Yp(){if(Ul)return Ul;var e,n=fu,a=n.length,c,f="value"in Es?Es.value:Es.textContent,h=f.length;for(e=0;e=ia),Wp=" ",Pp=!1;function tg(e,n){switch(e){case"keyup":return eE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function sE(e,n){switch(e){case"compositionend":return eg(n);case"keypress":return n.which!==32?null:(Pp=!0,Wp);case"textInput":return e=n.data,e===Wp&&Pp?null:e;default:return null}}function iE(e,n){if(Gi)return e==="compositionend"||!yu&&tg(e,n)?(e=Yp(),Ul=fu=Es=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=cg(a)}}function fg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function hg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ml(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ml(e.document)}return n}function vu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var hE=Fn&&"documentMode"in document&&11>=document.documentMode,$i=null,wu=null,oa=null,bu=!1;function dg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bu||$i==null||$i!==Ml(c)||(c=$i,"selectionStart"in c&&vu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),oa&&la(oa,c)||(oa=c,c=Ao(wu,"onSelect"),0>=S,f-=S,Un=1<<32-Ze(n)+f|a<mt?(Tt=ot,ot=null):Tt=ot.sibling;var Ut=j(D,ot,k[mt],G);if(Ut===null){ot===null&&(ot=Tt);break}e&&ot&&Ut.alternate===null&&n(D,ot),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,ot=Tt}if(mt===k.length)return a(D,ot),Rt&&Xn(D,mt),ct;if(ot===null){for(;mtmt?(Tt=ot,ot=null):Tt=ot.sibling;var Gs=j(D,ot,Ut.value,G);if(Gs===null){ot===null&&(ot=Tt);break}e&&ot&&Gs.alternate===null&&n(D,ot),O=h(Gs,O,mt),kt===null?ct=Gs:kt.sibling=Gs,kt=Gs,ot=Tt}if(Ut.done)return a(D,ot),Rt&&Xn(D,mt),ct;if(ot===null){for(;!Ut.done;mt++,Ut=k.next())Ut=$(D,Ut.value,G),Ut!==null&&(O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Rt&&Xn(D,mt),ct}for(ot=c(ot);!Ut.done;mt++,Ut=k.next())Ut=B(ot,D,mt,Ut.value,G),Ut!==null&&(e&&Ut.alternate!==null&&ot.delete(Ut.key===null?mt:Ut.key),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&&ot.forEach(function(k1){return n(D,k1)}),Rt&&Xn(D,mt),ct}function Ht(D,O,k,G){if(typeof k=="object"&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(D,O.sibling),G=f(O,k.props.children),G.return=D,D=G;break t}}else if(O.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===X&&ui(ct)===O.type){a(D,O.sibling),G=f(O,k.props),pa(G,k),G.return=D,D=G;break t}a(D,O);break}else n(D,O);O=O.sibling}k.type===E?(G=ri(k.props.children,D.mode,G,k.key),G.return=D,D=G):(G=Vl(k.type,k.key,k.props,null,D.mode,G),pa(G,k),G.return=D,D=G)}return S(D);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(D,O.sibling),G=f(O,k.children||[]),G.return=D,D=G;break t}else{a(D,O);break}else n(D,O);O=O.sibling}G=Ou(k,D.mode,G),G.return=D,D=G}return S(D);case X:return k=ui(k),Ht(D,O,k,G)}if(ht(k))return rt(D,O,k,G);if(st(k)){if(ct=st(k),typeof ct!="function")throw Error(r(150));return k=ct.call(k),ut(D,O,k,G)}if(typeof k.then=="function")return Ht(D,O,Xl(k),G);if(k.$$typeof===A)return Ht(D,O,Yl(D,k),G);Zl(D,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,O!==null&&O.tag===6?(a(D,O.sibling),G=f(O,k),G.return=D,D=G):(a(D,O),G=Au(k,D.mode,G),G.return=D,D=G),S(D)):a(D,O)}return function(D,O,k,G){try{da=0;var ct=Ht(D,O,k,G);return nr=null,ct}catch(ot){if(ot===er||ot===Fl)throw ot;var kt=Pe(29,ot,null,D.mode);return kt.lanes=G,kt.return=D,kt}}}var hi=Ng(!0),Bg=Ng(!1),As=!1;function Hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Os(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ds(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Kl(e),wg(e,null,a),n}return ql(e,c,n,a),Kl(e)}function ga(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}function Ku(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Vu=!1;function ya(){if(Vu){var e=tr;if(e!==null)throw e}}function ma(e,n,a,c){Vu=!1;var f=e.updateQueue;As=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(_t&j)===j:(c&j)===j){j!==0&&j===Pi&&(Vu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ut=C;j=n;var Ht=a;switch(ut.tag){case 1:if(rt=ut.payload,typeof rt=="function"){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ut.payload,j=typeof rt=="function"?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:As=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),zs|=S,e.lanes=S,e.memoizedState=$}}function Lg(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ig(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,cf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var V=bE(x,c);wa(e,n,V,rn(e))}else wa(e,n,c,rn(e))}catch($){wa(e,n,{then:function(){},status:"rejected",reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function AE(){}function lf(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=my(e).queue;yy(e,f,n,Z,a===null?AE:function(){return Sy(e),a(c)})}function my(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Sy(e){var n=my(e);n.next===null&&(n=e.alternate.memoizedState),wa(e,n.next.queue,{},rn())}function of(){return _e(Ba)}function vy(){return se().memoizedState}function wy(){return se().memoizedState}function OE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Os(a);var c=Ds(n,e,a);c!==null&&(Ye(c,n,a),ga(c,n,a)),n={cache:Nu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lo(e)?Ey(n,a):(a=_u(e,n,a,c),a!==null&&(Ye(a,e,c),Cy(a,n,c)))}function by(e,n,a){var c=rn();wa(e,n,a,c)}function wa(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lo(e))Ey(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return ql(e,n,f,0),qt===null&&Hl(),!1}catch{}if(a=_u(e,n,f,c),a!==null)return Ye(a,e,c),Cy(a,n,c),!0}return!1}function cf(e,n,a,c){if(c={lane:2,revertLane:qf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lo(e)){if(n)throw Error(r(479))}else n=_u(e,a,c,2),n!==null&&Ye(n,e,2)}function lo(e){var n=e.alternate;return e===yt||n!==null&&n===yt}function Ey(e,n){ir=to=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Cy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Op(e,a)}}var ba={readContext:_e,use:so,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};ba.useEffectEvent=Zt;var xy={readContext:_e,use:so,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:_e,useEffect:ly,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ro(4194308,4,fy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ro(4194308,4,e,n)},useInsertionEffect:function(e,n){ro(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(di){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(di){ws(!0);try{a(n)}finally{ws(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=ef(e);var n=e.queue,a=by.bind(null,yt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:rf,useDeferredValue:function(e,n){var a=ze();return af(a,e,n)},useTransition:function(){var e=ef(!1);return e=yy.bind(null,yt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=yt,f=ze();if(Rt){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(_t&127)!==0||$g(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,ly(Qg.bind(null,c,h,e),[e]),c.flags|=2048,ar(9,{destroy:void 0},Yg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Rt){var a=zn,c=Un;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n="_"+n+"R_"+a,a=eo++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is=="string"?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ce]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Ae(h,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&ns(n)}}return $t(n),Cf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&ns(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(e=it.current,Zi(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=xe,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ce]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Vm(e.nodeValue,a)),e||_s(n,!0)}else e=Oo(e).createTextNode(c),e[Ce]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=Zi(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ce]=n}else ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zi(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ce]=n}else ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),ho(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&$f(n.stateNode.containerInfo),$t(n),null;case 10:return Wn(n.type),$t(n),null;case 19:if(L(ne),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ca(c,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Pl(e),h!==null){for(n.flags|=128,Ca(c,!1),e=h.updateQueue,n.updateQueue=e,ho(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)bg(a,e),a=a.sibling;return Y(ne,ne.current&1|2),Rt&&Xn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Xt()>So&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304)}else{if(!f)if(e=Pl(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,ho(n,e),Ca(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Rt)return $t(n),null}else 2*Xt()-c.renderingStartTime>So&&a!==536870912&&(n.flags|=128,f=!0,Ca(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Xt(),e.sibling=null,a=ne.current,Y(ne,f?a&1|2:a&1),Rt&&Xn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),$u(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&ho(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&L(ci),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Wn(ae),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function zE(e,n){switch(Ru(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Wn(ae),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return P(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return L(ne),null;case 4:return vt(),null;case 10:return Wn(n.type),null;case 22:case 23:return en(n),$u(),e!==null&&L(ci),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Wn(ae),null;case 25:return null;default:return null}}function Fy(e,n){switch(Ru(n),n.tag){case 3:Wn(ae),vt();break;case 26:case 27:case 5:P(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:L(ne);break;case 10:Wn(n.type);break;case 22:case 23:en(n),$u(),e!==null&&L(ci);break;case 24:Wn(ae)}}function xa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function ks(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Jy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Ig(n,a)}catch(c){Bt(e,e.return,c)}}}function Xy(e,n,a){a.props=pi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function _a(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a=="function"?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function jn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Zy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break t;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function xf(e,n,a){try{var c=e.stateNode;n1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Is(e.type)||e.tag===4}function _f(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Is(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tf(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Qn));else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Tf(e,n,a),e=e.sibling;e!==null;)Tf(e,n,a),e=e.sibling}function po(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(po(e,n,a),e=e.sibling;e!==null;)po(e,n,a),e=e.sibling}function Py(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ae(n,c,a),n[Ce]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var ss=!1,ce=!1,Af=!1,tm=typeof WeakSet=="function"?WeakSet:Set,me=null;function jE(e,n){if(e=e.containerInfo,Ff=jo,e=hg(e),vu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Jf={focusedElem:e,selectionRange:a},jo=!1,me=n;me!==null;)if(n=me,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,me=e;else for(;me!==null;){switch(n=me,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Ae(h,c,a),h[Ce]=e,ye(h),c=h;break t;case"link":var S=a0("link","href",f).get(c+(a.href||""));if(S){for(var C=0;CHt&&(S=Ht,Ht=ut,ut=S);var D=ug(C,ut),O=ug(C,Ht);if(D&&O&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(D.node,D.offset),B.removeAllRanges(),ut>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}jo=!!Ff,Jf=Ff=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,he=2}}function Am(){if(he===2){he=0;var e=Ns,n=fr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{em(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}he=3}}function Om(){if(he===4||he===3){he=0,Cl();var e=Ns,n=fr,a=os,c=pm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?he=5:(he=0,fr=Ns=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(js=null),tu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Jr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=zf,zf=null;var h=Ns,S=os;if(he=0,fr=Ns=null,os=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,fm(h.current),om(h,h.current,S,a),jt=C,Ma(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Jr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function Mm(e,n,a){n=fn(a,n),n=df(e.stateNode,n,2),e=Ds(e,n,2),e!==null&&(Zr(e,2),Nn(e))}function Bt(e,n,a){if(e.tag===3)Mm(e,e,a);else for(;n!==null;){if(n.tag===3){Mm(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(js===null||!js.has(c))){e=fn(a,e),a=ky(2),c=Ds(n,a,2),c!==null&&(Uy(a,c,n,e),Zr(c,2),Nn(c));break}}n=n.return}}function Lf(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new LE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Rf=!0,f.add(a),e=VE.bind(null,e,n,a),n.then(e,e))}function VE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(_t&a)===a&&(Wt===4||Wt===3&&(_t&62914560)===_t&&300>Xt()-mo?(jt&2)===0&&hr(e,0):Mf|=a,ur===_t&&(ur=0)),Nn(e)}function km(e,n){n===0&&(n=Tp()),e=ii(e,n),e!==null&&(Zr(e,n),Nn(e))}function GE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),km(e,a)}function $E(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),km(e,a)}function YE(e,n){return Cn(e,n)}var xo=null,pr=null,If=!1,_o=!1,Hf=!1,Ls=0;function Nn(e){e!==pr&&e.next===null&&(pr===null?xo=pr=e:pr=pr.next=e),_o=!0,If||(If=!0,FE())}function Ma(e,n){if(!Hf&&_o){Hf=!0;do for(var a=!1,c=xo;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Nm(c,h))}else h=_t,h=Ol(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Xr(c,h)||(a=!0,Nm(c,h));c=c.next}while(a);Hf=!1}}function QE(){Um()}function Um(){_o=If=!1;var e=0;Ls!==0&&i1()&&(e=Ls);for(var n=Xt(),a=null,c=xo;c!==null;){var f=c.next,h=zm(c,n);h===0?(c.next=null,a===null?xo=f:a.next=f,f===null&&(pr=a)):(a=c,(e!==0||(h&3)!==0)&&(_o=!0)),c=f}he!==0&&he!==5||Ma(e),Ls!==0&&(Ls=0)}function zm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&Gm($)&&(x=x.responseEnd,S+=V*(x"u"?null:document;function n0(e,n,a){var c=gr;if(c&&typeof n=="string"&&n){var f=cn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),e0.has(f)||(e0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement("link"),Ae(n,"link",e),ye(n),c.head.appendChild(n)))}}function d1(e){cs.D(e),n0("dns-prefetch",e,null)}function p1(e,n){cs.C(e,n),n0("preconnect",e,n)}function g1(e,n,a){cs.L(e,n,a);var c=gr;if(c&&e&&n){var f='link[rel="preload"][as="'+cn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+cn(a.imageSizes)+'"]')):f+='[href="'+cn(e)+'"]';var h=f;switch(n){case"style":h=yr(e);break;case"script":h=mr(e)}mn.has(h)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n==="style"&&c.querySelector(ja(h))||n==="script"&&c.querySelector(Na(h))||(n=c.createElement("link"),Ae(n,"link",e),ye(n),c.head.appendChild(n)))}}function y1(e,n){cs.m(e,n);var a=gr;if(a&&e){var c=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+cn(c)+'"][href="'+cn(e)+'"]',h=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=mr(e)}if(!mn.has(h)&&(e=y({rel:"modulepreload",href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Na(h)))return}c=a.createElement("link"),Ae(c,"link",e),ye(c),a.head.appendChild(c)}}}function m1(e,n,a){cs.S(e,n,a);var c=gr;if(c&&e){var f=Li(c).hoistableStyles,h=yr(e);n=n||"default";var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(ja(h)))C.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=mn.get(h))&&nh(e,a);var x=S=c.createElement("link");ye(x),Ae(x,"link",e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener("load",function(){C.loading|=1}),x.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Ro(S,n,c)}S={type:"stylesheet",instance:S,count:1,state:C},f.set(h,S)}}}function S1(e,n){cs.X(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&sh(e,n),h=a.createElement("script"),ye(h),Ae(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function v1(e,n){cs.M(e,n);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Na(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=mn.get(f))&&sh(e,n),h=a.createElement("script"),ye(h),Ae(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},c.set(f,h))}}function s0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=yr(a.href),a=Li(f).hoistableStyles,c=a.get(n),c||(c={type:"style",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yr(a.href);var h=Li(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(ja(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||w1(f,e,a,S.state))),n&&c===null)throw Error(r(528,""));return S}if(n&&c!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=mr(a),a=Li(f).hoistableScripts,c=a.get(n),c||(c={type:"script",instance:null,count:0,state:null},a.set(n,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yr(e){return'href="'+cn(e)+'"'}function ja(e){return'link[rel="stylesheet"]['+e+"]"}function i0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function w1(e,n,a,c){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?c.loading=1:(n=e.createElement("link"),c.preload=n,n.addEventListener("load",function(){return c.loading|=1}),n.addEventListener("error",function(){return c.loading|=2}),Ae(n,"link",a),ye(n),e.head.appendChild(n))}function mr(e){return'[src="'+cn(e)+'"]'}function Na(e){return"script[async]"+e}function r0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var c=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(c)return n.instance=c,ye(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),ye(c),Ae(c,"style",f),Ro(c,a.precedence,e),n.instance=c;case"stylesheet":f=yr(a.href);var h=e.querySelector(ja(f));if(h)return n.state.loading|=4,n.instance=h,ye(h),h;c=i0(a),(f=mn.get(f))&&nh(c,f),h=(e.ownerDocument||e).createElement("link"),ye(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Ae(h,"link",c),n.state.loading|=4,Ro(h,a.precedence,e),n.instance=h;case"script":return h=mr(a.src),(f=e.querySelector(Na(h)))?(n.instance=f,ye(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),sh(c,f)),e=e.ownerDocument||e,f=e.createElement("script"),ye(f),Ae(f,"link",c),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Ro(c,a.precedence,e));return n.instance}function Ro(e,n,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,h=f,S=0;S title"):null)}function b1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function o0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function E1(e,n,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=yr(c.href),h=n.querySelector(ja(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ko.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ye(h);return}h=n.ownerDocument||n,c=i0(c),(f=mn.get(f))&&nh(c,f),h=h.createElement("link"),ye(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Ae(h,"link",c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ko.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var ih=0;function C1(e,n){return e.stylesheets&&e.count===0&&zo(e,e.stylesheets),0ih?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Uo=null;function zo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Uo=new Map,n.forEach(x1,e),Uo=null,ko.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=Uo.get(e);if(a)var c=a.get(null);else{a=new Map,Uo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),hh.exports=q1(),hh.exports}var V1=K1(),W=zd();const G1="https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t",$1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0",Y1="https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw",Q1="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY",lv=W.createContext(null);function jd(){const s=W.useContext(lv);if(!s)throw new Error("useServerEndpoint must be used within ServerEndpointProvider");return s}function F1(){return G1}function J1(){return Y1}function X1(){return{Authorization:`Bearer ${$1}`}}function Z1(){return{Authorization:`Bearer ${Q1}`}}function W1({children:s}){const t=F1(),i=J1(),r=W.useMemo(()=>X1(),[]),l=W.useMemo(()=>Z1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(lv.Provider,{value:o,children:s})}var Ko={exports:{}},mh,k0;function P1(){if(k0)return mh;k0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return mh=s,mh}var U0;function tC(){if(U0)return Ko.exports;U0=1;var s=P1();function t(o,u,d){if(typeof o=="function"&&(d=u,u=o,o=null),!(d>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=st,m=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function I(J,nt){var st=p.get();st.context=o,st.release=H,st.value=J,st.callback=nt||i,st.errorHandler=v,y>=d||b.paused?g?(st.next=g,g=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function H(J){J&&p.release(J);var nt=g;nt&&y<=d?b.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o=="function"&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,R){m(E,function(A,z){if(A){R(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,R){y(E,function(A,z){if(A){R(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N=="function"&&N(),T(),g.drain=N}}})});return E}}return Ko.exports=t,Ko.exports.promise=l,Ko.exports}var eC=tC();const ov=U1(eC),On="Stream-Next-Offset",Uc="Stream-Cursor",zc="Stream-Up-To-Date",In="Stream-Closed",Sh="Stream-Seq",nC="Stream-TTL",sC="Stream-Expires-At",z0="Producer-Id",Vo="Producer-Epoch",j0="Producer-Seq",iC="Producer-Expected-Seq",rC="Producer-Received-Seq",vh="offset",Go="live",aC="stream-sse-data-encoding";var Js=class cv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name="FetchError",this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(d&&d.includes("application/json"))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new cv(r,o,u,l,i)}},Nd=class extends Error{constructor(){super("Fetch with backoff aborted"),this.name="FetchBackoffAbortError"}},te=class ed extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name="DurableStreamError",this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get("content-type");if(!t.bodyUsed&&t.body!==null)if(o&&o.includes("application/json"))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=N0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new ed(d,u,r,l)}static fromFetchError(t){const i=N0(t.status);return new ed(t.message,i,t.status,t.json??t.text)}};function N0(s){switch(s){case 400:return"BAD_REQUEST";case 401:return"UNAUTHORIZED";case 403:return"FORBIDDEN";case 404:return"NOT_FOUND";case 409:return"CONFLICT_SEQ";case 429:return"RATE_LIMITED";case 503:return"BUSY";default:return"UNKNOWN"}}var lC=class extends Error{constructor(){super("Invalid stream options: missing required url parameter"),this.name="MissingStreamUrlError"}},uv=class extends te{code="STREAM_CLOSED";status=409;streamClosed=!0;finalOffset;constructor(s,t){super("Cannot append to closed stream","STREAM_CLOSED",409,s),this.name="StreamClosedError",this.finalOffset=t}},oC=class extends Error{constructor(){super("Invalid signal option. It must be an instance of AbortSignal."),this.name="InvalidSignalError"}};const cC=[429,503],Bd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function uC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function fv(s,t=Bd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await Js.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Nd;if(b instanceof Js&&!cC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Js?uC(b.headers["retry-after"]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const R=w>0?"server+client":"client";console.log(`Retry attempt #${v} after ${N}ms (${R}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(R=>setTimeout(R,N)),y=Math.min(y*l,r)}}}}const fC=[201,204,205];function hC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||fC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Nd:new Js(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l=="string"?l:"failed to read body")}}}function dC(s){return typeof Symbol<"u"&&typeof Symbol.asyncIterator=="symbol"&&typeof s[Symbol.asyncIterator]=="function"}function pC(s){if(typeof Symbol>"u"||typeof Symbol.asyncIterator!="symbol"||typeof s[Symbol.asyncIterator]=="function")return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError("Cannot close a readable stream reader when it has pending read requests");r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,"values",{configurable:!0,writable:!0,value:t})}catch{}}function wh(s){return dC(s)||pC(s),s}async function*B0(s,t){const i=s.getReader(),r=new TextDecoder;let l="",o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` -`).replace(/\r/g,` -`);const g=l.split(` -`);l=g.pop()??"";for(const m of g)if(m===""){if(o.type&&o.data.length>0){const y=o.data.join(` -`);if(o.type==="data")yield{type:"data",data:y};else if(o.type==="control")try{const v=JSON.parse(y);yield{type:"control",streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,"PARSE_ERROR")}}o={data:[]}}else if(m.startsWith("event:")){const y=m.slice(6);o.type=y.startsWith(" ")?y.slice(1):y}else if(m.startsWith("data:")){const y=m.slice(5);o.data.push(y.startsWith(" ")?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type==="data")yield{type:"data",data:d};else if(o.type==="control")try{const p=JSON.parse(d);yield{type:"control",streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,"PARSE_ERROR")}}}finally{i.releaseLock()}}var Ld=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},hv=class nd extends Ld{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new nd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new nd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Id(this)}},bh=class br extends Ld{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new br({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new br({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:"healthy",state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:"fallback",state:new hv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:"reconnect",state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:"healthy",state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:"healthy",state:this}}pause(){return new Id(this)}},Id=class sd extends Ld{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new sd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new sd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const L0="PAUSE_STREAM";var gC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o="active";#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new bh(t):new hv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener("abort",()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#D()}#D(){if(typeof document=="object"&&typeof document.hidden=="boolean"&&typeof document.addEventListener=="function"){const s=()=>{document.hidden?this.#R():this.#T()};document.addEventListener("visibilitychange",s),this.#b=()=>{typeof document=="object"&&document.removeEventListener("visibilitychange",s)},document.hidden&&this.#R()}}#R(){this.#o==="active"&&(this.#o="pause-requested",this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(L0))}#T(){if(this.#o==="paused"||this.#o==="pause-requested"){if(this.#l.signal.aborted)return;this.#i instanceof Id&&(this.#i=this.#i.resume().state),this.#o="active",this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new te(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,"BAD_REQUEST")}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new te(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,"ALREADY_CONSUMED");this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(On)||void 0,cursor:s.headers.get(Uc)||void 0,upToDate:s.headers.has(zc),streamClosed:s.headers.get(In)?.toLowerCase()==="true"}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof bh||(this.#i=new bh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action==="fallback")return this.#v.logWarnings&&console.warn("[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy."),null;if(s.action==="reconnect"){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?B0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:"continue",newIterator:r}}catch(r){return{type:"error",error:r instanceof Error?r:new Error("SSE reconnection failed")}}return{type:"closed"}}return i.type==="data"?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:"response",response:mC("",i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:"continue"})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=id(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:"response",response:o,newIterator:u??void 0}}catch(u){return{type:"error",error:u instanceof Error?u:new Error("SSE reconnection failed")}}}if(l.type==="control")return this.#U(l),{type:"response",response:id(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get("content-type")?.includes("text/event-stream")??!1)&&s.body)this.#z(),this.#u=new AbortController,i=B0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case"response":l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case"closed":this.#r(),r.close();return;case"error":this.#_(l.error),r.error(l.error);return;case"continue":l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o==="pause-requested"||this.#o==="paused"){if(this.#o="paused",this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===L0){this.#o==="pause-requested"&&(this.#o="paused");return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w("body"),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w("json"),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||"[]";let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+"...":o;throw new te(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,"PARSE_ERROR")}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w("text"),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join("")}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w("bodyStream"),wh(this.#j())}jsonStream(){this.#w("jsonStream"),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||"[]";let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+"...":d;throw new te(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,"PARSE_ERROR")}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return wh(i)}textStream(){this.#w("textStream");const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return wh(t)}subscribeJson(s){this.#w("subscribeJson"),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||"[]";let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+"...":y;throw new te(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,"PARSE_ERROR")}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w("subscribeBytes");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w("subscribeText");const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Eh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes("Body");!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Eh(s,t,i,r){const l=s.headers.get(On),o=s.headers.get(Uc),u=s.headers.has(zc),d=s.headers.get(In)?.toLowerCase()==="true";return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function yC(s){const t=s.replace(/[\n\r]/g,"");if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new te(`Invalid base64 data: length ${t.length} is not a multiple of 4`,"PARSE_ERROR");try{if(typeof Buffer<"u")return new Uint8Array(Buffer.from(t,"base64"));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>yC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith("[")&&v.endsWith("]")){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(",")}]`}else g=s.join("");return new Response(g,{status:200,headers:p})}async function Xa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r=="function"?t[i]=await r():t[i]=r;return t}async function hs(s,t,i){const r=s.status;if(r===404)throw new te(`Stream not found: ${t}`,"NOT_FOUND",404);if(r===409){if(s.headers.get(In)?.toLowerCase()==="true"){const d=s.headers.get(On)??void 0;throw new uv(t,d)}const o=i?.operation==="create"?`Stream already exists: ${t}`:"Sequence conflict: seq is lower than last appended",u=i?.operation==="create"?"CONFLICT_EXISTS":"CONFLICT_SEQ";throw new te(o,u,409)}throw r===400?new te("Bad request (possibly content-type mismatch)","BAD_REQUEST",400):await te.fromResponse(s,t)}async function Wo(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r=="function"?t[i]=await r():t[i]=r);return t}const I0=new Set;function SC(){if(!(typeof process>"u"))return"production"}function vC(){return typeof globalThis.window<"u"}function wC(){if(typeof globalThis.window<"u"&&typeof globalThis.window.location<"u")return globalThis.window.location.href}function bC(s){try{return new URL(s)}catch{const t=wC();if(t)try{return new URL(s,t)}catch{return}return}}function dv(s,t){if(t===!1||SC()==="test"||!vC()||typeof console>"u"||typeof console.warn!="function")return;const r=s instanceof URL?s.toString():s,l=bC(r);l&&l.protocol==="http:"&&(I0.has(l.origin)||(I0.add(l.origin),console.warn("[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.")))}async function EC(s){if(!s.url)throw new te("Invalid stream options: missing required url parameter","BAD_REQUEST");let t=s.headers,i=s.params;for(;;)try{return await CC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function CC(s){const t=s.url instanceof URL?s.url.toString():s.url;dv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??"-1";i.searchParams.set(vh,r);const l=s.live??!0;(l==="long-poll"||l==="sse")&&i.searchParams.set(Go,l);const o=await Wo(s.params);for(const[H,K]of Object.entries(o))i.searchParams.set(H,K);const u=await Xa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener("abort",()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...H)=>fetch(...H)),g=s.backoffOptions??Bd,m=fv(p,g);let y;try{y=await m(i.toString(),{method:"GET",headers:u,signal:d.signal})}catch(H){throw H instanceof Nd?new te("Stream request was aborted","UNKNOWN"):H}const v=y.headers.get("content-type")??void 0,b=y.headers.get(On)??r,w=y.headers.get(Uc)??void 0,E=y.headers.has(zc),T=y.headers.get(In)?.toLowerCase()==="true",N=s.json===!0||(v?.includes("application/json")??!1),A=y.headers.get(aC)==="base64"?"base64":void 0,z=async(H,K,X,tt)=>{const J=new URL(t);J.searchParams.set(vh,H),tt||(l==="sse"?J.searchParams.set(Go,"sse"):(l===!0||l==="long-poll")&&J.searchParams.set(Go,"long-poll")),K&&J.searchParams.set("cursor",K);const nt=await Wo(s.params);for(const[Kt,ht]of Object.entries(nt))J.searchParams.set(Kt,ht);const st=await Xa(s.headers),xt=await m(J.toString(),{method:"GET",headers:st,signal:X});return xt.ok||await hs(xt,t),xt},I=l==="sse"?async(H,K,X)=>{const tt=new URL(t);tt.searchParams.set(vh,H),tt.searchParams.set(Go,"sse"),K&&tt.searchParams.set("cursor",K);const J=await Wo(s.params);for(const[xt,Kt]of Object.entries(J))tt.searchParams.set(xt,Kt);const nt=await Xa(s.headers),st=await m(tt.toString(),{method:"GET",headers:nt,signal:X});return st.ok||await hs(st,t),st}:void 0;return new gC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:I,sseResilience:s.sseResilience,encoding:A})}var H0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name="StaleEpochError",this.currentEpoch=s}},xC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name="SequenceGapError",this.expectedSeq=s,this.receivedSeq=t}};function q0(s){return s?s.split(";")[0].trim().toLowerCase():""}var pv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error("epoch must be >= 0");if(l<=0)throw new Error("maxBatchBytes must be > 0");if(o<=0)throw new Error("maxInFlight must be > 0");if(u<0)throw new Error("lingerMs must be >= 0");this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=ov.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener("abort",()=>{this.#A(new te("Producer aborted","ALREADY_CLOSED",void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new te("Producer is closed","ALREADY_CLOSED",void 0,void 0);let t;if(typeof s=="string")t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new te("append() requires string or Uint8Array. For objects, use JSON.stringify().","BAD_REQUEST",400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??"application/octet-stream",i=q0(t)==="application/json";let r;if(s!==void 0){const g=typeof s=="string"?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[z0]:this.#e,[Vo]:this.#n.toString(),[j0]:l.toString(),[In]:"true"},d=await this.#l(this.#t.url,{method:"POST",headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(On)??""};if(d.status===403){const g=d.headers.get(Vo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new H0(m)}throw await Js.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#D(r,i,void 0)}catch(l){throw this.#D(r,i,l),this.#d&&this.#d(l),l}}#D(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??"application/octet-stream",l=q0(r)==="application/json";let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(",")}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[z0]:this.#e,[Vo]:i.toString(),[j0]:t.toString()},g=await this.#l(u,{method:"POST",headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:"",duplicate:!0};if(g.status===200)return{offset:g.headers.get(On)??"",duplicate:!1};if(g.status===403){const y=g.headers.get(Vo),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new H0(v)}if(g.status===409){const y=g.headers.get(iC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Ch(s){return s?s.split(";")[0].trim().toLowerCase():""}function _C(s){return s!=null&&typeof s.then=="function"}var Ln=class $a{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){OC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=ov.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Bd},l=fv(this.#n,r);this.#e=hC(l)}static async create(t){const i=new $a(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new $a(t);return await i.head(),i}static async head(t){return new $a(t).head()}static async delete(t){return new $a(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:"HEAD",headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await hs(l,this.url)}const o=l.headers.get("content-type")??void 0,u=l.headers.get(On)??void 0,d=l.headers.get("etag")??void 0,p=l.headers.get("cache-control")??void 0,g=l.headers.get(In)?.toLowerCase()==="true";return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i["content-type"]=l),t?.ttlSeconds!==void 0&&(i[nC]=String(t.ttlSeconds)),t?.expiresAt&&(i[sC]=t.expiresAt),t?.closed&&(i[In]="true");const o=TC(t?.body),u=await this.#e(r.toString(),{method:"PUT",headers:i,body:o,signal:this.#t.signal});u.ok||await hs(u,this.url,{operation:"create"});const d=u.headers.get("content-type");return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:"DELETE",headers:i,signal:t?.signal??this.#t.signal});l.ok||await hs(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l),i[In]="true";let o;t?.body!==void 0&&(Ch(l)==="application/json"?o=`[${typeof t.body=="string"?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body=="string",t.body));const u=await this.#e(r.toString(),{method:"POST",headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()==="true"){const g=u.headers.get(On)??void 0;throw new uv(this.url,g)}return u.ok||await hs(u,this.url),{finalOffset:u.headers.get(On)??""}}async append(t,i){const r=_C(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[Sh]=i.seq);const u=Ch(o)==="application/json";let d;u?d=`[${typeof t=="string"?t:new TextDecoder().decode(t)}]`:typeof t=="string"?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:"POST",headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await hs(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i["content-type"]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[Sh]=o);const u=Ch(l)==="application/json";let d;if(u)d=`[${t.map(v=>typeof v.data=="string"?v.data:new TextDecoder().decode(v.data)).join(",")}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data=="string");if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,R)=>N+R.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join("");else{const b=new TextEncoder,w=t.map(R=>typeof R.data=="string"?b.encode(R.data):R.data),E=w.reduce((R,A)=>R+A.length,0),T=new Uint8Array(E);let N=0;for(const R of w)T.set(R,N),N+=R.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:"POST",headers:i,body:d,signal:g});m.ok||await hs(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r["content-type"]=o),i?.seq&&(r[Sh]=i.seq);const u=AC(t),d=await this.#e(l.toString(),{method:"POST",headers:r,body:u,duplex:"half",signal:i?.signal??this.#t.signal});d.ok||await hs(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new pv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return EC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Xa(this.#t.headers)}async#f(){const t=await Xa(this.#t.headers),i=new URL(this.url),r=await Wo(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function TC(s){if(s!==void 0)return typeof s=="string"?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function AC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r=="string"?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o=="string"?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function OC(s){if(!s.url)throw new lC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new oC;dv(s.url,s.warnOnHttp)}const DC="__includes_scalar__";class Ti{}class kr extends Ti{constructor(t,i){super(),this.collection=t,this.alias=i,this.type="collectionRef"}}class Sn extends Ti{constructor(t,i){super(),this.query=t,this.alias=i,this.type="queryRef"}}class Me extends Ti{constructor(t){super(),this.path=t,this.type="ref"}}class Be extends Ti{constructor(t){super(),this.value=t,this.type="val"}}class Je extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type="func"}}class gv extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type="agg"}}class Ai extends Ti{constructor(t,i,r,l,o,u,d="collection",p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type="includesSubquery"}}function Ur(s){return s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof Ai}function Hd(s){return typeof s=="object"&&"expression"in s?s.expression:s}function K0(s){return typeof s=="object"&&"expression"in s?s.expression:s}function V0(s){return typeof s=="object"&&"expression"in s&&s.residual===!0}function RC(s){return{expression:s,residual:!0}}function MC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function el(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type==="ref")return el(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=MC(s,r);return o?o.type==="queryRef"?el(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name="TanStackDBError"}}class G0 extends En{constructor(t,i,r){const l=`${t==="insert"?"Insert":"Update"} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join("")}`;super(r||l),this.name="SchemaValidationError",this.type=t,this.issues=i}}class Oi extends En{constructor(t){super(t),this.name="CollectionConfigurationError"}}class kC extends Oi{constructor(){super("Collection requires a config")}}class UC extends Oi{constructor(){super("Collection requires a sync config")}}class zC extends Oi{constructor(){super("Schema must implement the standard-schema interface")}}class $0 extends Oi{constructor(){super("Schema validation must be synchronous")}}class gl extends En{constructor(t){super(t),this.name="CollectionStateError"}}class jC extends gl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class NC extends gl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class BC extends gl{constructor(){super("Collection is in error state")}}class LC extends gl{constructor(){super("Active subscribers count is negative - this should never happen")}}class Gn extends En{constructor(t){super(t),this.name="CollectionOperationError"}}class IC extends Gn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class HC extends Gn{constructor(t,i){const r=t===null?"null":typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class qC extends Gn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class KC extends Gn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class VC extends Gn{constructor(){super("The first argument to update is missing")}}class GC extends Gn{constructor(){super("No keys were passed to update")}}class $C extends Gn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class YC extends Gn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class QC extends Gn{constructor(){super("No keys were passed to delete")}}class FC extends Gn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class qd extends En{constructor(t){super(t),this.name="MissingHandlerError"}}class JC extends qd{constructor(){super("Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.")}}class XC extends qd{constructor(){super("Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.")}}class ZC extends qd{constructor(){super("Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.")}}class ys extends En{constructor(t){super(t),this.name="TransactionError"}}class WC extends ys{constructor(){super("mutationFn is required when creating a transaction")}}class PC extends ys{constructor(){super("onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate."),this.name="OnMutateMustBeSynchronousError"}}class tx extends ys{constructor(){super("You can no longer call .mutate() as the transaction is no longer pending")}}class ex extends ys{constructor(){super("You can no longer call .rollback() as the transaction is already completed")}}class nx extends ys{constructor(){super("You can no longer call .commit() as the transaction is no longer pending")}}class xh extends ys{constructor(){super("No pending sync transaction to write to")}}class _h extends ys{constructor(){super("The pending sync transaction is already committed, you can't still write to it.")}}class sx extends ys{constructor(){super("No pending sync transaction to commit")}}class ix extends ys{constructor(){super("The pending sync transaction is already committed, you can't commit it again.")}}class Di extends En{constructor(t){super(t),this.name="QueryBuilderError"}}class rx extends Di{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ax extends Di{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class lx extends Di{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class $o extends Di{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class ox extends Di{constructor(){super("Join condition must be an equality expression")}}class cx extends Di{constructor(){super("Query must have a from clause")}}class Y0 extends Di{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: - - ❌ .where(({ user }) => user.id === 'abc') - ✅ .where(({ user }) => eq(user.id, 'abc')) - -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name="QueryCompilationError"}}class ux extends Le{constructor(){super("DISTINCT requires a SELECT clause.")}}class fx extends Le{constructor(){super("fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().")}}class hx extends Le{constructor(){super("Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).")}}class dx extends Le{constructor(){super("HAVING clause requires GROUP BY clause")}}class px extends Le{constructor(){super("LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results")}}class yv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(", ")}`:"";super(`Input for ${l} not found in inputs map${o}`)}}class gx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(", ")}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class yx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class mx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class Sx extends Le{constructor(){super("Reference path cannot be empty")}}class vx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class Q0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Ri extends En{constructor(t){super(t),this.name="JoinError"}}class wx extends Ri{constructor(t){super(`Unsupported join type: ${t}`)}}class bx extends Ri{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Ex extends Ri{constructor(){super("Invalid join condition: expressions must reference source aliases")}}class Cx extends Ri{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class xx extends Ri{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class _x extends Ri{constructor(){super("Invalid join condition")}}class Tx extends Ri{constructor(t){super(`Unsupported join source type: ${t}`)}}class jc extends En{constructor(t){super(t),this.name="GroupByError"}}class Ax extends jc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Ox extends jc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends jc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Rx extends jc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class F0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name="SyncCleanupError"}}class Mx extends En{constructor(t){super(t),this.name="QueryOptimizerError"}}class kx extends Mx{constructor(){super("Cannot combine empty expression list")}}class Ux extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(", ")}. This indicates a bug in alias tracking.`)}}class zx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(", ")}. This indicates a bug in query compilation. Please report this issue.`)}}class jx extends Le{constructor(){super("setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.")}}function Hn(s,t){return Po(s,t,new Map)}function Po(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&Po(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!="object"))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;oPo(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s=="object"){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&Po(s[u],t[u],i));return i.delete(s),o}return!1}const Nx=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function Xs(s){if(s==null||typeof s!="object")return!1;const t=s[Symbol.toStringTag];return typeof t=="string"&&Nx.has(t)}const mv={direction:"asc",nulls:"first",stringSort:"locale"},Th=new WeakMap;let Bx=1;function J0(s){if(Th.has(s))return Th.get(s);const t=Bx++;return Th.set(s,t),t}const Kd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r==="first"?-1:1;if(t==null)return r==="first"?1:-1;if(typeof s=="string"&&typeof t=="string"&&i.stringSort==="locale")return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s=="object",o=typeof t=="object";if(l||o){if(l&&o){const u=J0(s),d=J0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Lx=(s,t,i)=>Kd(t,s,{...i,nulls:i.nulls==="first"?"last":"first"});function Za(s){return(t,i)=>s.direction==="asc"?Kd(t,i,s):Lx(t,i,s)}const Ix=Za({direction:"asc",nulls:"first",stringSort:"locale"});function Hx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case"ref":return t?$x(s):Gx(s);case"func":return Yx(s,t);default:throw new mx(s.type)}}function Gx(s){const[t,...i]=s.path;if(!t)throw new Sx;if(t==="$selected"){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function $x(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Yx(s,t){const i=s.args.map(r=>Vd(r,t));switch(s.name){case"eq":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return Se(u)||Se(d)?null:Kx(u,d)}}case"gt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u>d}}case"gte":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u>=d}}case"lt":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u{const u=r(o),d=l(o);return Se(u)||Se(d)?null:u<=d}}case"and":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;Se(u)&&(l=!0)}return l?null:!0};case"or":return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;Se(u)&&(l=!0)}return l?null:!1};case"not":{const r=i[0];return l=>{const o=r(l);return Se(o)?null:!o}}case"in":{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return Se(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case"like":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:X0(u,d,!1)}}case"ilike":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return Se(u)||Se(d)?null:X0(u,d,!0)}}case"upper":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toUpperCase():o}}case"lower":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"?o.toLowerCase():o}}case"length":{const r=i[0];return l=>{const o=r(l);return typeof o=="string"||Array.isArray(o)?o.length:0}}case"concat":return r=>i.map(l=>{const o=l(r);try{return String(o??"")}catch{try{return JSON.stringify(o)||""}catch{return"[object]"}}}).join("");case"coalesce":return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case"add":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case"subtract":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case"multiply":{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case"divide":{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case"date":{const r=i[0];return l=>{const o=r(l),u=Ah(o);return u?u.toISOString().slice(0,10):null}}case"datetime":{const r=i[0];return l=>{const o=r(l),u=Ah(o);return u?u.toISOString():null}}case"strftime":{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!="string")return null;const d=l(o),p=Ah(d);return p?Vx(u,p):null}}case"isUndefined":{const r=i[0];return l=>r(l)===void 0}case"isNull":{const r=i[0];return l=>r(l)===null}default:throw new vx(s.name)}}function X0(s,t,i){if(typeof s!="string"||typeof t!="string")return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return o=o.replace(/%/g,".*"),o=o.replace(/_/g,"."),new RegExp(`^${o}$`,"s").test(r)}class Qx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t==="gt"?"lt":t==="gte"?"lte":t==="lt"?"gt":t==="lte"?"gte":t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function Z0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const rd=["$synced","$origin","$key","$collectionId"];function Fx(s){return rd.includes(s)}function vv(s){return s.some(t=>Fx(t))}function yl(s,t,i){if(vv(t))return;const r=i??{...mv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Qx(l)}function Jx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split("."),u=yl(t,o);if(u&&u.supports("gt")&&u.supports("lt")){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case"gt":(d===void 0||b>d)&&(d=b,g=!1);break;case"gte":(d===void 0||b>d)&&(d=b,g=!0);break;case"lt":(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Jx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function e_(s,t){if(s.type!=="func"||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=Gd(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!=="func"||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type==="ref"&&r.type==="val"&&Array.isArray(r.value)){const l=i.path,o=r.value,u=yl(t,l);if(u){if(u.supports("in"))return{canOptimize:!0,matchingKeys:u.lookup("in",o)};if(u.supports("eq")){const d=new Set;for(const p of o){const g=u.lookup("eq",p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function wv(s){return s.config.autoIndex==="eager"}function Nc(s,t,i,r,l){if(vv(t)||!wv(i))return;const o=r??{...mv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(".")}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:""}Failed to create auto-index for field path "${t.join(".")}":`,d)}}function s_(s,t){if(!wv(t))return;const i=i_(s);for(const{fieldName:r,fieldPath:l}of i)Nc(r,l,t)}function i_(s){const t=[];function i(r){if(r.type!=="func")return;const l=r;if(l.name==="and"){for(const g of l.args)i(g);return}if(!["eq","gt","gte","lt","lte","in"].includes(l.name)||l.args.length<1||l.args[0].type!=="ref")return;const d=l.args[0].path;if(d.length===0)return;const p=d.join("_");t.push({fieldName:p,fieldPath:d})}return i(s),t}class r_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Oh=3e4;function Dh(s,t){if(t.length<=Oh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class l_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!="object"||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s=="string"?-1:1}function nl(s){return JSON.stringify(s,(t,i)=>typeof i=="bigint"?i.toString():i instanceof Date?i.toISOString():i)}const c_=be(),u_=be(),f_=be(),h_=be(),d_=be();function be(){return Math.random()*(2**31-1)>>>0}const bv=new ArrayBuffer(8),p_=new DataView(bv),$s=new Uint8Array(bv);class ml{constructor(){this.hash=c_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case"symbol":{this.update(d_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case"string":this.update(u_);for(let i=0;i>>8&255)}return;case"number":p_.setFloat64(0,t,!0),this.writeByte($s[0]),this.writeByte($s[1]),this.writeByte($s[2]),this.writeByte($s[3]),this.writeByte($s[4]),this.writeByte($s[5]),this.writeByte($s[6]),this.writeByte($s[7]);return;case"bigint":{let i=t;for(i<0n?(i=-i,this.update(h_)):this.update(f_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const g_=be(),y_=be(),m_=be(),S_=be(),v_=be(),w_=be(),b_=be(),E_=be(),C_=be(),x_=be(),__=be(),T_=be(),A_=be(),O_=new Set(["Temporal.Duration","Temporal.Instant","Temporal.PlainDate","Temporal.PlainDateTime","Temporal.PlainMonthDay","Temporal.PlainTime","Temporal.PlainYearMonth","Temporal.ZonedDateTime"]);function D_(s){const t=s[Symbol.toStringTag];return typeof t=="string"&&O_.has(t)}const R_=128,sl=new WeakMap;function Ne(s){const t=new ml;return Ev(t,s),t.digest()}function M_(s){const t=sl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=k_(s);else if(typeof Buffer<"u"&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=R_)i=U_(s);else return ld(s);else{if(s instanceof File)return ld(s);if(D_(s))i=z_(s);else{let r=s,l=E_;s instanceof Array&&(l=C_),s instanceof Map&&(l=x_,r=[...s.entries()]),s instanceof Set&&(l=__,r=[...s.entries()]),i=j_(r,l)}}return sl.set(s,i),i}function k_(s){const t=new ml;return t.update(b_),t.update(s.getTime()),t.digest()}function U_(s){const t=new ml;t.update(T_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ie(this.#t.filter(([i,r])=>t(i)))}negate(){return new ie(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new ie(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error("Expected tuple of length 2");const[u,d]=o;return`${Rh.getStringId(u)}|${Rh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!="string"&&typeof d!="number")return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Rh.getStringId(p);const m=d+"|"+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ie(l)}#n(){const t=new r_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p=="string")r=!0;else if(typeof p=="number")l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new ie(d)}extend(t){const i=t instanceof ie?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class L_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Mn{#t=[];sendData(t){t instanceof ie||(t=new ie(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new L_(t)}}class Cv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Mi extends Cv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class I_ extends Cv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class $d extends Mi{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class H_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error("Graph already finalized")}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Mn;return new q_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error("Graph not finalized");for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class kn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class q_ extends kn{sendData(t){this.writer.sendData(t)}}class K_ extends Mi{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ie;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function xv(){return s=>{const t=new kn(s.graph,new Mn),i=new K_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Ya=Symbol("NO_PREFIX");class P0 extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Wa(t),l=this.get(r);if(tc(l)){const[o,u]=l;if(Wa(o)!==r)throw new Error("Mismatching prefixes, this should never happen");if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Qs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Qs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(tc(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(tc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(tc(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Wa(r);if(d!==Ya){const p=new P0;p.set(Ya,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Wa(r),p=Wa(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Ya&&d===Ya){const g=new Qa;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new P0;if(p===d){const m=new Qa;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ie(i)}}function Wa(s){return Array.isArray(s)&&(typeof s[0]=="string"||typeof s[0]=="number"||typeof s[0]=="bigint")?s[0]:Ya}function tc(s){return Array.isArray(s)}class V_ extends Mi{#t=new Qs;#e=new Qs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ie(i))}}function _v(s){return t=>{const i=new kn(t.graph,new Mn),r=new V_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class G_ extends Mi{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ie(i))}}function $_(s=t=>t){return t=>{const i=new kn(t.graph,new Mn),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Y_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ps(s){return t=>{const i=new kn(t.graph,new Mn),r=new Y_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const Q_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function xr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+" >= "+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error("trailing zero");if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(s.slice(1),null,i)}function Tv(s){if(s.length!==Av(s[0]))throw new Error("invalid integer part of order key: "+s)}function Av(s){if(s>="a"&&s<="z")return s.charCodeAt(0)-97+2;if(s>="A"&&s<="Z")return 90-s.charCodeAt(0)+2;throw new Error("invalid order key head: "+s)}function Fa(s){const t=Av(s[0]);if(t>s.length)throw new Error("invalid order key: "+s);return s.slice(0,t)}function tS(s,t){if(s==="A"+t[0].repeat(26))throw new Error("invalid order key: "+s);const i=Fa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error("invalid order key: "+s)}function eS(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i==="Z")return"a"+t[0];if(i==="z")return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>"a"?r.push(t[0]):r.pop(),o+r.join("")}else return i+r.join("")}function F_(s,t){Tv(s);const[i,...r]=s.split("");let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i==="a")return"Z"+t.slice(-1);if(i==="A")return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<"Z"?r.push(t.slice(-1)):r.pop(),o+r.join("")}else return i+r.join("")}function J_(s,t,i=Q_){if(s!=null&&tS(s,i),t!=null&&tS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+" >= "+t);if(s==null){if(t==null)return"a"+i[0];const p=Fa(t),g=t.slice(p.length);if(p==="A"+i[0].repeat(26))return p+xr("",g,i);if(p{const o=s(i,l);return o!==0?o:ad(t,r)}}class Yd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=o_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:iS(this.#t[r-1]),o=r===this.#t.length?null:iS(this.#t[r]),u=J_(l,o),d=nS(t,u);if(this.#t.splice(r,0,d),rthis.#e(sS(i),sS(r)))}}class Dv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Yd))throw new Error("Cannot move B+-tree implementation of TopK with fractional index");return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function fc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class X_ extends Mi{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Ov(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Dv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>fc(d,r)),u.moveOuts.forEach(d=>hc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ie(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ie(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);fc(d.moveIn,l),hc(d.moveOut,l),this.#l(o,u)}}function Z_(s,t){return i=>{const r=new kn(i.graph,new Mn),l=new X_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class W_ extends I_{#t=new Qs;#e=new Qs;#n;constructor(t,i,r,l,o="inner"){super(t,i,r,l),this.#n=o}run(){const t=Qs.fromMultiSets(this.inputAMessages()),i=Qs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ie;this.#n!=="anti"&&this.emitInnerResults(t,i,r),(this.#n==="left"||this.#n==="full"||this.#n==="anti")&&this.emitLeftOuterResults(t,i,r),(this.#n==="right"||this.#n==="full")&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function Rv(s,t="inner"){return i=>{if(i.graph!==s.graph)throw new Error("Cannot join streams from different graphs");const r=new kn(i.graph,new Mn),l=new W_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class P_ extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ue(s){return t=>{const i=new kn(t.graph,new Mn),r=new P_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class tT extends Mi{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function od(s){return t=>{const i=new kn(t.graph,new Mn),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends $d{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function nT(s){return t=>{const i=new kn(t.graph,new Mn),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class sT extends Mi{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Ov(l));this.#t=new Dv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Yd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>fc(o,r)),l.moveOuts.forEach(o=>hc(o,r)),l.changes&&this.output.sendData(new ie(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ie(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);fc(o.moveIn,l),hc(o.moveOut,l)}}function iT(s,t){const i=t||{};return r=>{const l=new kn(r.graph,new Mn),o=new sT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function rS(s){return"pipe"in s}function aS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!rS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>rS(l))),r=>{const l="__original_key__";return r.pipe(ue(d=>{const p=s(d),g=nl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(_v(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ue(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function rT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function aT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function oT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const uT={sum:rT,count:aT,avg:lT,min:oT,max:cT};function fT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Z_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),xv())}function hT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),xv())}function dT(s,t){return hT(iT,s,t)}const Mh="__virtual_synced__",kh="__virtual_has_local__";function lS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l==="$selected")continue;const u=o,d="$synced"in u,p="$origin"in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin==="local"&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:pT,count:gT,avg:yT,min:mT,max:ST}=uT;function vT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type==="agg"||zr(o))continue;const u=r.findIndex(d=>dc(o,d));if(u===-1)throw new Ax(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function oS(s,t,i,r,l,o,u){const d={[Mh]:{preMap:([,w])=>lS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[kh]:{preMap:([,w])=>lS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[R,A]of Object.entries(r))if(A.type==="agg")w[R]=Qo(A);else if(zr(A)){const{transformed:z,extracted:I}=cd(A,T);for(const[H,K]of Object.entries(I))w[H]=Qo(K);E[R]=de(z)}}const N=u?([,R])=>({__singleGroup:!0,__correlationKey:R?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(aS(N,w)),s=s.pipe(ue(([,R])=>{const z={...R.$selected||{}};if(r){for(const[J,nt]of Object.entries(r))nt.type==="agg"&&(z[J]=R[J]);cS(z,R,E)}const I=u?R.__correlationKey:void 0,H=I!==void 0?`single_group_${nl(I)}`:"single_group",K={...R,$selected:z},X=R[Mh],tt=R[kh];return K.$synced=X??!0,K.$origin=tt?"local":"remote",K.$key=H,K.$collectionId=o??K.$collectionId,u&&I!==void 0&&(K[u]={__correlationKey:I}),[H,K]})),i&&i.length>0)for(const R of i){const A=K0(R),z=pc(A,r||{},"$selected"),I=de(z);s=s.pipe(ps(([,H])=>{const K={$selected:H.$selected};return Tr(I(K))}))}if(l&&l.length>0)for(const R of l)s=s.pipe(ps(([,A])=>{const z={$selected:A.$selected};return Tr(R(z))}));return s}const p=vT(t,r),g=t.map(w=>de(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type==="agg")T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}cS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=K0(w),T=pc(E,r||{}),N=de(T);s=s.pipe(ps(([,R])=>{const A={$selected:R.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ps(([,E])=>{const T={$selected:E.$selected};return Tr(w(T))}));return s}function dc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case"ref":return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case"val":return s.value===t.value;case"func":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>dc(i,t.args[r]));case"agg":return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>dc(i,t.args[r]));default:return!1}}function Qo(s){const t=de(s.args[0]),i=([,o])=>{const u=t(o);return typeof u=="number"?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u=="number"||typeof u=="string"||typeof u=="bigint"||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case"sum":return pT(i);case"count":return gT(l);case"avg":return yT(i);case"min":return mT(r);case"max":return ST(r);default:throw new Ox(s.name)}}function pc(s,t,i="$selected"){switch(s.type){case"agg":{const r=s;for(const[l,o]of Object.entries(t))if(o.type==="agg"&&wT(r,o))return new Me([i,l]);throw new Dx(r.name)}case"func":{const r=s,l=r.args.map(o=>pc(o,t));return new Je(r.name,l)}case"ref":return s;case"val":return s;default:throw new Rx(s.type)}}function cS(s,t,i){for(const r of Object.keys(t))r.startsWith("__agg_")&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith("__agg_")&&delete s[r]}function zr(s){return Ur(s)?s.type==="agg"?!0:s.type==="func"&&"args"in s?s.args.some(t=>zr(t)):!1:!1}function cd(s,t){if(s.type==="agg"){const i=`__agg_${t.value++}`;return{transformed:new Me(["$selected",i]),extracted:{[i]:s}}}if(s.type==="func"){const i={},r=s.args.map(l=>{const o=cd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function wT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>dc(i,t.args[r]))}function bT(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=pc(E.expression,r,"$selected");return{compiledExpression:de(T),compareOptions:ud(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,R=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const H=i.every(J=>J.expression.type==="ref")?i.map(J=>{const nt=J.expression,st=el(s,nt,l);return de(st?new Me(st.path):J.expression,!0)}):void 0;w={alias:R,offset:p??0,limit:d,comparator:(J,nt)=>{if(i.length===1){const st=J&&N(J),xt=nt&&N(nt);return v(st,xt)}if(H){const st=xt=>xt&&H.map(Kt=>Kt(xt));return v(st(J),st(nt))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(H)return H.map(nt=>nt(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const nt=J();return Math.max(0,w.limit-nt)}}}}return g?t.pipe(fT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(dT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function ud(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function ET(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:"insert",key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error("limit cannot be used without orderBy");if(t.orderBy){const r=t.where?Pa(t.where):void 0,l=xT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Zx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:"insert",key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=Pa(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:""}Error processing where clause, falling back to full scan:`,r);const l=Pa(t.where);return t.optimizedOnly?void 0:i(l)}}function Pa(s){const t=Sv(s);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function CT(s,t){const i=Pa(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type==="insert")i(o.value)&&l.push(o);else if(o.type==="update"){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:"insert"}):!u&&d&&l.push({...o,type:"delete",value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function xT(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type==="ref"){const y=g.path,v=ud(p,s);Nc(y[0],y,s,v);const b=yl(s,y,v);if(b&&b.supports("gt")){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Za(m.compareOptions),v=uS(p.value,m.expression),b=uS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function uS(s,t){if(t.type==="ref"){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type==="val"?t.value:Sv(t)(s)}class fS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ad(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ec="__tanstack_db_direct";class _T{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state==="persisting"){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(R=>R.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const R of r){for(const A of R.operations)b.add(A.key);for(const[A]of R.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const R of b){const A=this.get(R);A!==void 0&&w.set(R,A)}}const E=[],T=this.config.sync.rowUpdateMode||"partial",N=new Map;for(const R of this.transactions.values())if(R.state==="completed")for(const A of R.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const R of r){if(R.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const I=m?.upserts.get(z)||this.syncedData.get(z);I!==void 0&&E.push({type:"delete",key:z,value:I})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit("truncate",{type:"truncate",collection:this.collection})}for(const A of R.operations){const z=A.key;this.syncedKeys.add(z);const I=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?"local":"remote";switch(A.type){case"insert":this.syncedData.set(z,A.value),this.rowOrigins.set(z,I),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case"update":{if(T==="partial"){const H=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,H)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,I),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case"delete":this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of R.rowMetadataWrites){if(z.type==="delete"){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of R.collectionMetadataWrites){if(z.type==="delete"){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const R=new Set;for(const I of r)for(const H of I.operations)(H.type==="insert"||H.type==="update")&&R.add(H.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[I,H]of A)if(!z.has(I))if(R.has(I)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===I&&tt.type==="insert"){tt.value=H,K=!0;break}}K||E.push({type:"insert",key:I,value:H})}else E.push({type:"insert",key:I,value:H});if(E.length>0&&z.size>0){const I=[];for(const H of E)H.type==="insert"&&z.has(H.key)||I.push(H);E.length=0,E.push(...I)}this.lifecycle.status!=="ready"&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[R,A]of m.upserts)this.optimisticUpserts.set(R,A);for(const R of m.deletes)this.optimisticDeletes.add(R)}for(const R of this.transactions.values())if(!["completed","failed"].includes(R.state)){for(const A of R.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case"insert":case"update":this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case"delete":this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const R of b){const A=w.get(R),z=this.get(R),I=this.getVirtualPropsSnapshotForState(R,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),H=this.getVirtualPropsSnapshotForState(R),K=I.$synced!==H.$synced||I.$origin!==H.$origin,X=A!==void 0?Z0(A,R,this.collection.id,()=>I.$synced,()=>I.$origin):void 0,tt=N.get(R);let J=!1;tt&&(tt.type==="delete"&&A!==void 0&&z===void 0&&Hn(tt.value,A)||z!==void 0&&Hn(tt.value,z))&&(J=!0);const nt=K&&A!==void 0&&z!==void 0&&Hn(A,z);if(!(J&&!nt))if(A===void 0&&z!==void 0){const st=N.get(R);if(st){const xt=st.value,Kt=Z0(xt,R,this.collection.id,()=>I.$synced,()=>I.$origin);E.push({type:"update",key:R,value:z,previousValue:Kt})}else E.push({type:"insert",key:R,value:z})}else A!==void 0&&z===void 0?E.push({type:"delete",key:R,value:X??A}):A!==void 0&&z!==void 0&&(!Hn(A,z)||nt)&&E.push({type:"update",key:R,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new fS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new fS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?"local":this.rowOrigins.get(t)??"remote"}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:"local"});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?"local":(i?.rowOrigins??this.rowOrigins).get(t)??"remote"})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ec]===!0;if(y.state==="completed"){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case"insert":case"update":this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case"delete":this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state==="failed")for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())["completed","failed"].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case"insert":case"update":this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case"delete":this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type==="delete"&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:"delete",key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:"insert",key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:"update",key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state==="completed"){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Mv(){const s=new Map;function t(i){const r=i.join(".");if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return i;if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u==="__refProxy"||u==="__path"||u==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function mi(s){const t=new Map;let i=0;function r(o){const u=o.join(".");if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return o;if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(".")}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u==="__refProxy")return!0;if(u==="__path")return[];if(u==="__type")return;if(typeof u=="symbol")return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u==="__refProxy"||u==="__path"||u==="__type"||typeof u=="string"&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,"__refProxy","__path","__type"]},getOwnPropertyDescriptor(o,u){if(u==="__refProxy"||u==="__path"||u==="__type")return{enumerable:!1,configurable:!0};if(typeof u=="string"&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function hS(s){const t=mi(s),i=new Map;function r(o){const u=o.join(".");if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g==="__refProxy")return!0;if(g==="__path")return["$selected",...o];if(g==="__type")return;if(typeof g=="symbol")return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g==="__refProxy"||g==="__path"||g==="__type"?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u==="$selected"?l:Reflect.get(o,u,d)},has(o,u){return u==="$selected"?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),"$selected"]},getOwnPropertyDescriptor(o,u){return u==="$selected"?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function re(s){return nc(s)?new Me(s.__path):s&&typeof s=="object"&&"type"in s&&(s.type==="func"||s.type==="ref"||s.type==="val"||s.type==="agg")?s:new Be(s)}function nc(s){return s&&typeof s=="object"&&s.__refProxy===!0}function fd(s,t){return new Je("eq",[re(s),re(t)])}function dS(s,t){return new Je("gt",[re(s),re(t)])}function TT(s,t){return new Je("gte",[re(s),re(t)])}function hd(s,t){return new Je("lt",[re(s),re(t)])}function dd(s,t,...i){const r=[s,t,...i];return new Je("and",r.map(l=>re(l)))}function AT(s,t,...i){const r=[s,t,...i];return new Je("or",r.map(l=>re(l)))}function OT(s,t){return new Je("in",[re(s),re(t)])}class DT{constructor(t){this.query=t}}class RT{constructor(t){this.query=t}}class kv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function MT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction==="asc"?dS:hd)(r,new Be(t[0]))}const i=[];for(let r=0;rdd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>AT(r,l))}class kT extends kv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status="ready",this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on("unsubscribed",o=>r.onUnsubscribe(o)),r.whereExpression&&s_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?CT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on("truncate",()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner("status:change",{type:"status:change",subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus("loadingSubset"),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus("ready")}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if("where"in t){const p=t.where;if(i.where){const g=i.where,m=dd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error("limit is required");if(!this.orderByIndex)throw new Error("Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.");const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?Pa(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:fd(tt,new Be(g))});if(J){const nt=J.map(xt=>xt.key).filter(xt=>!this.sentKeys.has(xt)&&b(xt));T.push(...nt);const st=m.take(i-T.length,g,b);T.push(...st)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),R=()=>T.length===0,A=t[0].expression,z=A.type==="ref"?de(new Me(A.path),!0):null;for(;N()>0&&!R();){const tt=new Set;for(const J of T){const nt=this.collection.get(J);E.push({type:"insert",key:J,value:nt}),w=z?z(nt):nt,tt.add(J)}T=m.take(N(),w,b)}const I=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let H;if(r!==void 0&&r.length>0){const tt=MT(t,r);if(tt){const{expression:J}=t[0],nt=r[0];let st;if(nt instanceof Date){const xt=new Date(nt.getTime()+1);st=dd(TT(J,new Be(nt)),hd(J,new Be(xt)))}else st=fd(J,new Be(nt));H={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:H,offset:l??I,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type==="insert")continue;l.type==="delete"&&this.sentKeys.delete(l.key)}else{if(l.type==="update")o={...l,type:"insert",previousValue:void 0};else if(l.type==="delete"&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type==="delete"?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner("unsubscribed",{type:"unsubscribed",subscription:this}),this.clearListeners()}}class UT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error("Cannot specify both 'where' and 'whereExpression' options. Use one or the other.");const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Mv(),p=r(d);o=re(p)}const u=new kT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on("status:change",i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status==="cleaned-up"||this.lifecycle.status==="idle")&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new LC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const zT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),jT=s=>{clearTimeout(s)},NT=typeof window<"u"&&"requestIdleCallback"in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>zT(s),Uh=typeof window<"u"&&"cancelIdleCallback"in window?s=>window.cancelIdleCallback(s):jT,Uv=class fs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return fs.instance||(fs.instance=new fs),fs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error("Error in CleanupQueue task:",l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){fs.instance&&(fs.instance.timeoutId!==null&&clearTimeout(fs.instance.timeoutId),fs.instance=null)}};Uv.instance=null;let zh=Uv;class BT{constructor(t,i){this.status="idle",this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:["loading","error","cleaned-up"],loading:["ready","error","cleaned-up"],ready:["cleaned-up","error"],error:["cleaned-up","idle"],"cleaned-up":["loading","error"]}[t].includes(i))throw new NC(t,i,this.id)}setStatus(t,i=!1){if(t==="ready"&&!i)throw new gl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case"error":throw new jC(t,this.id);case"cleaned-up":this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,"ready"),this.status==="loading"){if(this.setStatus("ready",!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||zh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){zh.getInstance().cancel(this),this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Uh(this.idleCallbackId),this.idleCallbackId=NT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),zh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:""}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus("cleaned-up"),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Uh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Qd=Symbol("liveQueryInternal");class LT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??"eager"}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!=="idle"&&this.lifecycle.status!=="cleaned-up")){this.lifecycle.setStatus("loading");try{const t=IT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new xh;if(r.committed)throw new _h;let l;"key"in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type==="insert"){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o="update";else{const b=this.config.utils[Qd];throw new KC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o==="delete"?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:"delete"})):o==="insert"?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:"set",value:u.metadata}):r.rowMetadataWrites.set(l,{type:"delete"}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:"set",value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new sx;if(i.committed)throw new ix;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new xh;if(i.committed)throw new _h;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode==="on-demand"&&!this.syncLoadSubsetFn)throw new Oi(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus("error"),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new xh;if(t.committed)throw new _h;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type==="delete"?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:"delete"})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type==="delete"?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"set",value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:"delete"})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type==="delete"?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode==="on-demand"&&console.warn(`${this.id?`[${this.id}] `:""}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status==="ready"){t();return}if(this.lifecycle.status==="error"){i(new BC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status==="idle"||this.lifecycle.status==="cleaned-up")try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:"start"}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit("loadingSubset:change",{type:"loadingSubset:change",collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:"end"})})}loadSubset(t){if(this.syncMode==="eager")return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new F0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new F0(this.id,t)})}this.preloadPromise=null}}function IT(s){if(typeof s=="function")return{cleanup:s};if(typeof s=="object")return s}const pS=1;function sc(s,t){return s===t?0:sYs(r)??null);if(s instanceof Date)return{__type:"date",value:s.toISOString()};if(s instanceof Set)return{__type:"set",values:Array.from(s).map(l=>Ys(l)??null).sort((l,o)=>sc(vi(l),vi(o)))};if(s instanceof Map)return{__type:"map",entries:Array.from(s.entries()).map(([l,o])=>({key:Ys(l)??null,value:Ys(o)??null})).sort((l,o)=>sc(vi(l.key),vi(o.key)))};if(s instanceof RegExp)return{__type:"regexp",value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>sc(r,l));for(const[r,l]of i){const o=Ys(l);o!==void 0&&(t[r]=o)}return t}function vi(s){return s===null?"null":Array.isArray(s)?`[${s.map(vi).join(",")}]`:typeof s!="object"?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>sc(r,l)).map(r=>`${JSON.stringify(r)}:${vi(s[r])}`).join(",")}}`}function qT(s,t,i,r,l){const o=HT(r),u=Ys(t)??null,d=Ys(l),g=Ys({signatureVersion:pS,expression:u,options:d??null})??null,m=vi(g);return{signatureVersion:pS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function pd(s){if(s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(i=>pd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=pd(r);return t}function KT(s){return JSON.parse(JSON.stringify(s))}class VT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable("createIndex");const r=++this.indexCounter,l=Mv(),o=t(l),u=re(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Oi(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=qT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable("removeIndex");const i=typeof t=="number"?t:t.id,r=this.indexes.get(i);if(!r||typeof t!="number"&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:KT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:pd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case"insert":i.add(r.key,r.value);break;case"update":r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case"delete":i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var GT={};const $T=new Set(["find","findLast","findIndex","findLastIndex","filter","map","flatMap","forEach","some","every","reduce","reduceRight"]),YT=new Set(["pop","push","shift","unshift","splice","sort","reverse","fill","copyWithin"]),QT=new Set(["set","delete","clear","add"]),FT=new Set(["entries","keys","values","forEach"]);function Fd(s){return s!==null&&typeof s=="object"&&!(s instanceof Date)&&!(s instanceof RegExp)&&!Xs(s)}function JT(s,t,i,r){if($T.has(s))return function(...l){const o=l[0];if(typeof o!="function")return t.apply(i.copy_,l);const u=(g,m)=>{if(Fd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s==="reduce"||s==="reduceRight"){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s==="find"||s==="findLast")&&p&&typeof p=="object"){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s==="filter"&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function XT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Fd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function gS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function ZT(s,t,i,r,l,o,u){if(FT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s==="forEach"){const y=p[0];if(typeof y=="function"){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s==="entries"||s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s==="values"&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value=="object"){if(s==="entries"&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]=="object"){const E=w.value[0],T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s==="values"||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s==="values"&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:R=>{l.copy_ instanceof Map&&l.copy_.set(E,R)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:R=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(R),b.set(E,R))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol("iterator-value"),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...s){const t=typeof window<"u"&&typeof localStorage<"u";t&&localStorage.getItem("DEBUG")==="true"?console.log("[proxy]",...s):!t&&typeof process<"u"&>.DEBUG==="true"&&console.log("[proxy]",...s)}function ds(s,t=new WeakMap){if(s==null||typeof s!="object")return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=ds(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,ds(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(ds(o,t))}),l}if(Xs(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=ds(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=ds(s[l],t);return i}let yS=0;function WT(){return yS+=1,yS}function Jd(s,t){const i=new Map;function r(y,v){if(At("Object ID:",y.constructor.name),i.has(y))return i.get(y);{const b=Jd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:ds(s),originalObject:ds(s),proxyCount:WT(),modified:!1,assigned_:{},parent:t,target:s};At("createChangeProxy called for target",s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At("propagating change to parent"),"updateMap"in y.parent?y.parent.updateMap(y.copy_):"updateSet"in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At("checkIfReverted called with assigned keys:",Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At("No assigned properties, returning true"),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,"original:",E),!Hn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Hn(w,E))return At("Symbol property is different, returning false"),!1}else if(y.assigned_[b]===!1)return At("Symbol property was deleted, returning false"),!1;return At("All properties match original values, returning true"),!0}function p(y,v){At("checkParentStatus called for child prop:",v);const b=d(y);At("Parent checkIfReverted returned:",b),b&&(At("Parent is fully reverted, clearing tracking"),y.modified=!1,y.assigned_={},y.parent&&(At("Continuing up the parent chain"),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At("createObjectProxy",y),l.has(y))return At("proxyCache found match"),l.get(y);const v=new Proxy(y,{get(b,w){At("get",b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At("value (at top of proxy get)",E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E=="function"){if(Array.isArray(b)){const R=w.toString();if(YT.has(R))return gS(E,o,u);const A=JT(R,E,o,r);if(A)return A;if(w===Symbol.iterator)return XT(o,r)}if(b instanceof Map||b instanceof Set){const R=w.toString();if(QT.has(R))return gS(E,o,u);const A=ZT(R,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Fd(E)){const R={tracker:o,prop:String(w)},{proxy:A}=r(T,R);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,"new:",E),Hn(T,E))At("Value unchanged, not tracking");else{const N=o.originalObject[w],R=Hn(E,N);if(At("value:",E,"original:",N,"isRevertToOriginal:",R),R){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=ds(N),At("Checking if all properties reverted");const A=d(o);At("All reverted:",A),A?(At("All properties reverted, clearing tracking"),o.modified=!1,o.assigned_={},t&&(At("Updating parent for property:",t.prop),p(t.tracker,t.prop))):(At("Some properties still changed, keeping modified flag"),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At("Marking object and ancestors as modified",o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&"value"in E&&(o.copy_[w]=ds(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At("deleteProperty",b,w);const E=typeof w=="symbol"?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At("getChanges called, modified:",o.modified),At(o),!o.modified)return At("Object not modified, returning empty object"),{};if(typeof o.copy_!="object"||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At("Returning copy:",y),y}}}function PT(s){const t=s.map(i=>Jd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function tA(s,t){const{proxy:i,getChanges:r}=Jd(s);return t(i),r()}function eA(s,t){const{proxies:i,getChanges:r}=PT(s);return t(i),r()}function nA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function sA(s){return typeof s=="object"&&s!==null&&typeof s.hasPendingGraphRun=="function"}class iA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>"u"){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const gc=new iA,yc=[];let il=[],rA=0;function aA(s,t){switch(`${s.type}-${t.type}`){case"insert-update":return{...s,type:"insert",original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case"insert-delete":return null;case"update-delete":return t;case"update-update":return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case"delete-delete":case"insert-insert":return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(s){const t=new uA(s);return yc.push(t),t}function ic(){if(il.length>0)return il.slice(-1)[0]}function lA(s){gc.clear(s.id),il.push(s)}function oA(s){try{gc.flush(s.id)}finally{il=il.filter(t=>t.id!==s.id)}}function cA(s){const t=yc.findIndex(i=>i.id===s.id);t!==-1&&yc.splice(t,1)}let uA=class{constructor(t){if(typeof t.mutationFn>"u")throw new WC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state="pending",this.mutations=[],this.isPersisted=nA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=rA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t==="completed"||t==="failed")&&cA(this)}mutate(t){if(this.state!=="pending")throw new tx;lA(this);try{t()}finally{oA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=aA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state==="completed")throw new ex;if(this.setState("failed"),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of yc)l.state==="pending"&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!=="pending")throw new nx;if(this.setState("persisting"),this.mutations.length===0)return this.setState("completed"),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState("completed"),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class fA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable("insert");const o=this.state,u=ic();if(!u&&!this.config.onInsert)throw new JC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,"insert"),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new qC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:"insert",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[ec]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable("delete");const u=ic();if(!u&&!this.config.onDelete)throw new ZC;if(Array.isArray(r)&&r.length===0)throw new QC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new FC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:"delete",createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[ec]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&"~standard"in t)return t;throw new zC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i==="update"&&r){const u=this.state.get(r);if(u&&t&&typeof t=="object"&&typeof u=="object"){const d=Object.assign({},u,t),p=l["~standard"].validate(d);if(p instanceof Promise)throw new $0;if("issues"in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new G0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l["~standard"].validate(t);if(o instanceof Promise)throw new $0;if("issues"in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new G0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!="string"&&typeof t!="number")throw typeof t>"u"?new IC(i):new HC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>"u")throw new VC;const l=this.state;this.lifecycle.validateCollectionUsable("update");const o=ic();if(!o&&!this.config.onUpdate)throw new XC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new GC;const p=typeof i=="function"?i:r,g=typeof i=="function"?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new $C(w);return E});let y;u?y=eA(m,p):y=[tA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],R=this.validateData(T,"update",w),A=Object.assign({},N,R),z=this.config.getKey(N),I=this.config.getKey(A);if(z!==I)throw new YC(z,I);const H=this.generateGlobalKey(I,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:H,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:"update",createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Ja({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Ja({metadata:{[ec]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class hA extends kv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit("status:change",{type:"status:change",collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit("subscribers:change",{type:"subscribers:change",collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit("index:added",{type:"index:added",collection:this.collection,index:t})}emitIndexRemoved(t){this.emit("index:removed",{type:"index:removed",collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Xd(s){const t=new Zd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Zd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new kC;if(!t.sync)throw new UC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??"off"},this.config.autoIndex==="eager"&&!t.defaultIndexType)throw new Oi(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new UT,this._events=new hA,this._indexes=new VT,this._lifecycle=new BT(t,this.id),this._mutations=new fA(t,this.id),this._state=new _T(t),this._sync=new LT(t,this.id),this.comparisonOpts=dA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status==="ready"}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return ET(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function dA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??"locale",locale:t.stringSort==="locale"?t.locale:void 0,localeOptions:t.stringSort==="locale"?t.localeOptions:void 0}}else return{stringSort:"locale"}}function pA(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function gA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(pA(u))throw new PC}),o}}function yA(s){const t=mA(s);let i=s,r,l=0;const o=10;for(;lNv(u)),l=Bv(r),o=zv(s);for(const[u,d]of l.singleSource)SA(s,u)&&!o.has(u)&&t.set(u,d);return t}function SA(s,t){if(s.from.alias===t)return s.from.type==="collectionRef";if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type==="collectionRef"}return!1}function zv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type==="left"||r.type==="full")&&t.add(l),(r.type==="right"||r.type==="full")&&t.add(i)}}return t}function gd(s){const t={...s,from:s.from.type==="queryRef"?new Sn(gd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type==="queryRef"?new Sn(gd(i.from.query),i.from.alias):i.from}))};return vA(t)}function vA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=md(s.where),p=mc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!V0(d)),r=md(t).map(d=>Nv(d)),l=Bv(r),o=bA(s,l),u=s.where.filter(d=>V0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function jv(s){return{...s,from:yd(s.from),join:s.join?.map(t=>({...t,from:yd(t.from)}))}}function yd(s){if(s.type==="collectionRef")return s;const t=jv(s.query);if(wA(t)){const i=yd(t.from);return i.type==="collectionRef"?new kr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function wA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function md(s){const t=[];for(const i of s){const r=Hd(i);t.push(...Wd(r))}return t}function Wd(s){if(s.type==="func"&&s.name==="and"){const t=[];for(const i of s.args)t.push(...Wd(i));return t}else return[s]}function Nv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case"ref":if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case"func":l.args&&l.args.forEach(r);break;case"val":break;case"agg":l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Bv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,mc(u));const l=i.length>0?mc(i):void 0;return{singleSource:r,multiSource:l}}function bA(s,t){const i=new Set,r=zv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=mS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:mS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(RC(v)):d.push(v);const g=d.length>1?[mc(d.flatMap(y=>Wd(Hd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(s){return{from:s.from.type==="collectionRef"?new kr(s.from.collection,s.from.alias):new Sn(_r(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type==="collectionRef"?new kr(t.from.collection,t.from.alias):new Sn(_r(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function mS(s,t,i){const r=t.get(s.alias);if(!r)return s.type==="collectionRef"?new kr(s.collection,s.alias):new Sn(_r(s.query),s.alias);if(s.type==="collectionRef"){const u={from:new kr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!AA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(_r(s.query),s.alias);const l=s.query.where||[],o={..._r(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function EA(s,t,i){return s.select?Lv(s.select)||OA(s.select,t,i):!1}function CA(s){return s.groupBy&&s.groupBy.length>0}function xA(s){return s.having&&s.having.length>0}function _A(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function TA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function AA(s,t,i){return!(EA(s,t,i)||CA(s)||xA(s)||_A(s)||TA(s))}function Lv(s){for(const t of Object.values(s))if(typeof t=="object"){const i=t;if(i.type==="agg"||!("type"in i)&&Lv(i))return!0}return!1}function Pd(s){const t=[];if(s==null||typeof s!="object")return t;switch(s.type){case"ref":t.push(s);break;case"func":case"agg":for(const i of s.args??[])t.push(...Pd(i));break}return t}function OA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith("__SPREAD_SENTINEL__")||u instanceof Me||r.add(o);const l=Pd(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=Pd(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function mc(s){if(s.length===0)throw new kx;return s.length===1?s[0]:new Je("and",s)}function RA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R){let A=s;for(const z of t)A=MA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R);return A}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,R){const A=t.from.type==="collectionRef",{alias:z,input:I,collectionId:H}=UA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,R);i[z]=I,A&&(T[z]=H);const K=p[r],X=p[H];if(!K)throw new Q0(r);if(!X)throw new Q0(H);const{activeSource:tt,lazySource:J}=jA(t.type,K,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:xt}=kA(t.left,t.right,nt,z),Kt=de(st),ht=de(xt);let M=s.pipe(ue(([Z,at])=>[Cr(Kt(at)),[Z,at]])),q=I.pipe(ue(([Z,at])=>{const ft={[z]:at};return[Cr(ht(ft)),[Z,ft]]}));if(!["inner","left","right","full"].includes(t.type))throw new wx(t.type);if(tt){const Z=tt==="main"?t.from:w.from,at=Z.type==="queryRef"&&(Z.query.limit||Z.query.offset),ft=st.type==="func"||xt.type==="func";if(!at&&!ft){const _=tt==="main"?z:l;y.add(_);const L=tt==="main"?M:q,F=el(w,tt==="main"?xt:st,J),lt=F.collection,it=F.path[0];it&&Nc(it,F.path,lt);const St=L.pipe(nT(zt=>{const vt=N[_]||_,et=g[vt];if(!et)throw new Ux(vt,_,J.id,Object.keys(g));if(et.hasLoadedInitialState())return;const P=zt.getInner().map(([[wt]])=>wt),pt=new Me(F.path);et.requestSnapshot({where:OT(pt,P),optimizedOnly:!0})||et.requestSnapshot()}));tt==="main"?M=St:q=St}}return M.pipe(Rv(q,t.type),zA(t.type))}function kA(s,t,i,r){const l=i.filter(d=>d!==r),o=Sd(s),u=Sd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Ex:o===u?new bx(o):l.includes(o)?u!==r?new xx(r):new _x:new Cx(o)}function Sd(s){switch(s.type){case"ref":return s.path[0]||null;case"func":{const t=new Set;for(const i of s.args){const r=Sd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function UA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case"collectionRef":{const w=t[s.alias];if(!w)throw new yv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case"queryRef":{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[H,K]of E.sourceWhereClauses)b.set(H,K);const A=Object.keys(E.aliasToCollectionId).find(H=>E.aliasToCollectionId[H]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const I=E.pipeline.pipe(ue(H=>{const[K,[X,tt]]=H;return[K,X]}));return{alias:s.alias,input:I,collectionId:E.collectionId}}default:throw new Tx(s.type)}}function zA(s){return function(t){return t.pipe(ps(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s==="inner"?!!(u&&d):s==="left"?!!u:s==="right"?!!d:!0}),ue(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function jA(s,t,i){switch(s){case"left":return{activeSource:"main",lazySource:i};case"right":return{activeSource:"joined",lazySource:t};case"inner":return t.sizeLA(l,r)))}function HA(s){return s.type==="agg"}function qA(s){return s&&typeof s=="object"&&!Ur(s)}function Iv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith("__SPREAD_SENTINEL__")){const u=r.slice(19),d=u.lastIndexOf("__"),p=d>=0?u.slice(0,d):u,g=l&&typeof l=="object"&&"type"in l&&l.type==="ref";if(p.includes(".")||g){const m=[...s],y=g?l:new Me(p.split(".")),v=de(y);i.push({kind:"merge",targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:"merge",targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type==="includesSubquery"){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});continue}if(qA(o)){Iv([...s,r],o,i);continue}if(HA(o)||zr(o))i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>null});else{if(o===void 0||!Ur(o)){i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:"field",alias:[...s,r].join("."),compiled:()=>u})}else i.push({kind:"field",alias:[...s,r].join("."),compiled:de(o)})}}}const Ar=Symbol("includesRouting");function Sc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;wd(s);const{optimizedQuery:b,sourceWhereClauses:w}=yA(s);let E=b;g.set(E,s),Ed(E,s,g);const T={...t},N={},R={},A={},{alias:z,input:I,collectionId:H}=VA(E.from,T,i,r,l,o,u,d,p,g,N,R,w);A[z]=I;let K=I;if(m&&y){const ht=y.path.slice(1);K=I.pipe(ue(([Z,at])=>[QA(at,ht),[Z,at]])).pipe(Rv(m,"inner")).pipe(ps(([Z,[at]])=>at!=null),ue(([Z,[at,ft]])=>{const[_,L]=at,Y={...L,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),A[z]=K}let X=K.pipe(ue(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=RA(X,E.join,A,H,z,T,p,g,i,r,l,o,u,d,s,Sc,N,R,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=Hd(ht),q=de(M);X=X.pipe(ps(([Z,at])=>Tr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ps(([M,q])=>Tr(ht(q))));const tt=[],J=[];if(E.select){const ht=$A(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=de(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:de(Y)}));at=X.pipe(ue(([Y,F])=>{const lt={};for(const it of L){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(F);let zt=lt[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(_v(L=>L.map(([Y,F])=>[Y,F>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=Sc(ft,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(R,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:de(F)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:F=>{const lt={};for(const it of L){lt[it.alias]||(lt[it.alias]={});const St=it.compiled(F);let zt=lt[it.alias];for(let vt=0;vt({correlationKey:Z(L),parentContext:null})});YA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new ux;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new fx;E.fnSelect?X=X.pipe(ue(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=IA(X,E.select):X=X.pipe(ue(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ue(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[Ar]=q,[ht,M]})));const nt=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=oS(X,E.groupBy,E.having,E.select,E.fnHaving,H,nt):E.select&&Object.values(E.select).some(M=>M.type==="agg"||zr(M))&&(X=oS(X,[],E.having,E.select,E.fnHaving,H,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type==="agg"):!1))throw new dx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ps(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe($_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const L=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([L,Y]):L}:void 0,Z=bT(s,X,E.orderBy,E.select||{},i[H],u,d,E.limit,E.offset,ht).pipe(ue(([ft,[_,L]])=>{const Y=_.$selected,F=SS(bd(Y),_);if(m){const lt=_[z]?.__correlationKey,it=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ft,[F,L,lt,it]]}return[ft,[F,L]]})),at={collectionId:H,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new px;const xt=X.pipe(ue(([ht,M])=>{const q=M.$selected,Z=SS(bd(q),M);if(m){const at=M[z]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ft]]}return[ht,[Z,void 0]]})),Kt={collectionId:H,pipeline:xt,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:R,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function KA(s){const t=new Set;if(s.from.type==="collectionRef"&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type==="collectionRef"&&t.add(i.from.alias);return t}function wd(s,t=new Set){const i=KA(s);for(const l of i)if(t.has(l))throw new gx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type==="queryRef"&&wd(s.from.query,r),s.join)for(const l of s.join)l.from.type==="queryRef"&&wd(l.from.query,r)}function VA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case"collectionRef":{const b=t[s.alias];if(!b)throw new yv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case"queryRef":{const b=g.get(s.query)||s.query,w=Sc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[I,H]of w.sourceWhereClauses)v.set(I,H);const R=Object.keys(w.aliasToCollectionId).find(I=>w.aliasToCollectionId[I]===w.collectionId);R&&R!==s.alias&&(y[s.alias]=R);const z=w.pipeline.pipe(ue(I=>{const[H,[K,X]]=I,tt=bd(K);return[H,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new yx(s.type)}}function GA(s){return s instanceof Be||s&&typeof s=="object"&&"type"in s&&s.type==="val"}function bd(s){return GA(s)?s.value:s}function SS(s,t){if(!s||typeof s!="object")return s;let i=!1;for(const r of rd)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of rd)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Ed(s,t,i){if(s.from.type==="queryRef"&&t.from.type==="queryRef"&&(i.set(s.from.query,t.from.query),Ed(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=tp(l,t);r.push(o)}return new Je(s.name,r)}}function ep(s,t){return s.map(r=>{const l=tp(r.expression,t);return{...r,expression:l}})}const Kv=new WeakMap;function FA(s){return s.utils?.[Qd]?.getBuilder?.()}function JA(s,t){Kv.set(s,t)}function XA(s){return Kv.get(s)}class Pt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?"null":"undefined";throw new $o(i,d)}if(Array.isArray(t))throw new $o(i,"array");if(r.length!==1)throw r.length===0?new $o(i,"empty object"):r.every(d=>!isNaN(Number(d)))?new $o(i,"string"):new rx(i);const l=r[0],o=t[l];let u;if(o instanceof Zd)u=new kr(o,l);else if(o instanceof Pt){const d=o._getQuery();if(!d.from)throw new ax(i);u=new Sn(d,l)}else throw new lx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,"from clause");return new Pt({...this.query,from:i})}join(t,i,r="left"){const[l,o]=this._createRefForSource(t,"join clause"),d=[...this._getCurrentAliases(),l],p=mi(d),g=i(p);let m,y;if(g.type==="func"&&g.name==="eq"&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new ox;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Pt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,"left")}rightJoin(t,i){return this.join(t,i,"right")}innerJoin(t,i){return this.join(t,i,"inner")}fullJoin(t,i){return this.join(t,i,"full")}where(t){const i=this._getCurrentAliases(),r=mi(i),l=t(r),o=nc(l)?re(l):l;if(!Ur(o))throw new Y0(vS(o));const u=this.query.where||[];return new Pt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?hS(i):mi(i),l=t(r),o=nc(l)?re(l):l;if(!Ur(o))throw new Y0(vS(o));const u=this.query.having||[];return new Pt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=mi(i);let l=t(r);nc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Gv(l,i);return new Pt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i="asc"){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?hS(r):mi(r),o=t(l),u=typeof i=="string"?{direction:i,nulls:"first"}:{direction:i.direction??"asc",nulls:i.nulls??"first",stringSort:i.stringSort,locale:i.stringSort==="locale"?i.locale:void 0,localeOptions:i.stringSort==="locale"?i.localeOptions:void 0},d=m=>({expression:re(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Pt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=mi(i),l=t(r),o=Array.isArray(l)?l.map(d=>re(d)):[re(l)],u=this.query.groupBy||[];return new Pt({...this.query,groupBy:[...u,...o]})}limit(t){return new Pt({...this.query,limit:t})}offset(t){return new Pt({...this.query,offset:t})}distinct(){return new Pt({...this.query,distinct:!0})}findOne(){return new Pt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Pt({...t.query,select:void 0,fnSelect:i})},where(i){return new Pt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Pt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new cx;return this.query}}function vS(s){return s===null?"null":s===void 0?"undefined":typeof s=="object"?"object":typeof s}function ZA(s){return s===void 0?re(null):s instanceof gv||s instanceof Je||s instanceof Me||s instanceof Be?s:re(s)}function Vv(s){return s!==null&&typeof s=="object"&&!Ur(s)&&!s.__refProxy}function Gv(s,t=[]){if(!Vv(s))return ZA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r=="string"&&r.startsWith("__SPREAD_SENTINEL__")){i[r]=l;continue}if(l instanceof Pt){i[r]=jh(l,r,t,"collection");continue}if(l instanceof DT){if(!(l.query instanceof Pt))throw new Error("toArray() must wrap a subquery builder");i[r]=jh(l.query,r,t,"array");continue}if(l instanceof RT){if(!(l.query instanceof Pt))throw new Error("concat(toArray(...)) must wrap a subquery builder");i[r]=jh(l.query,r,t,"concat");continue}i[r]=Gv(l,t)}return i}function np(s){const t=[];switch(s.type){case"ref":t.push(s);break;case"func":for(const i of s.args??[])t.push(...np(i));break}return t}function WA(s,t){const i=typeof s=="object"&&"expression"in s?s.expression:s;return np(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function jh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let H=0;H eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],I=(typeof A=="object"&&"expression"in A?A.expression:A).args.filter((H,K)=>K!==g);if(I.length===1){const H=typeof A=="object"&&"expression"in A&&A.residual;m[p]=H?{expression:I[0],residual:!0}:I[0]}else{const H=new Je("and",I),K=typeof A=="object"&&"expression"in A&&A.residual;m[p]=K?{expression:H,residual:!0}:H}}else m.splice(p,1);const y=[],v=[];for(const A of m)WA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const I=typeof z=="object"&&"expression"in z?z.expression:z;for(const H of np(I))H.path[0]!=null&&i.includes(H.path[0])&&!A.has(H.path.join("."))&&(A.add(H.path.join(".")),b.push(H))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||Vv(E);let N=w,R;if(r==="concat"&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r==="collection")throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);R=DC,N={...w,select:{[R]:E}}}return new Ai(N,u,d,t,v.length>0?v:void 0,b,r,R)}function wS(s,t,i,r){if(s.type==="ref"&&t.type==="ref"){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function PA(s){const t=s(new Pt);return $v(t)}function $v(s){return s._getQuery()}function tO(s){const t={};function i(o){o.type==="collectionRef"?t[o.collection.id]=o.collection:o.type==="queryRef"&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Ai?r(d.query):sp(d)&&l(d))}return r(s),t}function Yv(s){const t=s.from;if(t.type==="collectionRef")return t.collection;if(t.type==="queryRef")return Yv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function eO(s){const t=new Map;function i(o){if(o)if(o.type==="collectionRef"){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type==="queryRef"&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u=="string"&&u.startsWith("__SPREAD_SENTINEL__")||(d instanceof Ai?l(d.query):sp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function sp(s){return!(s===null||typeof s!="object"||s instanceof Ai||"type"in s&&typeof s.type=="string"||s.__refProxy)}function nO(s){const t=typeof s.query=="function"?PA(s.query):$v(s.query);if(t.select&&!sp(t.select))throw new hx;return t}function sO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type==="insert"?r.push([[o,l.value],1]):l.type==="update"?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new ie(r)),r.length}function*iO(s){for(const t of s)t.type==="update"?(yield{type:"delete",key:t.key,value:t.previousValue},yield{type:"insert",key:t.key,value:t.value}):yield t}function rO(s,t){const i=[];for(const r of s){if(r.type==="insert"){if(t.has(r.key))continue;t.add(r.key)}else r.type==="delete"&&t.delete(r.key);i.push(r)}return i}function aO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type==="delete")continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function lO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?ep(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!=="ref")return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function oO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=nl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=ep(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const bS=Symbol.for("@tanstack/db.collection-config-builder");class cO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=tp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status==="loadingSubset")this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status==="loadingSubset"&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=rO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=sO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=lO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=iO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on("truncate",()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on("unsubscribed",()=>{b()});const w=ep(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[bS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[bS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=oO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=aO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let uO=0;class fO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++uO}`,this.query=nO({query:t.query}),this.collections=tO(this.query);const i=eO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Qv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Yv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type==="queryRef"&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Qd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new jx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on("loadingSubset:change",l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("maybeRunGraph called without active sync session. This should not happen.");this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ic()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun=="function"&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error("scheduleGraphRun called without active sync session. This should not happen.");let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;gc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:"full",sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=gc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on("loadingSubset:change",u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new H_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=Sc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new zx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(od(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(SO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=yO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Cd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(od(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=jr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Fv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:"insert"});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:"update"});else if(u>0)l({value:p,type:"delete"});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l==="error"){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l==="cleaned-up"){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus("error")}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=XA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new cO(u,d,p,this),y=p.on("status:change",w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Qv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function ES(s){return s.materialization!=="collection"}function CS(s,t){if(!t)return s.materialization==="array"?[]:s.materialization==="concat"?"":void 0;if(s.materialization==="collection")return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization==="array"?r:r.map(l=>String(l??"")).join("")}function Fv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(od(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=jr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Fv(i.childCompilationResult.includes,t)),l})}function hO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function dO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function pO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=jr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function gO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Jv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function jr(s,t){return t==null?s:JSON.stringify([s,t])}function xS(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Qv(u):void 0,m={collection:Xd({id:`__child-collection:${s}-${t}-${nl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:"full",sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=hO(l)),m}function Cd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Ar]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=jr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=xS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const R=CS(o,o.childRegistry.get(T));v[o.fieldName]=R;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=R)}}}const u=ES(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=xS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization==="collection"&&mO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:"insert"}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:"update"}):w.deletes>0&&v.syncMethods.write({value:w.value,type:"delete"});v.syncMethods.commit()}pO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=dO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Cd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Cd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=ES(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=CS(o,b),m.push({type:"update",key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=jr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(gO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function yO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Jv(t.nestedSetups))return!0;return!1}function mO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function SO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function _S(s){return new fO(s).getConfig()}function Nh(s){if(typeof s=="function"){const i=_S({query:s});return TS(i)}else{const t=s,i=_S(t);return t.utils&&(i.utils={...i.utils,...t.utils}),TS(i)}}function TS(s){const t=Xd(s),i=FA(s);return i&&JA(t,i),t}function Xv(s){return s!=null&&"operation"in s.headers}function Zv(s){return s!=null&&"control"in s.headers}var vO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Xv(s))return;s.headers.txid&&typeof s.headers.txid=="string"&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!=="delete"&&(typeof s.value!="object"||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i==="upsert"&&(i=this.existingKeys.get(s.type)?.has(s.key)?"update":"insert");const o=this.existingKeys.get(s.type);i==="insert"||i==="update"?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error("[StreamDB] Error in handler.write():",u),console.error("[StreamDB] Event that caused error:",{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Zv(s))switch(s.headers.control){case"reset":for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error("[StreamDB] Error in handler.commit():",t),t instanceof Error&&t.message.includes("already exists in the collection")&&t.message.includes("live-query")){console.warn("[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error"),console.warn("[StreamDB] Queries with groupBy may show stale data until fixed");continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function wO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const AS=new Set(["collections","preload","close","utils","actions"]);function bO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"insert"}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(", ")??"Unknown validation error"}`);if(o!==void 0){const m=i["~standard"].validate(o);if("issues"in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(", ")??"Unknown validation error"}`)}const p=l[t],g=r??(p!=null&&p!==""?String(p):void 0);if(g==null||g==="")throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:"update"}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i["~standard"].validate(l);if("issues"in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(", ")??"Unknown validation error"}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:"delete"}}},upsert:({key:r,value:l,headers:o})=>{const u=i["~standard"].validate(l);if("issues"in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(", ")??"Unknown validation error"}`);const d=l[t],p=r??(d!=null&&d!==""?String(d):void 0);if(p==null||p==="")throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:"upsert"}}}}}function Wv(s){for(const r of Object.keys(s))if(AS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(AS).join(", ")})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...bO(l.type,l.primaryKey,l.schema)};return i}function Pv(s){const{streamOptions:t,state:i,actions:r}=s,l=new Ln(t),o=new vO,u={};for(const[b,w]of Object.entries(i)){const E=Xd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:wO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:"size"in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Xv(N)?o.dispatchChange(N):Zv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log("[StreamDB] Successfully marked up-to-date")),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error("[StreamDB] Error processing batch:",N),console.error("[StreamDB] Failed batch:",T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener("abort",()=>{clearInterval(E),console.log("[StreamDB] Aborted - cleaning up health check")})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error("StreamDB closed")),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log("[StreamDB] Creating db object with collections:",Object.keys(u));const v={collections:u,...y};if(console.log("[StreamDB] db.collections:",Object.keys(v.collections)),console.log("[StreamDB] db.collections.events:",v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=gA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const ip=600,EO=ip/2*1e3,CO=3600*24,xO={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.roomId!="string"||t.roomId.length===0?{issues:[{message:"roomId must be a non-empty string"}]}:typeof t.name!="string"||t.name.length===0?{issues:[{message:"name must be a non-empty string"}]}:typeof t.boardSize!="string"?{issues:[{message:"boardSize must be a string"}]}:typeof t.createdAt!="number"?{issues:[{message:"createdAt must be a number"}]}:typeof t.expiresAt!="number"?{issues:[{message:"expiresAt must be a number"}]}:t.playerCount!==void 0&&typeof t.playerCount!="number"?{issues:[{message:"playerCount must be a number"}]}:{value:t}}}},Bh=Wv({rooms:{schema:xO,type:"stream",primaryKey:"roomId"}}),_O={"~standard":{version:1,vendor:"durable-streams",validate:s=>{const t=s;return typeof t.playerName!="string"||t.playerName.length===0?{issues:[{message:"playerName must be a non-empty string"}]}:typeof t.score!="number"?{issues:[{message:"score must be a number"}]}:typeof t.timestamp!="number"?{issues:[{message:"timestamp must be a number"}]}:{value:t}}}},OS=Wv({scores:{schema:_O,type:"stream",primaryKey:"playerName"}});function TO(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:Bh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Bh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Bh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const tw=W.createContext(null);function ew(){const s=W.useContext(tw);if(!s)throw new Error("useRegistryContext must be used within RegistryProvider");return s}function AO({children:s}){const{dsEndpoint:t,dsHeaders:i}=jd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:"application/json"}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:"application/json",ttlSeconds:CO}),o=await TO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error("[Registry] Failed to initialize:",g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f",color:"rgba(235,235,245,0.68)",fontSize:8},children:"LOADING..."}):r.error||!r.registryDB?Q.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:12,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},children:Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Registry Error: ",r.error?.message||"Failed to load"]})}):Q.jsx(tw.Provider,{value:{registryDB:r.registryDB},children:s})}const Lh=1;function OO(s,t=[]){const i=s&&typeof s=="object"&&typeof s.subscribeChanges=="function"&&typeof s.startSyncImmediate=="function"&&typeof s.id=="string",r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode==="on-demand"&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. - -Instead, use a query builder function: - const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) - -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s=="function"){const w=new Pt,E=s(w);if(E==null)r.current=null;else if(E instanceof Zd)E.startSyncImmediate(),r.current=E;else if(E instanceof Pt)r.current=Nh({query:s,startSync:!0,gcTime:Lh});else if(E&&typeof E=="object")r.current=Nh({startSync:!0,gcTime:Lh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Nh({startSync:!0,gcTime:Lh,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status==="ready"&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,R=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return R||(R=w.map(([,A])=>A)),T?R[0]:R},collection:y.collection,status:y.collection.status,isLoading:y.collection.status==="loading",isReady:y.collection.status==="ready",isIdle:y.collection.status==="idle",isError:y.collection.status==="error",isCleanedUp:y.collection.status==="cleaned-up",isEnabled:!0}}v.current=y}return b.current}const Jt={bg:"#1b1b1f",card:"#161618",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"},Ih=[{label:"30x25",cols:30,rows:25}];function Hh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=["neon","cyber","pixel","hyper","turbo","mega","ultra","nova"],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function RO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=ew(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(""),[,E]=W.useState(0);W.useEffect(()=>{const I=setInterval(()=>E(H=>H+1),1e3);return()=>clearInterval(I)},[]);const{data:T=[]}=OO(I=>I.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(I=>I.expiresAt>N)].sort((I,H)=>H.createdAt-I.createdAt),z=async()=>{if(!d){p(!0);try{const I=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,H=Ih[u],K=Hh(I,H),X=Date.now(),tt={roomId:K,name:I,boardSize:`${H.cols}x${H.rows}`,createdAt:X,expiresAt:X+ip*1e3};await r.actions.addRoom(tt),o(""),i(K)}catch(I){console.error("Failed to create room:",I)}finally{p(!1)}}};return Q.jsxs("div",{style:Oe.container,children:[Q.jsx("style",{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx("div",{style:Oe.title,children:"TERRITORY WARS"}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"NAME"}),Q.jsx("input",{style:Oe.input,value:s,onChange:I=>t(I.target.value),placeholder:"Enter your name...",maxLength:20})]}),Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOM"}),Q.jsx("input",{style:Oe.input,value:l,onChange:I=>o(I.target.value),placeholder:"room name",onKeyDown:I=>I.key==="Enter"&&z()}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?"STARTING...":"START"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!0),children:"JOIN"})]})]}),y&&Q.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(27,27,31,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},onClick:()=>v(!1),children:Q.jsxs("div",{style:{...Oe.card,marginBottom:0},onClick:I=>I.stopPropagation(),children:[Q.jsx("div",{style:Oe.cardTitle,children:"JOIN ROOM"}),Q.jsx("input",{style:Oe.input,value:b,onChange:I=>w(I.target.value),placeholder:"enter room name",autoFocus:!0,onKeyDown:I=>{if(I.key==="Enter"&&b.trim()){const H=A.find(K=>K.name===b.trim());i(H?H.roomId:Hh(b.trim(),Ih[u]))}}}),Q.jsxs("div",{style:{display:"flex",gap:6},children:[Q.jsx("button",{className:"lobby-btn",style:{...Oe.joinBtn,flex:1},onClick:()=>v(!1),children:"CANCEL"}),Q.jsx("button",{className:"lobby-btn",style:{...Oe.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const I=A.find(H=>H.name===b.trim());i(I?I.roomId:Hh(b.trim(),Ih[u]))}},children:"JOIN"})]})]})}),A.length>0&&Q.jsxs("div",{style:Oe.card,children:[Q.jsx("div",{style:Oe.cardTitle,children:"ROOMS"}),Q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:A.slice(g*3,g*3+3).map(I=>Q.jsx(MO,{room:I,onJoin:()=>i(I.roomId)},I.roomId))}),A.length>3&&Q.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:10},children:[Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(I=>I-1),children:"<"}),Q.jsxs("span",{style:{fontSize:7,color:Jt.dim,lineHeight:"24px"},children:[g+1,"/",Math.ceil(A.length/3)]}),Q.jsx("button",{className:"lobby-btn",style:{fontFamily:"inherit",fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:"pointer",width:28,padding:"4px 0",opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(I=>I+1),children:">"})]})]})]})}function MO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 12px",cursor:"pointer"},onClick:t,children:[Q.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},onClick:l,title:"Click to copy room name",children:Q.jsx("span",{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:"pointer"},children:i?"COPIED":s.name})}),Q.jsx("button",{className:"lobby-btn",style:{background:Jt.accent,color:"#000",border:"none",fontFamily:"inherit",fontSize:7,padding:"4px 12px",cursor:"pointer",letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:"JOIN"})]})}const Oe={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",fontFamily:"'Press Start 2P', monospace",background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:"100%",maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:"100%",background:Jt.bg,border:`1px solid ${Jt.border}`,padding:"8px 10px",color:Jt.text,fontFamily:"inherit",fontSize:8,marginBottom:10,outline:"none",boxSizing:"border-box"},createBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:Jt.accent,color:"#000",border:"none",cursor:"pointer",letterSpacing:2},joinBtn:{width:"100%",padding:"10px 0",fontSize:8,fontFamily:"inherit",background:"transparent",color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:"pointer",letterSpacing:2}},Fe=()=>new Map,xd=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},ms=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},kO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},UO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Ci=()=>new Set,qh=s=>s[s.length-1],zO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class NO{constructor(){this._observers=Fe()}on(t,i){ms(this._observers,t,Ci).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Zs((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const Rn=Math.floor,rc=Math.abs,iw=(s,t)=>ss>t?s:t,rw=s=>s!==0?s<0:1/s<0,DS=1,RS=2,Kh=4,Vh=8,rl=32,gs=64,an=128,Lc=31,_d=63,wi=127,BO=2147483647,vc=Number.MAX_SAFE_INTEGER,MS=Number.MIN_SAFE_INTEGER,LO=Number.isInteger||(s=>typeof s=="number"&&isFinite(s)&&Rn(s)===s),IO=String.fromCharCode,HO=s=>s.toLowerCase(),qO=/^\s*/g,KO=s=>s.replace(qO,""),VO=/([A-Z])/g,kS=(s,t)=>KO(s.replace(VO,i=>`${t}${HO(i)}`)),GO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lal.encode(s),YO=al?$O:GO;let tl=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});tl&&tl.decode(new Uint8Array).length===1&&(tl=null);const QO=(s,t)=>jO(t,()=>s).join("");class Sl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Vr=()=>new Sl,FO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(FO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Td=ve,Ot=(s,t)=>{for(;t>wi;)ve(s,an|wi&t),t=Rn(t/128);ve(s,wi&t)},ap=(s,t)=>{const i=rw(t);for(i&&(t=-t),ve(s,(t>_d?an:0)|(i?gs:0)|_d&t),t=Rn(t/64);t>0;)ve(s,(t>wi?an:0)|wi&t),t=Rn(t/128)},Ad=new Uint8Array(3e4),XO=Ad.length/3,ZO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ot(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=iw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Kr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{Ot(s,t.byteLength),Ic(s,t)},lp=(s,t)=>{JO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},PO=(s,t)=>lp(s,4).setFloat32(0,t,!1),tD=(s,t)=>lp(s,8).setFloat64(0,t,!1),eD=(s,t)=>lp(s,8).setBigInt64(0,t,!1),US=new DataView(new ArrayBuffer(4)),nD=s=>(US.setFloat32(0,s),US.getFloat32(0)===s),ll=(s,t)=>{switch(typeof t){case"string":ve(s,119),bi(s,t);break;case"number":LO(t)&&rc(t)<=BO?(ve(s,125),ap(s,t)):nD(t)?(ve(s,124),PO(s,t)):(ve(s,123),tD(s,t));break;case"bigint":ve(s,122),eD(s,t);break;case"object":if(t===null)ve(s,126);else if(Bc(t)){ve(s,117),Ot(s,t.length);for(let i=0;i0&&Ot(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const jS=s=>{s.count>0&&(ap(s.encoder,s.count===1?s.s:-s.s),s.count>1&&Ot(s.encoder,s.count-2))};class ac{constructor(){this.encoder=new Sl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(jS(this),this.count=1,this.s=t)}toUint8Array(){return jS(this),wn(this.encoder)}}const NS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);ap(s.encoder,t),s.count>1&&Ot(s.encoder,s.count-2)}};class Gh{constructor(){this.encoder=new Sl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(NS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}class sD{constructor(){this.sarr=[],this.s="",this.lensE=new ac}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Sl;return this.sarr.push(this.s),this.s="",bi(t,this.sarr.join("")),Ic(t,this.lensE.toUint8Array()),wn(t)}}const qn=s=>new Error(s),Dn=()=>{throw qn("Method unimplemented")},bn=()=>{throw qn("Unexpected case")},aw=qn("Unexpected end of array"),lw=qn("Integer out of Range");class Hc{constructor(t){this.arr=t,this.pos=0}}const Nr=s=>new Hc(s),Od=s=>s.pos!==s.arr.length,iD=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>iD(s,bt(s)),Br=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posvc)throw lw}throw aw},op=s=>{let t=s.arr[s.pos++],i=t&_d,r=64;const l=(t&gs)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.posvc)throw lw}throw aw},rD=s=>{let t=bt(s);if(t===0)return"";{let i=String.fromCodePoint(Br(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Br(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},aD=s=>tl.decode(je(s)),Ei=tl?aD:rD,cp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},lD=s=>cp(s,4).getFloat32(0,!1),oD=s=>cp(s,8).getFloat64(0,!1),cD=s=>cp(s,8).getBigInt64(0,!1),uD=[s=>{},s=>null,op,lD,oD,cD,s=>!1,s=>!0,Ei,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;ruD[127-Br(s)](s);class BS extends Hc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Od(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class lc extends Hc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=op(this);const t=rw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class $h extends Hc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=op(this),i=t&1;this.diff=Rn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class fD{constructor(t){this.decoder=new lc(t),this.str=Ei(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const hD=crypto.getRandomValues.bind(crypto),ow=()=>hD(new Uint32Array(1))[0],dD="10000000-1000-4000-8000"+-1e11,pD=()=>dD.replace(/[018]/g,s=>(s^ow()&15>>s/4).toString(16)),wc=Date.now,LS=s=>new Promise(s);Promise.all.bind(Promise);const IS=s=>s===void 0?null:s;class gD{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let cw=new gD,yD=!0;try{typeof localStorage<"u"&&localStorage&&(cw=localStorage,yD=!1)}catch{}const mD=cw,cl=Symbol("Equality"),uw=(s,t)=>s===t||s[cl]?.(t)||!1,SD=s=>typeof s=="object",vD=Object.assign,wD=Object.keys,bD=(s,t)=>{for(const i in s)t(s[i],i)},bc=s=>wD(s).length,ED=s=>{for(const t in s)return!1;return!0},vl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},up=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),CD=(s,t)=>s===t||bc(s)===bc(t)&&vl(s,(i,r)=>(i!==void 0||up(t,r))&&uw(t[r],i)),xD=Object.freeze,fw=s=>{for(const t in s){const i=s[t];(typeof i=="object"||typeof i=="function")&&fw(s[t])}return xD(s)},fp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[cl]!=null)return s[cl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var hw={};const ul=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Bn;const TD=()=>{if(Bn===void 0)if(ul){Bn=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split("=");Bn.set(`--${kS(t,"-")}`,i),Bn.set(`-${kS(t,"-")}`,i)}})):Bn=Fe();return Bn},Dd=s=>TD().has(s),Ec=s=>IS(ul?hw[s.toUpperCase().replaceAll("-","_")]:mD.getItem(s)),dw=s=>Dd("--"+s)||Ec(s)!==null,AD=dw("production"),OD=ul&&_D(hw.FORCE_COLOR,["true","1","2"]),DD=OD||!Dd("--no-colors")&&!dw("no-color")&&(!ul||process.stdout.isTTY)&&(!ul||Dd("--color")||Ec("COLORTERM")!==null||(Ec("TERM")||"").includes("color")),RD=s=>new Uint8Array(s),MD=s=>{const t=RD(s.byteLength);return t.set(s),t};class kD{constructor(t,i){this.left=t,this.right=i}}const us=(s,t)=>new kD(s,t),HS=s=>s.next()>=.5,Yh=(s,t,i)=>Rn(s.next()*(i+1-t)+t),pw=(s,t,i)=>Rn(s.next()*(i+1-t)+t),hp=(s,t,i)=>pw(s,t,i),UD=s=>IO(hp(s,97,122)),zD=(s,t=0,i=20)=>{const r=hp(s,t,i);let l="";for(let o=0;ot[hp(s,0,t.length-1)],jD=Symbol("0schema");class ND{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(QO(" ",(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:""}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Rd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[cl]?uw(s,t):Bc(s)?rp(s,i=>nw(t,r=>Rd(i,r))):SD(s)?vl(s,(i,r)=>Rd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Rd(i,r)}equals(t){return this.constructor===t.constructor&&Or(this.shape,t.shape)}[jD](){return!0}[cl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Dn()}get nullable(){return Gr(this,$c)}get optional(){return new mw(this)}cast(t){return qS(t,this),t}expect(t){return qS(t,this),t}}class dp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?"Constructor match failed":"Check failed"),r}}const fe=(s,t=null)=>new dp(s,t);fe(dp);class pp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,"custom prop",t?.constructor.name,"failed to check custom prop"),r}}const Ee=s=>new pp(s);fe(pp);class qc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(" | "),t.toString()),r}}const Kc=(...s)=>new qc(s),gw=fe(qc),BD=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>"\\"+t)),yw=s=>{if(Lr.check(s))return[BD(s)];if(gw.check(s))return s.shape.map(t=>t+"");if(Tw.check(s))return["[+-]?\\d+.?\\d*"];if(Aw.check(s))return[".*"];if(Cc.check(s))return s.shape.map(yw).flat(1);bn()};class LD extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp("^"+t.map(yw).map(i=>`(${i.join("|")})`).join("")+"$")}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),"String doesn't match string template."),r}}fe(LD);const ID=Symbol("optional");class mw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,"undefined (optional)","()"),r}get[ID](){return!0}}const HD=fe(mw);class qD extends Ie{check(t,i){return i?.extend(null,"never",typeof t),!1}}fe(qD);class Vc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Vc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,"object","null"),!1):vl(this.shape,(r,l)=>{const o=this._isPartial&&!up(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],"Object property does not match"),o})}}const KD=s=>new Vc(s),VD=fe(Vc),GD=Ee(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Sw extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&vl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+"","Record",typeof t,o?"Key doesn't match schema":"Value doesn't match value"),o&&this.shape.values.check(r,i)})}}const vw=(s,t)=>new Sw(s,t),$D=fe(Sw);class ww extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&vl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),"Tuple",typeof r),o})}}const YD=(...s)=>new ww(s);fe(ww);class bw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new gp(t)}check(t,i){const r=Bc(t)&&rp(t,l=>this.shape.check(l));return!r&&i?.extend(null,"Array",""),r}}const Ew=(...s)=>new bw(s),QD=fe(bw),FD=Ee(s=>Bc(s));class Cw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const JD=(s,t=null)=>new Cw(s,t);fe(Cw);const XD=JD(Ie);class ZD extends Ie{constructor(t){super(),this.len=t.length-1,this.args=YD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,"function",typeof t),r}}const WD=fe(ZD),PD=Ee(s=>typeof s=="function");class tR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=rp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,"Intersectinon",typeof t),r}}fe(tR,s=>s.shape.length>0);class gp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=nw(this.shape,l=>l.check(t,i));return i?.extend(null,"Union",typeof t),r}}const Gr=(...s)=>s.findIndex(t=>Cc.check(t))>=0?Gr(...s.map(t=>fl(t)).map(t=>Cc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new gp(s),Cc=fe(gp),xw=()=>!0,xc=Ee(xw),eR=fe(pp,s=>s.shape===xw),yp=Ee(s=>typeof s=="bigint"),nR=Ee(s=>s===yp),_w=Ee(s=>typeof s=="symbol");Ee(s=>s===_w);const Dr=Ee(s=>typeof s=="number"),Tw=Ee(s=>s===Dr),Lr=Ee(s=>typeof s=="string"),Aw=Ee(s=>s===Lr),Gc=Ee(s=>typeof s=="boolean"),sR=Ee(s=>s===Gc),Ow=Kc(void 0);fe(qc,s=>s.shape.length===1&&s.shape[0]===void 0);Kc(void 0);const $c=Kc(null),iR=fe(qc,s=>s.shape.length===1&&s.shape[0]===null);fe(Uint8Array);fe(dp,s=>s.shape===Uint8Array);const rR=Gr(Dr,Lr,$c,Ow,yp,Gc,_w);(()=>{const s=Ew(xc),t=vw(Lr,xc),i=Gr(Dr,Lr,$c,Gc,s,t);return s.shape=i,t.shape.values=i,i})();const fl=s=>{if(XD.check(s))return s;if(GD.check(s)){const t={};for(const i in s)t[i]=fl(s[i]);return KD(t)}else{if(FD.check(s))return Gr(...s.map(fl));if(rR.check(s))return Kc(s);if(PD.check(s))return fe(s)}bn()},qS=AD?()=>{}:(s,t)=>{const i=new ND;if(!t.check(s,i))throw qn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class aR{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:fl(t),h:i}),this}else(t){return this.if(xc,t)}done(){return(t,i)=>{for(let r=0;rnew aR(s),Dw=lR(xc).if(Tw,(s,t)=>Yh(t,MS,vc)).if(Aw,(s,t)=>zD(t)).if(sR,(s,t)=>HS(t)).if(nR,(s,t)=>BigInt(Yh(t,MS,vc))).if(Cc,(s,t)=>vr(t,Qh(t,s.shape))).if(VD,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(HD.check(l)){if(HS(t))continue;l=l.shape}i[r]=Dw(l,t)}return i}).if(QD,(s,t)=>{const i=[],r=pw(t,0,42);for(let l=0;lQh(t,s.shape)).if(iR,(s,t)=>null).if(WD,(s,t)=>{const i=vr(t,s.res);return()=>i}).if(eR,(s,t)=>vr(t,Qh(t,[Dr,Lr,$c,Ow,yp,Gc,Ew(Dr),vw(Gr("a","b","c"),Dr)]))).if($D,(s,t)=>{const i={},r=Yh(t,0,3);for(let l=0;lDw(fl(t),s),Yc=typeof document<"u"?document:{};Ee(s=>s.nodeType===hR);typeof DOMParser<"u"&&new DOMParser;Ee(s=>s.nodeType===cR);Ee(s=>s.nodeType===uR);const oR=s=>kO(s,(t,i)=>`${i}:${t};`).join(""),cR=Yc.ELEMENT_NODE,uR=Yc.TEXT_NODE,fR=Yc.DOCUMENT_NODE,hR=Yc.DOCUMENT_FRAGMENT_NODE;Ee(s=>s.nodeType===fR);const Ss=Symbol,Rw=Ss(),Mw=Ss(),dR=Ss(),pR=Ss(),gR=Ss(),kw=Ss(),yR=Ss(),mp=Ss(),mR=Ss(),SR=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(""));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push("%c"+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join("")));o{console.log(...Uw(s)),zw.forEach(t=>t.print(s))},ER=(...s)=>{console.warn(...Uw(s)),s.unshift(mp),zw.forEach(t=>t.print(s))},zw=Ci(),jw=s=>({[Symbol.iterator](){return this},next:s}),CR=(s,t)=>jw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Fh=(s,t)=>jw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Nw{constructor(t,i){this.clock=t,this.len=i}}class Qc{constructor(){this.clients=new Map}}const Bw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=Rn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&xR(i,t.clock)!==null},Sp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Kr(l.len,o.clock+o.len-l.clock):(r{const t=new Qc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ms(s.clients,t,()=>[]).push(new Nw(i,r))},vp=(s,t)=>{Ot(s.restEncoder,t.clients.size),Zs(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),Ot(s.restEncoder,i);const l=r.length;Ot(s.restEncoder,l);for(let o=0;o{const t=new Qc,i=bt(s.restDecoder);for(let r=0;r0){const u=ms(t.clients,l,()=>[]);for(let d=0;d{const r=new Qc,l=bt(s.restDecoder);for(let o=0;o0){const o=new Fc;return Ot(o.restEncoder,0),vp(o,r),o.toUint8Array()}return null},Iw=ow;class $r extends sw{constructor({guid:t=pD(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=Iw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Vw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=LS(g=>{this.on("load",()=>{this.isLoaded=!0,g(this)})});const p=()=>LS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off("sync",m),g())};this.on("sync",m)});this.on("sync",g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Zs(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=De){const r=ms(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==De&&l!==i)if(l===De){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,Mr)}getText(t=""){return this.get(t,Hr)}getMap(t=""){return this.get(t,Ir)}getXmlElement(t=""){return this.get(t,qr)}getXmlFragment(t=""){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Zs(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new $r({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class AR{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class OR extends AR{readLeftID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Mt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Br(this.restDecoder)}readString(){return Ei(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ol(this.restDecoder)}readBuf(){return MD(je(this.restDecoder))}readJSON(){return JSON.parse(Ei(this.restDecoder))}readKey(){return Ei(this.restDecoder)}}class DR{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Tc extends DR{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new $h(je(t)),this.clientDecoder=new lc(je(t)),this.leftClockDecoder=new $h(je(t)),this.rightClockDecoder=new $h(je(t)),this.infoDecoder=new BS(je(t),Br),this.stringDecoder=new fD(je(t)),this.parentInfoDecoder=new BS(je(t),Br),this.typeRefDecoder=new lc(je(t)),this.lenDecoder=new lc(je(t))}readLeftID(){return new Rr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Rr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ol(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ol(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Kr(r,t[0].id.clock);const l=Kn(t,r);Ot(s.restEncoder,t.length-l),s.writeClient(i),Ot(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{we(t,o)>l&&r.set(o,l)}),wp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Ot(s.restEncoder,r.size),Zs(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{UR(s,t.clients.get(l),l,o)})},zR=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let l=0;l{const r=[];let l=Zs(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Vw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==An){const w=ms(y,m.id.client,()=>we(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,we(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Fc;return Hw(b,d,new Map),Ot(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},NR=(s,t)=>Hw(s,t.doc.store,t.beforeState),BR=(s,t,i,r=new Tc(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=zR(r,u),g=jR(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=XS([m.update,g.update])}}else d.pendingStructs=g;const y=KS(r,l,d);if(d.pendingDs){const v=new Tc(Nr(d.pendingDs));bt(v.restDecoder);const b=KS(v,l,d);y&&b?d.pendingDs=XS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,qw(l.doc,v)}},i,!1),qw=(s,t,i,r=Tc)=>{const l=Nr(t);BR(l,s,i,new r(l))},VS=(s,t,i)=>qw(s,t,i,OR);class LR{constructor(){this.l=[]}}const GS=()=>new LR,$S=(s,t)=>s.l.push(t),YS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Kw=(s,t,i)=>fp(s.l,[t,i]);class Rr{constructor(t,i){this.client=t,this.clock=i}}const Fo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Mt=(s,t)=>new Rr(s,t),IR=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Er=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Lw(t.ds,s.id),Md=(s,t)=>{const i=ms(s.meta,Md,Ci),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class Vw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const wp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},we=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Gw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=Rn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Kn(i,t.clock)]},Jh=HR,kd=(s,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[kd(s,i,t.clock)]},QS=(s,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,kc(s,o,i.clock-o.id.clock+1)),o},qR=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},$w=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=kd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!UO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Sp(t.deleteSet),NR(s,t),vp(s,t.deleteSet),!0),JS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&ms(s.changed,t,Ci).add(i)},oc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof pe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},VR=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=iw(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+oc(l,p)}})},Yw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Kw(g._dEH,p,i))})}),d.push(()=>r.emit("afterTransaction",[i,r])),fp(d,[]),i._needFormattingCleanup&&cM(i)}finally{r.gc&&VR(o,l,r.gcFilter),GR(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Kr(Kn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+oc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Kn(b,v);w+11||w>0&&oc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(bR(mp,Rw,"[yjs] ",Mw,kw,"Changed the client-id because another client seems to be using it."),r.clientID=Iw()),r.emit("afterTransactionCleanup",[i,r]),r._observers.has("update")){const m=new MR;FS(m,i)&&r.emit("update",[m.toUint8Array(),i.origin,r,i])}if(r._observers.has("updateV2")){const m=new Fc;FS(m,i)&&r.emit("updateV2",[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit("subdocs",[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,s])):Yw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new KR(s,i,r),l.push(s._transaction),l.length===1&&s.emit("beforeAllTransactions",[s]),s.emit("beforeTransaction",[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Yw(l,0)}}return u};function*$R(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Mt(i,r+t),s.length-t)}else if(s.constructor===An){const{client:i,clock:r}=s.id;return new An(Mt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new pe(Mt(r,l+t),null,Mt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},XS=(s,t=Tc,i=Fc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Nr(m)));let l=r.map(m=>new YR(m,!0)),o=null;const u=new i,d=new QR(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===An?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===An?o.struct.length-=w:v=FR(v,w)),o.struct.mergeWith(v)||(Va(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==An;v=m.next())Va(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Va(d,o.struct,o.offset),o=null),JR(d);const p=r.map(m=>TR(m)),g=_R(p);return vp(u,g),u.toUint8Array()},Qw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Vr(),s.written=0)},Va=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Qw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),Ot(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},JR=s=>{Qw(s);const t=s.encoder.restEncoder;Ot(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u="delete",d=qh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u="update",d=qh(p.content.getContent())):(u="add",d=void 0)}else if(this.deletes(o))u="delete",d=qh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(ZS);const i=this.target,r=Ci(),l=Ci(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const XR=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{ER("Invalid access: Add Yjs type to a document before reading data.")},Fw=80;let bp=0;class ZR{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=bp++}}const WR=s=>{s.timestamp=bp++},Jw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=bp++},PR=(s,t,i)=>{if(s.length>=Fw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>rc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&rc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Kr(t,l.index+i))}},Zc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;ms(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Kw(r._eH,i,t)};class De{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GS(),this._dEH=GS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Dn()}clone(){throw Dn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){$S(this._eH,t)}observeDeep(t){$S(this._dEH,t)}unobserve(t){YS(this._eH,t)}unobserveDeep(t){YS(this._dEH,t)}toJSON(){}}const Xw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Zw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return dl(s,(r,l)=>{i.push(t(r,l,s))}),i},tM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Pw=(s,t)=>{s.doc??ke();const i=Xc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new wl(new Uint8Array(y))),l.integrate(s,0);break;case $r:l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bl(y)),l.integrate(s,0);break;default:if(y instanceof De)l=new pe(Mt(u,we(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new vs(y)),l.integrate(s,0);else throw new Error("Unexpected content type in insert operation")}}}),m()},tb=()=>qn("Length exceeded!"),eb=(s,t,i,r)=>{if(i>t._length)throw tb();if(i===0)return t._searchMarker&&hl(t._searchMarker,i,r.length),Ac(s,t,null,r);const l=i,o=Xc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Ac(s,t,l,i)},nb=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Xc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw tb();t._searchMarker&&hl(t._searchMarker,l,-o+r)},Oc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Ep=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new wl(r);break;case $r:d=new bl(r);break;default:if(r instanceof De)d=new vs(r);else throw new Error("Unexpected content type")}new pe(Mt(u,we(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},Cp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},sb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ib=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},nM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Jo=s=>(s.doc??ke(),CR(s._map.entries(),t=>!t[1].deleted));class sM extends Jc{}class Mr extends De{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Zc(this,t,new sM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{eM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Pw(this,t)}toArray(){return Zw(this)}slice(t=0,i=this.length){return Xw(this,t,i)}toJSON(){return this.map(t=>t instanceof De?t.toJSON():t)}map(t){return Ww(this,t)}forEach(t){dl(this,t)}[Symbol.iterator](){return tM(this)}_write(t){t.writeTypeRef(OM)}}const iM=s=>new Mr;class rM extends Jc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Ir extends De{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Ir}clone(){const t=new Ir;return this.forEach((i,r)=>{t.set(r,i instanceof De?i.clone():i)}),t}_callObserver(t,i){Zc(this,t,new rM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof De?l.toJSON():l}}),t}get size(){return[...Jo(this)].length}keys(){return Fh(Jo(this),t=>t[0])}values(){return Fh(Jo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Fh(Jo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Cp(this,t)}has(t){return ib(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Oc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const aM=s=>new Ir,Fs=(s,t)=>s===t||typeof s=="object"&&typeof t=="object"&&s&&t&&CD(s,t);class Ud{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case ge:this.right.deleted||Yr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const WS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case ge:t.right.deleted||Yr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Xc(t,i):null;if(o){const u=new Ud(o.p.left,o.p,o.index,l);return WS(s,u,i-o.index)}else{const u=new Ud(null,t._start,0,l);return WS(s,u,i)}},rb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===ge&&Fs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new pe(Mt(o,we(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new ge(d,u));m.integrate(s,0),i.right=m,i.forward()})},Yr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ab=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===ge&&Fs(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},lb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Fs(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new pe(Mt(o,we(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new ge(d,p)),i.right.integrate(s,0),i.forward()}}return u},Xh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l),p=r.constructor===String?new Vn(r):r instanceof De?new vs(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&hl(t._searchMarker,i.index,p.getLength()),m=new pe(Mt(u,we(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),rb(s,t,i,d)},PS=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ab(i,l);const d=lb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===ge));){if(!i.right.deleted)switch(i.right.content.constructor){case ge:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Fs(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p="";for(;r>0;r--)p+=` -`;i.right=new pe(Mt(u,we(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(s,0),i.forward()}rb(s,t,i,d)},ob=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===ge){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case ge:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Yr(l,g);break}}}t=t.right}return d},lM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===ge){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},oM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=xd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case ge:Yr(u,l.content);break;default:t+=ob(i,r,l,o,u),o=xd(u),r=l;break}l=l.right}}),t},cM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&$w(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===ge&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Bw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===ge?t.add(o):lM(r,l)});for(const l of t)oM(l)})},tv=(s,t,i)=>{const r=i,l=xd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case vs:case ki:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g="",m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case"delete":y>0&&(b={delete:y}),y=0;break;case"insert":(typeof g=="object"||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g="";break;case"retain":m>0&&(b={retain:m},ED(p)||(b.attributes=vD({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case vs:case ki:this.adds(u)?this.deletes(u)||(v(),d="insert",g=u.content.getContent()[0],v()):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=1):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!=="insert"&&(v(),d="insert"),g+=u.content.str):this.deletes(u)?(d!=="delete"&&(v(),d="delete"),y+=u.length):u.deleted||(d!=="retain"&&(v(),d="retain"),m+=u.length);break;case ge:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Fs(E,w)?w!==null&&u.delete(r):(d==="retain"&&v(),Fs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Fs(E,w)||(d==="retain"&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Fs(E,w)?E!==null&&u.delete(r):(d==="retain"&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d==="insert"&&v(),Yr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Hr extends De{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Hr}clone(){const t=new Hr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new uM(this,t,i);Zc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t="",i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new Ud(null,this._start,0,new Map);for(let o=0;o0)&&Xh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?PS(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&tv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d="",p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=""}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Vn:{const y=o.get("ychange");t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!=="removed")&&(g(),o.set("ychange",r?r("removed",p.id):{type:"removed"})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!=="added")&&(g(),o.set("ychange",r?r("added",p.id):{type:"added"})):y!==void 0&&(g(),o.delete("ychange")),d+=p.content.str;break}case vs:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case ge:Er(p,t)&&(g(),Yr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&Md(y,t),i&&Md(y,i),m()},"cleanup"):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Xh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!r);Xh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{tv(l,Xo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Xo(o,this,t,!1);u.right!==null&&PS(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Cp(this,t)}getAttributes(){return sb(this)}_write(t){t.writeTypeRef(RM)}}const fM=s=>new Hr;class Zh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===qr||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends De{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof De?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Zh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Zh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Zs(new Zh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Zc(this,t,new pM(this,i,t))}toString(){return Ww(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),dl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{eb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof De?t._item:t;Ac(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn("Reference item not found");r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{nb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Zw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Pw(this,t)}slice(t=0,i=this.length){return Xw(this,t,i)}forEach(t){dl(this,t)}_write(t){t.writeTypeRef(kM)}}const hM=s=>new xi;class qr extends xi{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new qr(this.nodeName)}clone(){const t=new qr(this.nodeName),i=this.getAttributes();return bD(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof De?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?" "+i.join(" "):"";return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Oc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Ep(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Cp(this,t)}hasAttribute(t){return ib(this,t)}getAttributes(t){return t?nM(this,t):sb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d=="string"&&l.setAttribute(u,d)}return dl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(MM),t.writeKey(this.nodeName)}}const dM=s=>new qr(s.readKey());class pM extends Jc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Ir{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(UM),t.writeKey(this.hookName)}}const gM=s=>new Dc(s.readKey());class Rc extends Hr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Rc}clone(){const t=new Rc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName=0;l--)r+=``;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(zM)}}const yM=s=>new Rc;class xp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Dn()}mergeWith(t){return!1}write(t,i,r){throw Dn()}integrate(t,i){throw Dn()}}const mM=0;class vn extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Gw(t.doc.store,this)}write(t,i){t.writeInfo(mM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class wl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new wl(this.content)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const SM=s=>new wl(s.readBuf());class pl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new pl(this.len)}splice(t){const i=new pl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){_c(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const vM=s=>new pl(s.readLen()),cb=(s,t)=>new $r({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class bl{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new bl(cb(this.doc.guid,this.opts))}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const wM=s=>new bl(cb(s.readString(),s.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const bM=s=>new ki(s.readJSON());class ge{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new ge(this.key,this.value)}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const EM=s=>new ge(s.readKey(),s.readJSON());class Mc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Mc(this.arr)}splice(t){const i=new Mc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"�",i.str="�"+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const TM=s=>new Vn(s.readString()),AM=[iM,aM,fM,dM,hM,gM,yM],OM=0,DM=1,RM=2,MM=3,kM=4,UM=5,zM=6;class vs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new vs(this.type._copy())}splice(t){throw Dn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const jM=s=>new vs(AM[s.readTypeRef()](s)),kc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new pe(Mt(r,l+i),t,Mt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Mt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class pe extends xp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?RS:0}set marker(t){(this.info&Vh)>0!==t&&(this.info^=Vh)}get marker(){return(this.info&Vh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&RS)>0}get deleted(){return(this.info&Kh)>0}set deleted(t){this.deleted!==t&&(this.info^=Kh)}markDeleted(){this.info|=Kh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=we(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=we(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Rr&&this.id.client!==this.parent.client&&this.parent.clock>=we(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=QS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===pe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===pe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Rr){const r=Jh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=QS(t,t.doc.store,Mt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Fo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),_c(t.deleteSet,this.id.client,this.id.clock,this.length),JS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?qR(t,this,new vn(this.id,this.length)):this.content=new pl(this.length)}write(t,i){const r=i>0?Mt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Lc|(r===null?0:an)|(l===null?0:gs)|(o===null?0:rl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=IR(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Rr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const ub=(s,t)=>NM[t&Lc](s),NM=[()=>{bn()},vM,CM,SM,TM,bM,EM,jM,_M,wM,()=>{bn()}],BM=10;class An extends xp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(BM),Ot(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},hb="__ $YJS$ __";fb[hb]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");fb[hb]=!0;const Wh=3e4;class LM extends NO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=wc();this.getLocalState()!==null&&Wh/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Wh<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&IM(this,r,"timeout")},Rn(Wh/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:wc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Or(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit("change",[{added:u,updated:p,removed:g},"local"]),this.emit("update",[{added:u,updated:d,removed:g},"local"])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const IM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit("change",[{added:[],updated:[],removed:r},i]),s.emit("update",[{added:[],updated:[],removed:r},i]))},ev=(s,t,i=s.states)=>{const r=t.length,l=Vr();Ot(l,r);for(let o=0;o{const r=Nr(t),l=wc(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit("change",[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit("update",[{added:o,updated:u,removed:p},i])},qM={disconnected:["connecting"],connecting:["connected","disconnected"],connected:["disconnected"]},KM=15e3;var VM=class cc extends sw{doc;awareness;baseUrl;docId;headers;liveMode;_state="disconnected";_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,""),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??"sse",this.doc.on("update",this.handleDocumentUpdate),this.awareness&&this.awareness.on("update",this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit("synced",[t]))}get connected(){return this._state==="connected"}get connecting(){return this._state==="connecting"}transition(t){return qM[this._state].includes(t)?(this._state=t,this.emit("status",[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:"-1",producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!=="disconnected"||!this.transition("connecting"))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name==="AbortError")&&!this.isStale(t)&&(this.emit("error",[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state==="disconnected"||(this.transition("disconnected"),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off("update",this.handleDocumentUpdate),this.awareness&&this.awareness.off("update",this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t="default"){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:"PUT",headers:{...this.headers,"content-type":"application/octet-stream"},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>"");throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:"GET",headers:this.headers,redirect:"manual",signal:t.controller.signal});if(r.status===307){const l=r.headers.get("location");if(l){const u=new URL(l,i).searchParams.get("offset");if(u){u.endsWith("_snapshot")?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset="-1"}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:"GET",headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&VS(this.doc,o,"server");const u=l.headers.get("stream-next-offset");t.startOffset=u??"-1"}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new pv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name==="AbortError"||(console.error("[YjsProvider] Producer error:",l),this.emit("error",[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state==="connecting"&&this.transition("connected"),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit("error",[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Vr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Nr(t);for(;Od(i);){const r=je(i);VS(this.doc,r,"server")}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Nr(t);for(;Od(i);){const r=je(i);try{HM(this.awareness,r,"server")}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i==="server")return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(cc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},KM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i==="server"||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(t),{contentType:"application/octet-stream"}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"}).append(cc.frameUpdate(u),{contentType:"application/octet-stream"})}}catch(t){console.error("[YjsProvider] Failed to send awareness:",t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:"application/octet-stream"});try{const l=await r.stream({offset:"now",live:"sse",signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error("[YjsProvider] Awareness stream not found");return}console.error("[YjsProvider] Awareness stream error:",l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof te&&t.code==="NOT_FOUND"||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof te&&(t.code==="UNAUTHORIZED"||t.code==="FORBIDDEN")||t instanceof Js&&(t.status===401||t.status===403)}};const db=W.createContext(null);function GM(){const s=W.useContext(db);if(!s)throw new Error("useGameRoom must be used within GameRoom");return s}function $M(s,t){return Pv({streamOptions:{url:s,headers:t,contentType:"application/json"},state:OS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(OS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nv=W.createContext(null);function YM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=jd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Ln({url:v,headers:r,contentType:"application/json"}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:"application/json"}),p=await $M(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error("[Scores] Failed to initialize:",v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn("[Scores] Error loading scores:",u.message),l?Q.jsx(nv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(nv.Provider,{value:null,children:t})}const Yt=14,QM=30,FM=25,JM=120,XM=1500,Zo=.5,ZM=1,Ga=8,sv=14,Ft={bg:"#1b1b1f",grid:"#202127",gridLine:"#2e2e32",border:"#2e2e32",text:"rgba(235,235,245,0.68)",accent:"#d0bcff",dim:"rgba(235,235,245,0.38)"};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:QM,rows:FM}}const wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function uc(s){return s.getMap("territoryCell")}function Si(s){return s.getMap("players")}function Ph(s,t){const i=Si(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=uc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[R,A]=W.useState(!1),[z,I]=W.useState(!1),[H,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,""),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),xt=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P="";if(Kt.forEach((wt,Dt)=>{wt>et&&(et=wt,P=Dt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const dt=v.get(P);return dt?{name:dt.name,pct:pt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Si(t);pt.set(l,{x:et,y:P,name:o,color:u});const dt=uc(t);return t.transact(()=>{dt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{pt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=uc(t),P=()=>{const pt=PM(t);y(pt);const dt=new Map;pt.forEach(Dt=>{dt.set(Dt.owner,(dt.get(Dt.owner)||0)+1)});const wt=Zo*g;dt.forEach((Dt,ee)=>{if(Dt>=wt){const Ue=Si(t).get(ee);Ue?K(Ue.name):ee===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Si(t),P=()=>{b(Ph(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((wt,Dt)=>{if(Dt!==i.clientID){wt.playerId&&P.add(wt.playerId);const ee=wt.user?.name;ee&&pt.add(ee)}}),N(wt=>{const Dt=pt.size;return wt===Dt?wt:Dt});const dt=Si(t);dt.forEach((wt,Dt)=>{Dt!==l&&!P.has(Dt)&&dt.delete(Dt)})};return i.on("change",et),et(),()=>i.off("change",et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=dt=>{if(dt.key in wr){dt.preventDefault();const wt=!J.current;et.add(dt.key),J.current=wr[dt.key],wt&&L.current?.(wr[dt.key])}},pt=dt=>{if(et.delete(dt.key),dt.key in wr){let wt=!1;for(const Dt of et)if(Dt in wr){J.current=wr[Dt],wt=!0;break}wt||(J.current=null)}};return window.addEventListener("keydown",P),window.addEventListener("keyup",pt),()=>{window.removeEventListener("keydown",P),window.removeEventListener("keyup",pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=10,at=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY};const pt=M.current;if(!pt)return;const dt=pt.createSVGPoint();dt.x=P.clientX,dt.y=P.clientY;const wt=pt.getScreenCTM();if(!wt)return;const Dt=dt.matrixTransform(wt.inverse()),ee=Dt.x/Yt-.5,$n=Dt.y/Yt-.5,Ue=nt.current,ln=ee-Ue.x,Cn=$n-Ue.y;ln===0&&Cn===0||(Math.abs(ln)>Math.abs(Cn)?L.current?.({dx:ln>0?1:-1,dy:0}):L.current?.({dx:0,dy:Cn>0?1:-1}))},[]),ft=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,dt=P.clientY-q.current.y;Math.abs(pt)Math.abs(dt)?L.current?.({dx:pt>0?1:-1,dy:0}):L.current?.({dx:0,dy:dt>0?1:-1}),q.current={x:P.clientX,y:P.clientY})},[]),_=W.useCallback(()=>{q.current=null},[]),L=W.useRef(void 0),Y=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const dt=P.getScreenCTM();if(!dt)return;const wt=pt.matrixTransform(dt.inverse()),Dt=wt.x/Yt-.5,ee=wt.y/Yt-.5,$n=nt.current,Ue=Dt-$n.x,ln=ee-$n.y;Ue===0&&ln===0||(Math.abs(Ue)>Math.abs(ln)?L.current?.({dx:Ue>0?1:-1,dy:0}):L.current?.({dx:0,dy:ln>0?1:-1}))},[]),F=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const dt=nt.current,wt=Date.now();if(dt.stunnedUntil&&wtXt.x===Dt&&Xt.y===ee);if(Ue){const[Xt,Qr]=Ue,zi=wt+XM;dt.stunnedUntil=zi;const Fr=Si(t);Fr.set(Xt,{...Qr,stunnedUntil:zi}),Fr.set(l,{x:dt.x,y:dt.y,name:o,color:u,stunnedUntil:zi});return}dt.x=Dt,dt.y=ee,E({x:Dt,y:ee}),i.setLocalState({...i.getLocalState(),x:Dt,y:ee}),Si(t).set(l,{x:Dt,y:ee,name:o,color:u});const Cn=uc(t),Ui=Date.now();t.transact(()=>{Cn.set(`${Dt},${ee}`,{owner:l,claimedAt:Ui})});const El=new Set([l]);Ph(t,l).forEach((Xt,Qr)=>El.add(Qr));const Cl=e2(l,Cn,d,p,El);Cl.length>0&&t.transact(()=>{for(const Xt of Cl)Cn.set(`${Xt.x},${Xt.y}`,{owner:l,claimedAt:Ui})})};L.current=et;const P=setInterval(()=>{const pt=J.current;pt&&et(pt)},JM);return()=>clearInterval(P)},[t,l,o,u,d,p]);const lt=d*Yt,it=p*Yt,St=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const zt=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx("line",{x1:P*Yt,y1:0,x2:P*Yt,y2:it,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx("line",{x1:0,y1:P*Yt,x2:lt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,lt,it]),vt=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[l,u,v]);return Q.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"'Press Start 2P', monospace",background:Ft.bg,color:Ft.text,minHeight:"100dvh",maxHeight:"100dvh",padding:8,boxSizing:"border-box",overflow:"hidden",touchAction:"none"},children:[Q.jsx("style",{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } - .live-dot { animation: blink 1.5s ease-in-out infinite; } - @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } - .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),Q.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsx("button",{onClick:F,style:{background:"none",border:"none",color:Ft.accent,fontFamily:"inherit",fontSize:Ga,padding:"4px 0",cursor:"pointer"},children:"EXIT"}),Q.jsxs("div",{style:{display:"flex",gap:6,cursor:"pointer"},onClick:St,title:"Click to copy room name",children:[Q.jsx("span",{style:{color:Ft.accent},children:o}),Q.jsx("span",{style:{color:Ft.dim},children:"@"}),Q.jsx("span",{style:{color:R?Ft.accent:Ft.text,textDecoration:"underline",textUnderlineOffset:3},children:R?"COPIED":X})]}),Q.jsxs("div",{style:{color:Ft.accent,position:"relative",cursor:"pointer"},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),onClick:()=>I(et=>!et),children:[T," PLAYERS",z&&Q.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,padding:"3px 0"},children:[Q.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[Q.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:et.color,display:"inline-block"}}),et.name]}),Q.jsxs("span",{style:{color:Ft.accent},children:[pt,"%"]})]},et.id)})})]})]}),Q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%",maxWidth:lt,marginBottom:8,fontSize:Ga},children:[Q.jsxs("div",{children:[Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[xt,"%"]})," ",Q.jsx("span",{style:{color:Ft.dim},children:"TERRITORY"})]}),Q.jsxs("div",{style:{textAlign:"right"},children:[Q.jsxs("div",{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Zo*100)-5?"#FF3D71":Ft.dim},children:["WIN AT ",Math.round(Zo*100),"%"]}),ht&&Q.jsxs("div",{children:[Q.jsx("span",{style:{color:Ft.dim},children:ht.name})," ",Q.jsxs("span",{style:{fontSize:sv,color:Ft.accent},children:[ht.pct,"%"]})]})]})]}),Q.jsxs("svg",{ref:M,viewBox:`0 0 ${lt} ${it}`,onTouchStart:at,onTouchMove:ft,onTouchEnd:_,onClick:Y,style:{width:"100%",maxWidth:lt,height:"auto",background:Ft.grid,border:`1px solid ${Ft.border}`,flex:"1 1 auto",minHeight:0,maxHeight:"calc(100dvh - 120px)",objectFit:"contain",userSelect:"none",WebkitUserSelect:"none"},children:[zt,Array.from(m.entries()).map(([et,P])=>{const[pt,dt]=et.split(",").map(Number),wt=vt.get(P.owner)||Ft.accent;return Q.jsx("rect",{x:pt*Yt,y:dt*Yt,width:Yt,height:Yt,fill:wt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const R=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:R,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const R=new $r,A=new LM(R);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:R,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const R=new VM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return R.on("synced",A=>{b(A),A&&y(!1)}),R.on("status",A=>{A==="connected"&&y(!1)}),R.on("error",A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=R,R.connect(),()=>{R.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const H=o.collections.rooms.toArray.find(K=>K.roomId===s);if(H)try{o.actions.addRoom({...H,expiresAt:Date.now()+ip*1e3})}catch{}},EO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs("div",{style:td.center,children:[Q.jsxs("div",{style:{color:"#FF3D71",fontSize:8},children:["Connection error: ",w.message]}),Q.jsx("button",{onClick:l,style:td.btn,children:"BACK"})]}):m?Q.jsxs("div",{style:td.center,children:[Q.jsx("style",{children:"@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');"}),Q.jsx("div",{style:{color:"#d0bcff",fontSize:8},children:"CONNECTING..."})]}):Q.jsx(db.Provider,{value:N,children:Q.jsx(YM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const td={center:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:16,fontFamily:"'Press Start 2P', monospace",background:"#1b1b1f"},btn:{fontFamily:"inherit",fontSize:8,padding:"8px 24px",background:"#d0bcff",color:"#000",border:"none",cursor:"pointer"}},rv=["Swift","Bold","Sly","Keen","Cool","Neon","Rad","Zen"],av=["Fox","Wolf","Hawk","Bear","Lynx","Crow","Stag","Hare"];function a2(){const s=rv[Math.floor(Math.random()*rv.length)],t=av[Math.floor(Math.random()*av.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem("territory-player-name");if(s)return s;const t=a2();return localStorage.setItem("territory-player-name",t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=jd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem("territory-player-name",u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=""}}):Q.jsx(RO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(W1,{children:Q.jsx(AO,{children:Q.jsx(c2,{})})})}V1.createRoot(document.getElementById("root")).render(Q.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/assets/index-BoLuCJpH.js b/website/public/demos/territory-wars/assets/index-BoLuCJpH.js new file mode 100644 index 0000000000..4304862d57 --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-BoLuCJpH.js @@ -0,0 +1,42 @@ +(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var hh={exports:{}},Va={};var C0;function j1(){if(C0)return Va;C0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var x0;function N1(){return x0||(x0=1,hh.exports=j1()),hh.exports}var F=N1(),dh={exports:{}},Ga={},ph={exports:{}},gh={};var _0;function B1(){return _0||(_0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ut=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],Q=H+1,ot=M[Q];if(0>l(Y,Z))Ql(ot,Y)?(M[at]=ot,M[Q]=Z,at=Q):(M[at]=Y,M[H]=Z,at=H);else if(Ql(ot,Z))M[at]=ot,M[Q]=Z,at=Q;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,nt());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at==`function`){y.callback=null,v=y.priorityLevel;var ut=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ut==`function`){y.callback=ut,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?nt():I=!1}}}var nt;if(typeof A==`function`)nt=function(){A(et)};else if(typeof MessageChannel<`u`){var Ct=new MessageChannel,Kt=Ct.port2;Ct.port1.onmessage=et,nt=function(){Kt.postMessage(null)}}else nt=function(){N(et,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-at))):(M.sortIndex=ut,t(p,M),w||b||(w=!0,I||(I=!0,nt()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var T0;function L1(){return T0||(T0=1,ph.exports=B1()),ph.exports}var yh={exports:{}},yt={};var A0;function I1(){if(A0)return yt;A0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var Q=Y.ref;return{$$typeof:s,type:_,key:H,ref:Q!==void 0?Q:null,props:Y}}function J(_,H){return tt(_.type,H,_.props)}function et(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function nt(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var Ct=/\/+/g;function Kt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?nt(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,Q,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var gt=!1;if(_===null)gt=!0;else switch(it){case`bigint`:case`string`:case`number`:gt=!0;break;case`object`:switch(_.$$typeof){case s:case t:gt=!0;break;case m:return gt=_._init,M(gt(_._payload),H,Y,Q,ot)}}if(gt)return ot=ot(_),gt=Q===``?`.`+Kt(_,0):Q,L(ot)?(Y=``,gt!=null&&(Y=gt.replace(Ct,`$&/`)+`/`),M(ot,H,Y,``,function(ln){return ln})):ot!=null&&(et(ot)&&(ot=J(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(Ct,`$&/`)+`/`)+gt)),H.push(ot)),1;gt=0;var Dt=Q===``?`.`:Q+`:`;if(L(_))for(var vt=0;vt<_.length;vt++)Q=_[vt],it=Dt+Kt(Q,vt),gt+=M(Q,H,Y,it,ot);else if(vt=b(_),typeof vt==`function`)for(_=vt.call(_),vt=0;!(Q=_.next()).done;)Q=Q.value,it=Dt+Kt(Q,vt++),gt+=M(Q,H,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,Q,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return gt}function q(_,H,Y){if(_==null)return _;var Q=[],ot=0;return M(_,Q,``,``,function(it){return H.call(Y,it,ot++)}),Q}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!et(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return yt.Activity=y,yt.Children=ut,yt.Component=N,yt.Fragment=i,yt.Profiler=l,yt.PureComponent=A,yt.StrictMode=r,yt.Suspense=p,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,yt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},yt.cache=function(_){return function(){return _.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var Q=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(Q[it]=H[it]);var it=arguments.length-2;if(it===1)Q.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=H1(),mh.exports}var M0;function K1(){if(M0)return Ga;M0=1;var s=L1(),t=jd(),i=q1();function r(e){var n=`https://react.dev/errors/`+e;if(1ut||(e.current=at[ut],at[ut]=null,ut--)}function Y(e,n){ut++,at[ut]=e.current,e.current=n}var Q=_(null),ot=_(null),it=_(null),gt=_(null);function Dt(e,n){switch(Y(it,n),Y(ot,e),Y(Q,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ym(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ym(n),e=Qm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(Q),Y(Q,e)}function vt(){H(Q),H(ot),H(it)}function ln(e){e.memoizedState!==null&&Y(gt,e);var n=Q.current,a=Qm(n,e.type);n!==a&&(Y(ot,e),Y(Q,a))}function Es(e){ot.current===e&&(H(Q),H(ot)),gt.current===e&&(H(gt),Ia._currentValue=Z)}var st,P;function dt(e){if(st===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);st=n&&n[1]||``,P=-1)`:-1f||x[c]!==U[f]){var V=` +`+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{pt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?dt(a):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return dt(e.type);case 16:return dt(`Lazy`);case 13:return e.child!==n&&n!==null?dt(`Suspense Fallback`):dt(`Suspense`);case 19:return dt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return dt(`Activity`);default:return``}}function te(e){try{var n=``,a=null;do n+=kt(e,a),a=e,e=e.return;while(e);return n}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,xl=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,_l=s.unstable_LowPriority,Tp=s.unstable_IdlePriority,yb=s.log,mb=s.unstable_setDisableYieldValue,Zr=null,Xe=null;function _s(e){if(typeof yb==`function`&&mb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Zr,e)}catch{}}var Ze=Math.clz32?Math.clz32:wb,Sb=Math.log,vb=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Tl=256,Al=262144,Ol=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Wr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Pr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&kl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{fu=!1}var As=null,hu=null,zl=null;function Qp(){if(zl)return zl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=aa),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),zl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=kl(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=kl(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,ua=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==kl(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Oo(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ya(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=Gl(k.type,k.key,k.props,null,R.mode,G),ya(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(nt(k)){if(ct=nt(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Zl(k),G);if(k.$$typeof===A)return Ht(R,O,Ql(R,k),G);Wl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ga=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Jl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Vl(e),bg(e,null,a),n}return Kl(e,c,n,a),Vl(e)}function ma(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function Sa(){if(Gu){var e=ir;if(e!==null)throw e}}function va(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ea(e,n,V,rn(e))}else Ea(e,n,c,rn(e))}catch($){Ea(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ea(e,n.next.queue,{},rn())}function cf(){return xe(Ia)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),ma(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ea(e,n,a,c)}function Ea(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Kl(e,n,f,0),qt===null&&ql(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=eo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var Ca={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var _y={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ao(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ao(4194308,4,e,n)},useInsertionEffect:function(e,n){ao(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),po(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return ts(n.type),$t(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,_a(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return $t(n),null}else 2*Re()-c.renderingStartTime>vo&&a!==536870912&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&po(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Ta(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Aa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function go(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(go(e,n,a),e=e.sibling;e!==null;)go(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=No,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}No=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Zr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,Ua(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(Pr(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),Pr(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(Pr(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var _o=null,Sr=null,Hf=!1,To=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,Hf||(Hf=!0,JE())}function Ua(e,n){if(!qf&&To){qf=!0;do for(var a=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Rl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){To=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=_o;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?_o=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||Ua(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&$m($)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function s0(e,n,a){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),n0.has(f)||(n0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function p1(e){fs.D(e),s0(`dns-prefetch`,e,null)}function g1(e,n){fs.C(e,n),s0(`preconnect`,e,n)}function y1(e,n,a){fs.L(e,n,a);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+cn(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+cn(a.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(Ba(h))||n===`script`&&c.querySelector(La(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function m1(e,n){fs.m(e,n);var a=vr;if(a&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),Te(c,`link`,e),ge(c),a.head.appendChild(c)}}}function S1(e,n,a){fs.S(e,n,a);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Mo(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function v1(e,n){fs.X(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w1(e,n){fs.M(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function i0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(n=wr(a.href),a=Ki(f).hoistableStyles,c=a.get(n),c||(c={type:`style`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=wr(a.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=a.async,a=a.src,typeof a==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(a),a=Ki(f).hoistableScripts,c=a.get(n),c||(c={type:`script`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function r0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,a),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function La(e){return`script[async]`+e}function a0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(a.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),Mo(c,a.precedence,e),n.instance=c;case`stylesheet`:f=wr(a.href);var h=e.querySelector(Ba(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=r0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,Mo(h,a.precedence,e),n.instance=h;case`script`:return h=br(a.src),(f=e.querySelector(La(h)))?(n.instance=f,ge(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Mo(c,a.precedence,e));return n.instance}function Mo(e,n,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function E1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;switch(n.rel){case`stylesheet`:return e=n.disabled,typeof n.precedence==`string`&&e==null;default:return!0}case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function c0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function C1(e,n,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wr(c.href),h=n.querySelector(Ba(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=Uo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ge(h);return}h=n.ownerDocument||n,c=r0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uo.bind(e),n.addEventListener(`load`,a),n.addEventListener(`error`,a))}}var rh=0;function x1(e,n){return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function jo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(_1,e),zo=null,Uo.call(e))}function _1(e,n){if(!(n.state.loading&4)){var a=zo.get(e);if(a)var c=a.get(null);else{a=new Map,zo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=K1(),dh.exports}var G1=V1(),W=jd();const $1=`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`,Y1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0`,Q1=`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,F1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY`,cv=W.createContext(null);function Nd(){const s=W.useContext(cv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function J1(){return $1}function X1(){return Q1}function Z1(){return{Authorization:`Bearer ${Y1}`}}function W1(){return{Authorization:`Bearer ${F1}`}}function P1({children:s}){const t=J1(),i=X1(),r=W.useMemo(()=>Z1(),[]),l=W.useMemo(()=>W1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(cv.Provider,{value:o,children:s})}var Vo={exports:{}},Sh,U0;function tC(){if(U0)return Sh;U0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function eC(){if(z0)return Vo.exports;z0=1;var s=tC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=nt,m=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function L(J,et){var nt=p.get();nt.context=o,nt.release=I,nt.value=J,nt.callback=et||i,nt.errorHandler=v,y>=d||b.paused?g?(nt.next=g,g=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function I(J){J&&p.release(J);var et=g;et&&y<=d?b.paused?y--:(m===g&&(m=null),g=et.next,et.next=null,u.call(o,et.value,et.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Vo.exports=t,Vo.exports.promise=l,Vo.exports}var nC=eC();const uv=z1(nC),Dn=`Stream-Next-Offset`,zc=`Stream-Cursor`,jc=`Stream-Up-To-Date`,qn=`Stream-Closed`,vh=`Stream-Seq`,sC=`Stream-TTL`,iC=`Stream-Expires-At`,j0=`Producer-Id`,Go=`Producer-Epoch`,N0=`Producer-Seq`,rC=`Producer-Expected-Seq`,aC=`Producer-Received-Seq`,wh=`offset`,$o=`live`,lC=`stream-sse-data-encoding`;var ti=class fv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new fv(r,o,u,l,i)}},Bd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class nd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=B0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new nd(d,u,r,l)}static fromFetchError(t){const i=B0(t.status);return new nd(t.message,i,t.status,t.json??t.text)}};function B0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var oC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},hv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},cC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const uC=[429,503],Ld={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function fC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function dv(s,t=Ld){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Bd;if(b instanceof ti&&!uC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?fC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*l,r)}}}}const hC=[201,204,205];function dC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||hC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Bd:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function pC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function gC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function bh(s){return pC(s)||gC(s),s}async function*L0(s,t){const i=s.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=l.split(` +`);l=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Id=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},pv=class sd extends Id{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new sd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new sd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Hd(this)}},Eh=class _r extends Id{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new _r({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new _r({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new pv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Hd(this)}},Hd=class id extends Id{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new id(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new id(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const I0=`PAUSE_STREAM`;var yC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new pv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(I0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Hd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(zc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?L0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:SC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=rd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:rd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=L0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===I0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w(`bodyStream`),bh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return bh(i)}textStream(){this.#w(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return bh(t)}subscribeJson(s){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(Dn),o=s.headers.get(zc),u=s.headers.has(jc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function mC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>mC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function Wa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new hv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function Po(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const H0=new Set;function vC(){if(!(typeof process>`u`))return`production`}function wC(){return typeof globalThis.window<`u`}function bC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function EC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function gv(s,t){if(t===!1||vC()===`test`||!wC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,l=EC(r);l&&l.protocol===`http:`&&(H0.has(l.origin)||(H0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function CC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await xC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function xC(s){const t=s.url instanceof URL?s.url.toString():s.url;gv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(wh,r);const l=s.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set($o,l);const o=await Po(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await Wa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Ld,m=dv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Bd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(zc)??void 0,E=y.headers.has(jc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(lC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const J=new URL(t);J.searchParams.set(wh,I),tt||(l===`sse`?J.searchParams.set($o,`sse`):(l===!0||l===`long-poll`)&&J.searchParams.set($o,`long-poll`)),K&&J.searchParams.set(`cursor`,K);const et=await Po(s.params);for(const[Kt,ht]of Object.entries(et))J.searchParams.set(Kt,ht);const nt=await Wa(s.headers),Ct=await m(J.toString(),{method:`GET`,headers:nt,signal:X});return Ct.ok||await ps(Ct,t),Ct},L=l===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(wh,I),tt.searchParams.set($o,`sse`),K&&tt.searchParams.set(`cursor`,K);const J=await Po(s.params);for(const[Ct,Kt]of Object.entries(J))tt.searchParams.set(Ct,Kt);const et=await Wa(s.headers),nt=await m(tt.toString(),{method:`GET`,headers:et,signal:X});return nt.ok||await ps(nt,t),nt}:void 0;return new yC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var q0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},_C=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function K0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var yv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=uv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??`application/octet-stream`,i=K0(t)===`application/json`;let r;if(s!==void 0){const g=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[j0]:this.#e,[Go]:this.#n.toString(),[N0]:l.toString(),[qn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===403){const g=d.headers.get(Go),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new q0(m)}throw await ti.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,l=K0(r)===`application/json`;let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[j0]:this.#e,[Go]:i.toString(),[N0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(Dn)??``,duplicate:!1};if(g.status===403){const y=g.headers.get(Go),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new q0(v)}if(g.status===409){const y=g.headers.get(rC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function TC(s){return s!=null&&typeof s.then==`function`}var Hn=class Qa{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){RC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=uv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Ld},l=dv(this.#n,r);this.#e=dC(l)}static async create(t){const i=new Qa(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Qa(t);return await i.head(),i}static async head(t){return new Qa(t).head()}static async delete(t){return new Qa(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(Dn)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[sC]=String(t.ttlSeconds)),t?.expiresAt&&(i[iC]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=AC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[qn]=`true`;let o;t?.body!==void 0&&(xh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new hv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=TC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=OC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new yv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return CC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Wa(this.#t.headers)}async#f(){const t=await Wa(this.#t.headers),i=new URL(this.url),r=await Po(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function AC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function OC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function RC(s){if(!s.url)throw new oC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new cC;gv(s.url,s.warnOnHttp)}const DC=`__includes_scalar__`;class Mi{}class Nr extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class mv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Br(s){return s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function qd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function V0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function MC(s){return{expression:s,residual:!0}}function kC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function sl(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type===`ref`)return sl(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=kC(s,r);return o?o.type===`queryRef`?sl(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class $0 extends En{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class UC extends Ui{constructor(){super(`Collection requires a config`)}}class zC extends Ui{constructor(){super(`Collection requires a sync config`)}}class jC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class Y0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class ml extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class NC extends ml{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class BC extends ml{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class LC extends ml{constructor(){super(`Collection is in error state`)}}class IC extends ml{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class HC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class qC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class KC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class VC extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class GC extends Yn{constructor(){super(`The first argument to update is missing`)}}class $C extends Yn{constructor(){super(`No keys were passed to update`)}}class YC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class QC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class FC extends Yn{constructor(){super(`No keys were passed to delete`)}}class JC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Kd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class XC extends Kd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class ZC extends Kd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class WC extends Kd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class PC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class tx extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class ex extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class nx extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class sx extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class _h extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Th extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class ix extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class rx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class ax extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class lx extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class ox extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Yo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class cx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ux extends zi{constructor(){super(`Query must have a from clause`)}}class Q0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class fx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class hx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class dx extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class px extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class gx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Sv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class yx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class mx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Sx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class vx extends Le{constructor(){super(`Reference path cannot be empty`)}}class wx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class F0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class bx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class Ex extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Cx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class xx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class _x extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Tx extends ji{constructor(){super(`Invalid join condition`)}}class Ax extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ox extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Rx extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Mx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class J0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class kx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ux extends kx{constructor(){super(`Cannot combine empty expression list`)}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class jx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Nx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return tc(s,t,new Map)}function tc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&tc(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;otc(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&tc(s[u],t[u],i));return i.delete(s),o}return!1}const Bx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Bx.has(t)}const vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Ah=new WeakMap;let Lx=1;function X0(s){if(Ah.has(s))return Ah.get(s);const t=Lx++;return Ah.set(s,t),t}const Vd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=X0(s),d=X0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Ix=(s,t,i)=>Vd(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function Pa(s){return(t,i)=>s.direction===`asc`?Vd(t,i,s):Ix(t,i,s)}const Hx=Pa({direction:`asc`,nulls:`first`,stringSort:`locale`});function qx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Yx(s):$x(s);case`func`:return Qx(s,t);default:throw new Sx(s.type)}}function $x(s){const[t,...i]=s.path;if(!t)throw new vx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Yx(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Ar(r(o)),d=Ar(l(o));return me(u)||me(d)?null:Vx(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u{const u=r(o),d=l(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return me(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Ar(r(o)),d=l(o);return me(u)?null:Array.isArray(d)?d.some(p=>Ar(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Oh(d);return p?Gx(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new wx(s.name)}}function Z0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Fx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function W0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Jx(s){return ad.includes(s)}function bv(s){return s.some(t=>Jx(t))}function Sl(s,t,i){if(bv(t))return;const r=i??{...vv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Fx(l)}function Xx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=Sl(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=$d(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Zx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function s_(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=Sl(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Ev(s){return s.config.autoIndex===`eager`}function Bc(s,t,i,r,l){if(bv(t)||!Ev(i))return;const o=r??{...vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function i_(s,t){if(!Ev(t))return;const i=r_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function r_(s){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class a_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Rh=3e4;function Dh(s,t){if(t.length<=Rh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class o_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s==`string`?-1:1}function il(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we();function we(){return Math.random()*(2**31-1)>>>0}const Cv=new ArrayBuffer(8),g_=new DataView(Cv),Xs=new Uint8Array(Cv);class vl{constructor(){this.hash=u_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(p_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(f_);for(let i=0;i>>8&255)}return;case`number`:g_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(d_)):this.update(h_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=we(),x_=we(),__=we(),T_=we(),A_=we(),O_=we(),R_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function D_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&R_.has(t)}const M_=128,rl=new WeakMap;function Ne(s){const t=new vl;return xv(t,s),t.digest()}function k_(s){const t=rl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=U_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=M_)i=z_(s);else return od(s);else{if(s instanceof File)return od(s);if(D_(s))i=j_(s);else{let r=s,l=C_;s instanceof Array&&(l=x_),s instanceof Map&&(l=__,r=[...s.entries()]),s instanceof Set&&(l=T_,r=[...s.entries()]),i=N_(r,l)}}return rl.set(s,i),i}function U_(s){const t=new vl;return t.update(E_),t.update(s.getTime()),t.digest()}function z_(s){const t=new vl;t.update(A_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new se(l)}#n(){const t=new a_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class I_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new I_(t)}}class _v{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends _v{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class H_ extends _v{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Yd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class q_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new K_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class K_ extends zn{sendData(t){this.writer.sendData(t)}}class V_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Tv(){return s=>{const t=new zn(s.graph,new Un),i=new V_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class tS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=tl(t),l=this.get(r);if(ec(l)){const[o,u]=l;if(tl(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ec(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(ec(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ec(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=tl(r);if(d!==Fa){const p=new tS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=tl(r),p=tl(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Ja;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new tS;if(p===d){const m=new Ja;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function tl(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fa}function ec(s){return Array.isArray(s)}class G_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Av(s){return t=>{const i=new zn(t.graph,new Un),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class $_ extends Ni{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function Y_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new $_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Q_ extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new Q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const F_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Or(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Or(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Or(s.slice(1),null,i)}function Ov(s){if(s.length!==Rv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Rv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xa(s){const t=Rv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function eS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function nS(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function J_(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function X_(s,t,i=F_){if(s!=null&&eS(s,i),t!=null&&eS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Or(``,g,i);if(p{const o=s(i,l);return o!==0?o:ld(t,r)}}class Qd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=c_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:rS(this.#t[r-1]),o=r===this.#t.length?null:rS(this.#t[r]),u=X_(l,o),d=sS(t,u);if(this.#t.splice(r,0,d),rthis.#e(iS(i),iS(r)))}}class Mv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Qd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class Z_ extends Ni{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Dv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Mv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function W_(s,t){return i=>{const r=new zn(i.graph,new Un),l=new Z_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class P_ extends H_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function kv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),l=new P_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class tT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends Ni{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function cd(s){return t=>{const i=new zn(t.graph,new Un),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class nT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function sT(s){return t=>{const i=new zn(t.graph,new Un),r=new nT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class iT extends Ni{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Dv(l));this.#t=new Mv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function rT(s,t){const i=t||{};return r=>{const l=new zn(r.graph,new Un),o=new iT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function aS(s){return`pipe`in s}function lS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!aS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>aS(l))),r=>{const l=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=il(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Av(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function aT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function oT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function cT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const fT={sum:aT,count:lT,avg:oT,min:cT,max:uT};function hT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(W_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Tv())}function dT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Tv())}function pT(s,t){return dT(rT,s,t)}const kh=`__virtual_synced__`,Uh=`__virtual_has_local__`;function oS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:gT,count:yT,avg:mT,min:ST,max:vT}=fT;function wT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Lr(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ox(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function cS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,w])=>oS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Uh]:{preMap:([,w])=>oS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Fo(A);else if(Lr(A)){const{transformed:z,extracted:L}=ud(A,T);for(const[I,K]of Object.entries(L))w[I]=Fo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(lS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[J,et]of Object.entries(r))et.type===`agg`&&(z[J]=D[J]);uS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${il(L)}`:`single_group`,K={...D,$selected:z},X=D[kh],tt=D[Uh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=V0(D),z=gc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Dr(L(K))}))}if(l&&l.length>0)for(const D of l)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Dr(D(z))}));return s}const p=wT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}uS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=V0(w),T=gc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Dr(w(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Fo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return gT(i);case`count`:return yT(l);case`avg`:return mT(i);case`min`:return ST(r);case`max`:return vT(r);default:throw new Rx(s.name)}}function gc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case`func`:{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case`ref`:return s;case`val`:return s;default:throw new Mx(s.type)}}function uS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Lr(s){return Br(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Lr(t)):!1:!1}function ud(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(l=>{const o=ud(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function ET(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:fd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(J=>J.expression.type===`ref`)?i.map(J=>{const et=J.expression,nt=sl(s,et,l);return he(nt?new Me(nt.path):J.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(J,et)=>{if(i.length===1){const nt=J&&N(J),Ct=et&&N(et);return v(nt,Ct)}if(I){const nt=Ct=>Ct&&I.map(Kt=>Kt(Ct));return v(nt(J),nt(et))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(I)return I.map(et=>et(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const et=J();return Math.max(0,w.limit-et)}}}}return g?t.pipe(hT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(pT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function fd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function CT(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?el(t.where):void 0,l=_T(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Wx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=el(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=el(t.where);return t.optimizedOnly?void 0:i(l)}}function el(s){const t=wv(s);return i=>{try{const r=t(i);return Dr(r)}catch{return!1}}}function xT(s,t){const i=el(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function _T(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=fd(p,s);Bc(y[0],y,s,v);const b=Sl(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Pa(m.compareOptions),v=fS(p.value,m.expression),b=fS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function fS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:wv(t)(s)}class hS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ld(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const nc=`__tanstack_db_direct`;class TT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?W0(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let J=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(J=!0);const et=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(J&&!et))if(A===void 0&&z!==void 0){const nt=N.get(D);if(nt){const Ct=nt.value,Kt=W0(Ct,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Kt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||et)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new hS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new hS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[nc]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Uv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function dS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return sc(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function sc(s){return s&&typeof s==`object`&&s.__refProxy===!0}function hd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function pS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function AT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function dd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function pd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(l=>ie(l)))}function OT(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(l=>ie(l)))}function RT(s,t){return new Je(`in`,[ie(s),ie(t)])}class DT{constructor(t){this.query=t}}class MT{constructor(t){this.query=t}}class zv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function kT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction===`asc`?pS:dd)(r,new Be(t[0]))}const i=[];for(let r=0;rpd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>OT(r,l))}class UT extends zv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&i_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?xT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=pd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?el(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:hd(tt,new Be(g))});if(J){const et=J.map(Ct=>Ct.key).filter(Ct=>!this.sentKeys.has(Ct)&&b(Ct));T.push(...et);const nt=m.take(i-T.length,g,b);T.push(...nt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const J of T){const et=this.collection.get(J);E.push({type:`insert`,key:J,value:et}),w=z?z(et):et,tt.add(J)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=kT(t,r);if(tt){const{expression:J}=t[0],et=r[0];let nt;if(et instanceof Date){const Ct=new Date(et.getTime()+1);nt=pd(AT(J,new Be(et)),dd(J,new Be(Ct)))}else nt=hd(J,new Be(et));I={whereFrom:tt,whereCurrent:nt,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:l??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Uv(),p=r(d);o=ie(p)}const u=new UT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new IC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const jT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),NT=s=>{clearTimeout(s)},BT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>jT(s),zh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):NT,jv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};jv.instance=null;let jh=jv;class LT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new BC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new ml(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new NC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&zh(this.idleCallbackId),this.idleCallbackId=BT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Fd=Symbol(`liveQueryInternal`);class IT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=HT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Fd];throw new VC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new ix;if(i.committed)throw new rx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new LC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new J0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new J0(this.id,t)})}this.preloadPromise=null}}function HT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const gS=1;function ic(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(l=>Zs(l)??null).sort((l,o)=>ic(xi(l),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([l,o])=>({key:Zs(l)??null,value:Zs(o)??null})).sort((l,o)=>ic(xi(l.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>ic(r,l));for(const[r,l]of i){const o=Zs(l);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>ic(r,l)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function KT(s,t,i,r,l){const o=qT(r),u=Zs(t)??null,d=Zs(l),g=Zs({signatureVersion:gS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:gS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function gd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>gd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=gd(r);return t}function VT(s){return JSON.parse(JSON.stringify(s))}class GT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=Uv(),o=t(l),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=KT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:VT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:gd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var $T={};const YT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),QT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),FT=new Set([`set`,`delete`,`clear`,`add`]),JT=new Set([`entries`,`keys`,`values`,`forEach`]);function Jd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function XT(s,t,i,r){if(YT.has(s))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(Jd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function ZT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Jd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function yS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function WT(s,t,i,r,l,o,u){if(JT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&$T.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(gs(o,t))}),l}if(ei(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=gs(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=gs(s[l],t);return i}let mS=0;function PT(){return mS+=1,mS}function Xd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Xd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:PT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),l.has(y))return Tt(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(QT.has(D))return yS(E,o,u);const A=XT(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return ZT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(FT.has(D))return yS(E,o,u);const A=WT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Jd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function tA(s){const t=s.map(i=>Xd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function eA(s,t){const{proxy:i,getChanges:r}=Xd(s);return t(i),r()}function nA(s,t){const{proxies:i,getChanges:r}=tA(s);return t(i),r()}function sA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function iA(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class rA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new rA,mc=[];let al=[],aA=0;function lA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Za(s){const t=new fA(s);return mc.push(t),t}function rc(){if(al.length>0)return al.slice(-1)[0]}function oA(s){yc.clear(s.id),al.push(s)}function cA(s){try{yc.flush(s.id)}finally{al=al.filter(t=>t.id!==s.id)}}function uA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let fA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new PC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=sA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=aA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&uA(this)}mutate(t){if(this.state!==`pending`)throw new ex;oA(this);try{t()}finally{cA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=lA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new nx;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new sx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class hA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=rc();if(!u&&!this.config.onInsert)throw new XC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new KC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Za({metadata:{[nc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=rc();if(!u&&!this.config.onDelete)throw new WC;if(Array.isArray(r)&&r.length===0)throw new FC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new JC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Za({autoCommit:!0,metadata:{[nc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new jC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new Y0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new $0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new Y0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new $0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new HC(i):new qC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new GC;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=rc();if(!o&&!this.config.onUpdate)throw new ZC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new $C;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new YC(w);return E});let y;u?y=nA(m,p):y=[eA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new QC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Za({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Za({metadata:{[nc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class dA extends zv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Zd(s){const t=new Wd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Wd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new UC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new dA,this._indexes=new GT,this._lifecycle=new LT(t,this.id),this._mutations=new hA(t,this.id),this._state=new TT(t),this._sync=new IT(t,this.id),this.comparisonOpts=pA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return CT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function pA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function gA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function yA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Za({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(gA(u))throw new tx}),o}}function mA(s){const t=SA(s);let i=s,r,l=0;const o=10;for(;lLv(u)),l=Iv(r),o=Nv(s);for(const[u,d]of l.singleSource)vA(s,u)&&!o.has(u)&&t.set(u,d);return t}function vA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Nv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function yd(s){const t={...s,from:s.from.type===`queryRef`?new Sn(yd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(yd(i.from.query),i.from.alias):i.from}))};return wA(t)}function wA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=Sd(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!G0(d)),r=Sd(t).map(d=>Lv(d)),l=Iv(r),o=EA(s,l),u=s.where.filter(d=>G0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Bv(s){return{...s,from:md(s.from),join:s.join?.map(t=>({...t,from:md(t.from)}))}}function md(s){if(s.type===`collectionRef`)return s;const t=Bv(s.query);if(bA(t)){const i=md(t.from);return i.type===`collectionRef`?new Nr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function Sd(s){const t=[];for(const i of s){const r=qd(i);t.push(...Pd(r))}return t}function Pd(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...Pd(i));return t}else return[s]}function Lv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Iv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function EA(s,t){const i=new Set,r=Nv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=SS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:SS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(MC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Pd(qd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Rr(s){return{from:s.from.type===`collectionRef`?new Nr(s.from.collection,s.from.alias):new Sn(Rr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Nr(t.from.collection,t.from.alias):new Sn(Rr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function SS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Nr(s.collection,s.alias):new Sn(Rr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Nr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!OA(s.query,r,s.alias))return new Sn(Rr(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(Rr(s.query),s.alias);const l=s.query.where||[],o={...Rr(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function CA(s,t,i){return s.select?Hv(s.select)||RA(s.select,t,i):!1}function xA(s){return s.groupBy&&s.groupBy.length>0}function _A(s){return s.having&&s.having.length>0}function TA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function AA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function OA(s,t,i){return!(CA(s,t,i)||xA(s)||_A(s)||TA(s)||AA(s))}function Hv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Hv(i))return!0}return!1}function tp(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...tp(i));break}return t}function RA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const l=tp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=tp(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new Ux;return s.length===1?s[0]:new Je(`and`,s)}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=kA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function kA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=zA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new F0(r);if(!X)throw new F0(I);const{activeSource:tt,lazySource:J}=NA(t.type,K,X),et=Object.keys(i),{mainExpr:nt,joinedExpr:Ct}=UA(t.left,t.right,et,z),Kt=he(nt),ht=he(Ct);let M=s.pipe(ce(([Z,at])=>[Ar(Kt(at)),[Z,at]])),q=L.pipe(ce(([Z,at])=>{const ut={[z]:at};return[Ar(ht(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new bx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,at=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=nt.type===`func`||Ct.type===`func`;if(!at&&!ut){const _=tt===`main`?z:l;y.add(_);const H=tt===`main`?M:q,Q=sl(w,tt===`main`?Ct:nt,J),ot=Q.collection,it=Q.path[0];it&&Bc(it,Q.path,ot);const gt=H.pipe(sT(Dt=>{const vt=N[_]||_,ln=g[vt];if(!ln)throw new zx(vt,_,J.id,Object.keys(g));if(ln.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[dt]])=>dt),st=new Me(Q.path);ln.requestSnapshot({where:RT(st,Es),optimizedOnly:!0})||ln.requestSnapshot()}));tt===`main`?M=gt:q=gt}}return M.pipe(kv(q,t.type),jA(t.type))}function UA(s,t,i,r){const l=i.filter(d=>d!==r),o=vd(s),u=vd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Cx:o===u?new Ex(o):l.includes(o)?u!==r?new _x(r):new Tx:new xx(o)}function vd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=vd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new Sv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new Ax(s.type)}}function jA(s){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function NA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeIA(l,r)))}function qA(s){return s.type===`agg`}function KA(s){return s&&typeof s==`object`&&!Br(s)}function qv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?l:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(KA(o)){qv([...s,r],o,i);continue}if(qA(o)||Lr(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Br(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const Mr=Symbol(`includesRouting`);function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:b,sourceWhereClauses:w}=mA(s);let E=b;g.set(E,s),Cd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=GA(E.from,T,i,r,l,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,at])=>[FA(at,ht),[Z,at]])).pipe(kv(m,`inner`)).pipe(ys(([Z,[at]])=>at!=null),ce(([Z,[at,ut]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=MA(X,E.join,A,I,z,T,p,g,i,r,l,o,u,d,s,vc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=qd(ht),q=he(M);X=X.pipe(ys(([Z,at])=>Dr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Dr(ht(q))));const tt=[],J=[];if(E.select){const ht=YA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));at=X.pipe(ce(([Y,Q])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(Q);let Dt=ot[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(Av(H=>H.map(([Y,Q])=>[Y,Q>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ut,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:he(Q)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:Q=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(Q);let Dt=ot[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});QA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new fx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new hx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=HA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[Mr]=q,[ht,M]})));const et=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=cS(X,E.groupBy,E.having,E.select,E.fnHaving,I,et):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Lr(M))&&(X=cS(X,[],E.having,E.select,E.fnHaving,I,et)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new px;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(Y_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=ET(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ut,[_,H]])=>{const Y=_.$selected,Q=vS(Ed(Y),_);if(m){const ot=_[z]?.__correlationKey,it=_.__parentContext??null;return delete Q.__correlationKey,delete Q.__parentContext,[ut,[Q,H,ot,it]]}return[ut,[Q,H]]})),at={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new gx;const Ct=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=vS(Ed(q),M);if(m){const at=M[z]?.__correlationKey,ut=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ut]]}return[ht,[Z,void 0]]})),Kt={collectionId:I,pipeline:Ct,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function VA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=VA(s);for(const l of i)if(t.has(l))throw new yx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type===`queryRef`&&bd(l.from.query,r)}function GA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new Sv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=vc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Ed(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new mx(s.type)}}function $A(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Ed(s){return $A(s)?s.value:s}function vS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Cd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),Cd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=ep(l,t);r.push(o)}return new Je(s.name,r)}}function np(s,t){return s.map(r=>{const l=ep(r.expression,t);return{...r,expression:l}})}const Gv=new WeakMap;function JA(s){return s.utils?.[Fd]?.getBuilder?.()}function XA(s,t){Gv.set(s,t)}function ZA(s){return Gv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Yo(i,d)}if(Array.isArray(t))throw new Yo(i,`array`);if(r.length!==1)throw r.length===0?new Yo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Yo(i,`string`):new ax(i);const l=r[0],o=t[l];let u;if(o instanceof Wd)u=new Nr(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new lx(i);u=new Sn(d,l)}else throw new ox(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new cx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=sc(l)?ie(l):l;if(!Br(o))throw new Q0(wS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?dS(i):Ei(i),l=t(r),o=sc(l)?ie(l):l;if(!Br(o))throw new Q0(wS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let l=t(r);sc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Yv(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?dS(r):Ei(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=Array.isArray(l)?l.map(d=>ie(d)):[ie(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ux;return this.query}}function wS(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function WA(s){return s===void 0?ie(null):s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function $v(s){return s!==null&&typeof s==`object`&&!Br(s)&&!s.__refProxy}function Yv(s,t=[]){if(!$v(s))return WA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Nh(l,r,t,`collection`);continue}if(l instanceof DT){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`array`);continue}if(l instanceof MT){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`concat`);continue}i[r]=Yv(l,t)}return i}function sp(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...sp(i));break}return t}function PA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return sp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)PA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of sp(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||$v(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=DC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function bS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function tO(s){const t=s(new Wt);return Qv(t)}function Qv(s){return s._getQuery()}function eO(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):ip(d)&&l(d))}return r(s),t}function Fv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Fv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function nO(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?l(d.query):ip(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function ip(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function sO(s){const t=typeof s.query==`function`?tO(s.query):Qv(s.query);if(t.select&&!ip(t.select))throw new dx;return t}function iO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*rO(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function aO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function lO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function oO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?np(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function cO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=il({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=np(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const ES=Symbol.for(`@tanstack/db.collection-config-builder`);class uO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=ep(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=aO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=iO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=oO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=rO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=np(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[ES]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[ES])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=cO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=lO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let fO=0;class hO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++fO}`,this.query=sO({query:t.query}),this.collections=eO(this.query);const i=nO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Jv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Fv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Fd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Nx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??rc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new q_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new jx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(cd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(vO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=mO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,xd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(cd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Ir(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Xv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=ZA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new uO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Jv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function CS(s){return s.materialization!==`collection`}function xS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Xv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(cd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Ir(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Xv(i.childCompilationResult.includes,t)),l})}function dO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function pO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function gO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Mr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Mr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function yO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Zv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function Ir(s,t){return t==null?s:JSON.stringify([s,t])}function _S(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Jv(u):void 0,m={collection:Zd({id:`__child-collection:${s}-${t}-${il(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=dO(l)),m}function xd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Mr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Ir(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=_S(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=xS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=CS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=_S(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&SO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}gO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=pO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&xd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&xd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=CS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=xS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Mr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Ir(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(yO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Mr]}function mO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function SO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function vO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function TS(s){return new hO(s).getConfig()}function Bh(s){if(typeof s==`function`){const i=TS({query:s});return AS(i)}else{const t=s,i=TS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),AS(i)}}function AS(s){const t=Zd(s),i=JA(s);return i&&XA(t,i),t}function Wv(s){return s!=null&&`operation`in s.headers}function Pv(s){return s!=null&&`control`in s.headers}var wO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Wv(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Pv(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const OS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function EO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function tw(s){for(const r of Object.keys(s))if(OS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(OS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...EO(l.type,l.primaryKey,l.schema)};return i}function ew(s){const{streamOptions:t,state:i,actions:r}=s,l=new Hn(t),o=new wO,u={};for(const[b,w]of Object.entries(i)){const E=Zd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:bO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Wv(N)?o.dispatchChange(N):Pv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=yA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const rp=600,CO=rp/2*1e3,xO=3600*24,_O={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Lh=tw({rooms:{schema:_O,type:`stream`,primaryKey:`roomId`}}),TO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},RS=tw({scores:{schema:TO,type:`stream`,primaryKey:`playerName`}});function AO(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nw=W.createContext(null);function sw(){const s=W.useContext(nw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function OO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Nd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:xO}),o=await AO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):F.jsx(nw.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function RO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Jt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return F.jsxs(`div`,{style:Ae.container,children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),F.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),F.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&F.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:F.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[F.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),F.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>F.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:Jt.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:Jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:`8px 10px`,color:Jt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Jt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,ac=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ll=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lol.encode(s),QO=ol?YO:$O;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class wl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Qr=()=>new wl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Yr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),cl=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&ac(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new wl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new wl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const Hr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),qr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(qr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(qr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>nl.decode(je(s)),Ai=nl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-qr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new oc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,fl=Symbol(`Equality`),hw=(s,t)=>s===t||s[fl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},bl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&bl(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fl]!=null)return s[fl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const hl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(hl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(hl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=hl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!hl||process.stdout.isTTY)&&(!hl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Md=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[fl]?hw(s,t):Lc(s)?ap(s,i=>iw(t,r=>Md(i,r))):vR(s)?bl(s,(i,r)=>Md(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Md(i,r)}equals(t){return this.constructor===t.constructor&&kr(this.shape,t.shape)}[NR](){return!0}[fl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Fr(this,Yc)}get optional(){return new vw(this)}cast(t){return KS(t,this),t}expect(t){return KS(t,this),t}}class pp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new pp(s,t);ue(pp);class gp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new gp(s);ue(gp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Vc=(...s)=>new Kc(s),mw=ue(Kc),LR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Sw=s=>{if(Kr.check(s))return[LR(s)];if(mw.check(s))return s.shape.map(t=>t+``);if(Ow.check(s))return[`[+-]?\\d+.?\\d*`];if(Rw.check(s))return[`.*`];if(xc.check(s))return s.shape.map(Sw).flat(1);bn()};class IR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Sw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(IR);const HR=Symbol(`optional`);class vw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[HR](){return!0}}const qR=ue(vw);class KR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(KR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):bl(this.shape,(r,l)=>{const o=this._isPartial&&!fp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const VR=s=>new Gc(s),GR=ue(Gc),$R=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class ww extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&bl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const bw=(s,t)=>new ww(s,t),YR=ue(ww);class Ew extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&bl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const QR=(...s)=>new Ew(s);ue(Ew);class Cw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new yp(t)}check(t,i){const r=Lc(t)&&ap(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const xw=(...s)=>new Cw(s),FR=ue(Cw),JR=be(s=>Lc(s));class _w extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const XR=(s,t=null)=>new _w(s,t);ue(_w);const ZR=XR(Ie);class WR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=QR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const PR=ue(WR),tD=be(s=>typeof s==`function`);class eD extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(eD,s=>s.shape.length>0);class yp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=iw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Fr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Fr(...s.map(t=>dl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new yp(s),xc=ue(yp),Tw=()=>!0,_c=be(Tw),nD=ue(gp,s=>s.shape===Tw),mp=be(s=>typeof s==`bigint`),sD=be(s=>s===mp),Aw=be(s=>typeof s==`symbol`);be(s=>s===Aw);const Ur=be(s=>typeof s==`number`),Ow=be(s=>s===Ur),Kr=be(s=>typeof s==`string`),Rw=be(s=>s===Kr),$c=be(s=>typeof s==`boolean`),iD=be(s=>s===$c),Dw=Vc(void 0);ue(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),rD=ue(Kc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(pp,s=>s.shape===Uint8Array);const aD=Fr(Ur,Kr,Yc,Dw,mp,$c,Aw);(()=>{const s=xw(_c),t=bw(Kr,_c),i=Fr(Ur,Kr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const dl=s=>{if(ZR.check(s))return s;if($R.check(s)){const t={};for(const i in s)t[i]=dl(s[i]);return VR(t)}else{if(JR.check(s))return Fr(...s.map(dl));if(aD.check(s))return Vc(s);if(tD.check(s))return ue(s)}bn()},KS=OR?()=>{}:(s,t)=>{const i=new BR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:dl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew lD(s),Mw=oD(_c).if(Ow,(s,t)=>Qh(t,kS,wc)).if(Rw,(s,t)=>jR(t)).if(iD,(s,t)=>qS(t)).if(sD,(s,t)=>BigInt(Qh(t,kS,wc))).if(xc,(s,t)=>Cr(t,Fh(t,s.shape))).if(GR,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(qR.check(l)){if(qS(t))continue;l=l.shape}i[r]=Mw(l,t)}return i}).if(FR,(s,t)=>{const i=[],r=yw(t,0,42);for(let l=0;lFh(t,s.shape)).if(rD,(s,t)=>null).if(PR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(nD,(s,t)=>Cr(t,Fh(t,[Ur,Kr,Yc,Dw,mp,$c,xw(Ur),bw(Fr(`a`,`b`,`c`),Ur)]))).if(YR,(s,t)=>{const i={},r=Qh(t,0,3);for(let l=0;lMw(dl(t),s),Qc=typeof document<`u`?document:{};be(s=>s.nodeType===dD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===uD);be(s=>s.nodeType===fD);const cD=s=>UO(s,(t,i)=>`${i}:${t};`).join(``),uD=Qc.ELEMENT_NODE,fD=Qc.TEXT_NODE,hD=Qc.DOCUMENT_NODE,dD=Qc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===hD);const ws=Symbol,kw=ws(),Uw=ws(),pD=ws(),gD=ws(),yD=ws(),zw=ws(),mD=ws(),Sp=ws(),SD=ws(),vD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...jw(s)),Nw.forEach(t=>t.print(s))},CD=(...s)=>{console.warn(...jw(s)),s.unshift(Sp),Nw.forEach(t=>t.print(s))},Nw=Oi(),Bw=s=>({[Symbol.iterator](){return this},next:s}),xD=(s,t)=>Bw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Jh=(s,t)=>Bw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Lw{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Iw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=kn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&_D(i,t.clock)!==null},vp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Yr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new Lw(i,r))},wp=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const l=r.length;At(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return At(o.restEncoder,0),wp(o,r),o.toUint8Array()}return null},qw=uw;class Jr extends rw{constructor({guid:t=gR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=qw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new $w,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=IS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>IS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Oe&&l!==i)if(l===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,jr)}getText(t=``){return this.get(t,Gr)}getMap(t=``){return this.get(t,Vr)}getXmlElement(t=``){return this.get(t,$r)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Jr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class OD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class RD extends OD{readLeftID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return qr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return ul(this.restDecoder)}readBuf(){return kR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class DD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DD{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new Yh(je(t)),this.clientDecoder=new oc(je(t)),this.leftClockDecoder=new Yh(je(t)),this.rightClockDecoder=new Yh(je(t)),this.infoDecoder=new LS(je(t),qr),this.stringDecoder=new hR(je(t)),this.parentInfoDecoder=new LS(je(t),qr),this.typeRefDecoder=new oc(je(t)),this.lenDecoder=new oc(je(t))}readLeftID(){return new zr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new zr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ul(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ul(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Yr(r,t[0].id.clock);const l=Gn(t,r);At(s.restEncoder,t.length-l),s.writeClient(i),At(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zD(s,t.clients.get(l),l,o)})},jD=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=ni(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new $w,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Jc;return Kw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},BD=(s,t)=>Kw(s,t.doc.store,t.beforeState),LD=(s,t,i,r=new Ac(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=jD(r,u),g=ND(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=ZS([m.update,g.update])}}else d.pendingStructs=g;const y=VS(r,l,d);if(d.pendingDs){const v=new Ac(Hr(d.pendingDs));wt(v.restDecoder);const b=VS(v,l,d);y&&b?d.pendingDs=ZS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,Vw(l.doc,v)}},i,!1),Vw=(s,t,i,r=Ac)=>{const l=Hr(t);LD(l,s,i,new r(l))},GS=(s,t,i)=>Vw(s,t,i,RD);class ID{constructor(){this.l=[]}}const $S=()=>new ID,YS=(s,t)=>s.l.push(t),QS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>hp(s.l,[t,i]);class zr{constructor(t,i){this.client=t,this.clock=i}}const Jo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new zr(s,t),HD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Tr=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Hw(t.ds,s.id),kd=(s,t)=>{const i=vs(s.meta,kd,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class $w{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Yw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Gn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Gn(i,t.clock)]},Xh=qD,Ud=(s,t,i)=>{const r=Gn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[Ud(s,i,t.clock)]},FS=(s,t,i)=>{const r=t.clients.get(i.client),l=Gn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Uc(s,o,i.clock-o.id.clock+1)),o},KD=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Gn(r,t.id.clock)]=i},Qw=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ud(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(vp(t.deleteSet),BD(s,t),wp(s,t.deleteSet),!0),XS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},cc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},GD=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Gn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=aw(l.length-1,1+Gn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+cc(l,p)}})},Fw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Gw(g._dEH,p,i))})}),d.push(()=>r.emit(`afterTransaction`,[i,r])),hp(d,[]),i._needFormattingCleanup&&uM(i)}finally{r.gc&&GD(o,l,r.gcFilter),$D(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Yr(Gn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+cc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Gn(b,v);w+11||w>0&&cc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(ED(Sp,kw,`[yjs] `,Uw,zw,`Changed the client-id because another client seems to be using it.`),r.clientID=qw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new kD;JS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Jc;JS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Fw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new VD(s,i,r),l.push(s._transaction),l.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Fw(l,0)}}return u};function*YD(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new de(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},ZS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Hr(m)));let l=r.map(m=>new QD(m,!0)),o=null;const u=new i,d=new FD(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)$a(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=JD(v,w)),o.struct.mergeWith(v)||($a(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())$a(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&($a(d,o.struct,o.offset),o=null),XD(d);const p=r.map(m=>AD(m)),g=TD(p);return wp(u,g),u.toUint8Array()},Jw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Qr(),s.written=0)},$a=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Jw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},XD=s=>{Jw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Kh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Kh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Kh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(WS);const i=this.target,r=Oi(),l=Oi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const ZD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{CD(`Invalid access: Add Yjs type to a document before reading data.`)},Xw=80;let Ep=0;class WD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ep++}}const PD=s=>{s.timestamp=Ep++},Zw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=Ep++},tM=(s,t,i)=>{if(s.length>=Xw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>ac(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&ac(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Yr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;vs(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=$S(),this._dEH=$S(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){YS(this._eH,t)}observeDeep(t){YS(this._dEH,t)}unobserve(t){QS(this._eH,t)}unobserveDeep(t){QS(this._dEH,t)}toJSON(){}}const Ww=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Pw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return gl(s,(r,l)=>{i.push(t(r,l,s))}),i},eM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},eb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Di(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new El(new Uint8Array(y))),l.integrate(s,0);break;case Jr:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Cl(y)),l.integrate(s,0);break;default:if(y instanceof Oe)l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},nb=()=>Vn(`Length exceeded!`),sb=(s,t,i,r)=>{if(i>t._length)throw nb();if(i===0)return t._searchMarker&&pl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},ib=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw nb();t._searchMarker&&pl(t._searchMarker,l,-o+r)},Rc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Cp=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new El(r);break;case Jr:d=new Cl(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},xp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},rb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},sM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Tr(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Xo=s=>(s.doc??ke(),xD(s._map.entries(),t=>!t[1].deleted));class iM extends Xc{}class jr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new jr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new jr}clone(){const t=new jr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new iM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{nM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return eb(this,t)}toArray(){return Pw(this)}slice(t=0,i=this.length){return Ww(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return tb(this,t)}forEach(t){gl(this,t)}[Symbol.iterator](){return eM(this)}_write(t){t.writeTypeRef(RM)}}const rM=s=>new jr;class aM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Vr extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Vr}clone(){const t=new Vr;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new aM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Oe?l.toJSON():l}}),t}get size(){return[...Xo(this)].length}keys(){return Jh(Xo(this),t=>t[0])}values(){return Jh(Xo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Jh(Xo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return xp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Rc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const lM=s=>new Vr,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&xR(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case pe:this.right.deleted||Xr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const PS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case pe:t.right.deleted||Xr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return PS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return PS(s,u,i)}},lb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Xr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ob=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},cb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Zh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l),p=r.constructor===String?new $n(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&pl(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),lb(s,t,i,d)},tv=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new $n(p)),i.right.integrate(s,0),i.forward()}lb(s,t,i,d)},ub=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case pe:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Xr(l,g);break}}}t=t.right}return d},oM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},cM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=_d(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case pe:Xr(u,l.content);break;default:t+=ub(i,r,l,o,u),o=_d(u),r=l;break}l=l.right}}),t},uM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&Qw(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Iw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===pe?t.add(o):oM(r,l)});for(const l of t)cM(l)})},ev=(s,t,i)=>{const r=i,l=_d(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case $n:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},CR(p)||(b.attributes=wR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case $n:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Xr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Gr extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Gr}clone(){const t=new Gr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new fM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===$n&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Tr(p,t)||i!==void 0&&Tr(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Tr(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Tr(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Tr(p,t)&&(g(),Xr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{ev(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new Gr;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),gl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){gl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class $r extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return gl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new $r(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Vr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class El{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new El(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new El(s.readBuf());class yl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new yl(this.len)}splice(t){const i=new yl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new yl(s.readLen()),fb=(s,t)=>new Jr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Cl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Cl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new Cl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===zr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===zr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new yl(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ll);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===zr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),kr(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Qr();At(l,r);for(let o=0;o{const r=Hr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class uc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Qr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Hr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Hr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(sv.Provider,{value:{scoresDB:l},children:t}):F.jsx(sv.Provider,{value:null,children:t})}const Yt=14,FM=30,JM=25,iv=120,XM=1500,Wo=.5,ZM=1,Ya=8,rv=14,Ft={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const xr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),et=W.useRef({x:0,y:0,stunnedUntil:0}),nt=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(nt/g*100),[nt,g]),Kt=W.useMemo(()=>{const st=new Map;return m.forEach(P=>{st.set(P.owner,(st.get(P.owner)||0)+1)}),st},[m]),ht=W.useMemo(()=>{let st=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>st&&(st=Mt,P=kt)}),!P||st===0)return null;const dt=Math.round(st/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const st=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);et.current={x:st,y:P,stunnedUntil:0},E({x:st,y:P});const dt=Ci(t);dt.set(l,{x:st,y:P,name:o,color:u});const pt=fc(t);return t.transact(()=>{pt.set(`${st},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const st=fc(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Wo*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return st.observe(P),P(),()=>st.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const st=Ci(t),P=()=>{b(td(t,l))};return st.observe(P),P(),()=>st.unobserve(P)},[t,l]),W.useEffect(()=>{const st=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,st),st(),()=>i.off(`change`,st)},[i,t,l,o]),W.useEffect(()=>{const st=new Set,P=pt=>{if(pt.key in xr){pt.preventDefault();const Mt=!J.current;st.add(pt.key),J.current=xr[pt.key],Mt&&Q.current?.(xr[pt.key])}},dt=pt=>{if(st.delete(pt.key),pt.key in xr){let Mt=!1;for(const kt of st)if(kt in xr){J.current=xr[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((st,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?Q.current?.({dx:Qn>0?1:-1,dy:0}):Q.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(st=>{st.preventDefault();const P=st.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(st=>{if(st.preventDefault(),!q.current)return;const P=st.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),Q=W.useRef(void 0),ot=W.useCallback(st=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=st.clientX,dt.y=st.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Yt-.5,te=Mt.y/Yt-.5,Cn=et.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?Q.current?.({dx:Ue>0?1:-1,dy:0}):Q.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const st=dt=>{const pt=et.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const _l=Ci(t);_l.set(_n,{...Li,stunnedUntil:xs}),_l.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=fc(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const xl=e2(l,Qn,d,p,Re);xl.length>0&&t.transact(()=>{for(const _n of xl)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};Q.current=st;const P=setInterval(()=>{const dt=J.current;dt&&st(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Yt,Dt=p*Yt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>F.jsxs(F.Fragment,{children:[Array.from({length:d},(st,P)=>F.jsx(`line`,{x1:P*Yt,y1:0,x2:P*Yt,y2:Dt,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(st,P)=>F.jsx(`line`,{x1:0,y1:P*Yt,x2:gt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const st=new Map;return st.set(l,u),v.forEach((P,dt)=>{st.set(dt,P.color)}),st},[l,u,v]);return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Ft.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Ft.accent},children:o}),F.jsx(`span`,{style:{color:Ft.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Ft.accent:Ft.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Ft.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Ft.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Ft.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Ft.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Ft.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Ft.grid,border:`1px solid ${Ft.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Ft.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem(`territory-player-name`);if(s)return s;const t=a2();return localStorage.setItem(`territory-player-name`,t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index 92a842edef..e24b9500f1 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +

From dbb210ba7c8795ddf9ffa7831b7abbf6902cd505 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 10:32:47 +0100 Subject: [PATCH 18/36] =?UTF-8?q?docs:=20update=20territory=20wars=20bundl?= =?UTF-8?q?e=20=E2=80=94=20random=20names,=20rate-limited=20touch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../assets/{index-BoLuCJpH.js => index-rAFM39FO.js} | 2 +- website/public/demos/territory-wars/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename website/public/demos/territory-wars/assets/{index-BoLuCJpH.js => index-rAFM39FO.js} (99%) diff --git a/website/public/demos/territory-wars/assets/index-BoLuCJpH.js b/website/public/demos/territory-wars/assets/index-rAFM39FO.js similarity index 99% rename from website/public/demos/territory-wars/assets/index-BoLuCJpH.js rename to website/public/demos/territory-wars/assets/index-rAFM39FO.js index 4304862d57..3c273dbbfb 100644 --- a/website/public/demos/territory-wars/assets/index-BoLuCJpH.js +++ b/website/public/demos/territory-wars/assets/index-rAFM39FO.js @@ -39,4 +39,4 @@ ${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i .live-dot { animation: blink 1.5s ease-in-out infinite; } @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Ft.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Ft.accent},children:o}),F.jsx(`span`,{style:{color:Ft.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Ft.accent:Ft.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Ft.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Ft.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Ft.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Ft.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Ft.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Ft.grid,border:`1px solid ${Ft.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Ft.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){const s=localStorage.getItem(`territory-player-name`);if(s)return s;const t=a2();return localStorage.setItem(`territory-player-name`,t),t}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); + `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Ft.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Ft.accent},children:o}),F.jsx(`span`,{style:{color:Ft.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Ft.accent:Ft.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Ft.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Ft.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Ft.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Ft.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Ft.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Ft.grid,border:`1px solid ${Ft.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Ft.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index e24b9500f1..14e557eea1 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From 66506138c29beee895f8a3325db10ab52c2e0fd2 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 10:53:06 +0100 Subject: [PATCH 19/36] =?UTF-8?q?docs:=20update=20territory=20wars=20bundl?= =?UTF-8?q?e=20=E2=80=94=20lobby=20subtitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../assets/{index-rAFM39FO.js => index-CV-250Np.js} | 10 +++++----- website/public/demos/territory-wars/index.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename website/public/demos/territory-wars/assets/{index-rAFM39FO.js => index-CV-250Np.js} (96%) diff --git a/website/public/demos/territory-wars/assets/index-rAFM39FO.js b/website/public/demos/territory-wars/assets/index-CV-250Np.js similarity index 96% rename from website/public/demos/territory-wars/assets/index-rAFM39FO.js rename to website/public/demos/territory-wars/assets/index-CV-250Np.js index 3c273dbbfb..f501801d50 100644 --- a/website/public/demos/territory-wars/assets/index-rAFM39FO.js +++ b/website/public/demos/territory-wars/assets/index-CV-250Np.js @@ -5,7 +5,7 @@ `);for(f=c=0;cf||x[c]!==U[f]){var V=` `+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{pt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?dt(a):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return dt(e.type);case 16:return dt(`Lazy`);case 13:return e.child!==n&&n!==null?dt(`Suspense Fallback`):dt(`Suspense`);case 19:return dt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return dt(`Activity`);default:return``}}function te(e){try{var n=``,a=null;do n+=kt(e,a),a=e,e=e.return;while(e);return n}catch(c){return` Error generating stack: `+c.message+` -`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,xl=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,_l=s.unstable_LowPriority,Tp=s.unstable_IdlePriority,yb=s.log,mb=s.unstable_setDisableYieldValue,Zr=null,Xe=null;function _s(e){if(typeof yb==`function`&&mb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Zr,e)}catch{}}var Ze=Math.clz32?Math.clz32:wb,Sb=Math.log,vb=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Tl=256,Al=262144,Ol=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Wr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Pr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&kl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{fu=!1}var As=null,hu=null,zl=null;function Qp(){if(zl)return zl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=aa),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),zl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=kl(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=kl(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,ua=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==kl(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Oo(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ya(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=Gl(k.type,k.key,k.props,null,R.mode,G),ya(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(nt(k)){if(ct=nt(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Zl(k),G);if(k.$$typeof===A)return Ht(R,O,Ql(R,k),G);Wl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ga=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Jl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Vl(e),bg(e,null,a),n}return Kl(e,c,n,a),Vl(e)}function ma(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function Sa(){if(Gu){var e=ir;if(e!==null)throw e}}function va(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ea(e,n,V,rn(e))}else Ea(e,n,c,rn(e))}catch($){Ea(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ea(e,n.next.queue,{},rn())}function cf(){return xe(Ia)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),ma(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ea(e,n,a,c)}function Ea(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Kl(e,n,f,0),qt===null&&ql(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=eo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var Ca={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var _y={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ao(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ao(4194308,4,e,n)},useInsertionEffect:function(e,n){ao(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),po(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return ts(n.type),$t(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,_a(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return $t(n),null}else 2*Re()-c.renderingStartTime>vo&&a!==536870912&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&po(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Ta(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Aa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function go(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(go(e,n,a),e=e.sibling;e!==null;)go(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=No,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}No=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Zr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,Ua(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(Pr(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),Pr(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(Pr(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var _o=null,Sr=null,Hf=!1,To=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,Hf||(Hf=!0,JE())}function Ua(e,n){if(!qf&&To){qf=!0;do for(var a=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Rl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){To=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=_o;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?_o=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||Ua(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Tl=256,Al=262144,Ol=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Wr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Pr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&kl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{fu=!1}var As=null,hu=null,zl=null;function Qp(){if(zl)return zl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=aa),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),zl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=kl(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=kl(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,ua=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==kl(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Oo(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ya(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=Gl(k.type,k.key,k.props,null,R.mode,G),ya(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(nt(k)){if(ct=nt(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Zl(k),G);if(k.$$typeof===A)return Ht(R,O,Ql(R,k),G);Wl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ga=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Jl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Vl(e),bg(e,null,a),n}return Kl(e,c,n,a),Vl(e)}function ma(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function Sa(){if(Gu){var e=ir;if(e!==null)throw e}}function va(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ea(e,n,V,rn(e))}else Ea(e,n,c,rn(e))}catch($){Ea(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ea(e,n.next.queue,{},rn())}function cf(){return xe(Ia)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),ma(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ea(e,n,a,c)}function Ea(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Kl(e,n,f,0),qt===null&&ql(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=eo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var Ca={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var _y={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ao(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ao(4194308,4,e,n)},useInsertionEffect:function(e,n){ao(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),po(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return ts(n.type),$t(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,_a(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return $t(n),null}else 2*Re()-c.renderingStartTime>vo&&a!==536870912&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&po(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Ta(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Aa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function go(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(go(e,n,a),e=e.sibling;e!==null;)go(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=No,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}No=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Zr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,Ua(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(Pr(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),Pr(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(Pr(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var _o=null,Sr=null,Hf=!1,To=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,Hf||(Hf=!0,JE())}function Ua(e,n){if(!qf&&To){qf=!0;do for(var a=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Rl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){To=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=_o;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?_o=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||Ua(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&$m($)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function s0(e,n,a){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),n0.has(f)||(n0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function p1(e){fs.D(e),s0(`dns-prefetch`,e,null)}function g1(e,n){fs.C(e,n),s0(`preconnect`,e,n)}function y1(e,n,a){fs.L(e,n,a);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+cn(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+cn(a.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(Ba(h))||n===`script`&&c.querySelector(La(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function m1(e,n){fs.m(e,n);var a=vr;if(a&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),Te(c,`link`,e),ge(c),a.head.appendChild(c)}}}function S1(e,n,a){fs.S(e,n,a);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Mo(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function v1(e,n){fs.X(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w1(e,n){fs.M(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function i0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(n=wr(a.href),a=Ki(f).hoistableStyles,c=a.get(n),c||(c={type:`style`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=wr(a.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=a.async,a=a.src,typeof a==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(a),a=Ki(f).hoistableScripts,c=a.get(n),c||(c={type:`script`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function r0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,a),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function La(e){return`script[async]`+e}function a0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(a.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),Mo(c,a.precedence,e),n.instance=c;case`stylesheet`:f=wr(a.href);var h=e.querySelector(Ba(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=r0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,Mo(h,a.precedence,e),n.instance=h;case`script`:return h=br(a.src),(f=e.querySelector(La(h)))?(n.instance=f,ge(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Mo(c,a.precedence,e));return n.instance}function Mo(e,n,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function E1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;switch(n.rel){case`stylesheet`:return e=n.disabled,typeof n.precedence==`string`&&e==null;default:return!0}case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function c0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function C1(e,n,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wr(c.href),h=n.querySelector(Ba(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=Uo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ge(h);return}h=n.ownerDocument||n,c=r0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uo.bind(e),n.addEventListener(`load`,a),n.addEventListener(`error`,a))}}var rh=0;function x1(e,n){return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function jo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(_1,e),zo=null,Uo.call(e))}function _1(e,n){if(!(n.state.loading&4)){var a=zo.get(e);if(a)var c=a.get(null);else{a=new Map,zo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=K1(),dh.exports}var G1=V1(),W=jd();const $1=`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`,Y1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0`,Q1=`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,F1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY`,cv=W.createContext(null);function Nd(){const s=W.useContext(cv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function J1(){return $1}function X1(){return Q1}function Z1(){return{Authorization:`Bearer ${Y1}`}}function W1(){return{Authorization:`Bearer ${F1}`}}function P1({children:s}){const t=J1(),i=X1(),r=W.useMemo(()=>Z1(),[]),l=W.useMemo(()=>W1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(cv.Provider,{value:o,children:s})}var Vo={exports:{}},Sh,U0;function tC(){if(U0)return Sh;U0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function eC(){if(z0)return Vo.exports;z0=1;var s=tC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=nt,m=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function L(J,et){var nt=p.get();nt.context=o,nt.release=I,nt.value=J,nt.callback=et||i,nt.errorHandler=v,y>=d||b.paused?g?(nt.next=g,g=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function I(J){J&&p.release(J);var et=g;et&&y<=d?b.paused?y--:(m===g&&(m=null),g=et.next,et.next=null,u.call(o,et.value,et.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Vo.exports=t,Vo.exports.promise=l,Vo.exports}var nC=eC();const uv=z1(nC),Dn=`Stream-Next-Offset`,zc=`Stream-Cursor`,jc=`Stream-Up-To-Date`,qn=`Stream-Closed`,vh=`Stream-Seq`,sC=`Stream-TTL`,iC=`Stream-Expires-At`,j0=`Producer-Id`,Go=`Producer-Epoch`,N0=`Producer-Seq`,rC=`Producer-Expected-Seq`,aC=`Producer-Received-Seq`,wh=`offset`,$o=`live`,lC=`stream-sse-data-encoding`;var ti=class fv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new fv(r,o,u,l,i)}},Bd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class nd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=B0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new nd(d,u,r,l)}static fromFetchError(t){const i=B0(t.status);return new nd(t.message,i,t.status,t.json??t.text)}};function B0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var oC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},hv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},cC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const uC=[429,503],Ld={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function fC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function dv(s,t=Ld){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Bd;if(b instanceof ti&&!uC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?fC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*l,r)}}}}const hC=[201,204,205];function dC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||hC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Bd:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function pC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function gC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function bh(s){return pC(s)||gC(s),s}async function*L0(s,t){const i=s.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` `).replace(/\r/g,` `);const g=l.split(` @@ -26,17 +26,17 @@ Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, Instead, use a query builder function: const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Jt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return F.jsxs(`div`,{style:Ae.container,children:[F.jsx(`style`,{children:` +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Qt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return F.jsxs(`div`,{style:Ae.container,children:[F.jsx(`style`,{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } - `}),F.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),F.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&F.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:F.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[F.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),F.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>F.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:Jt.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Jt.bg,color:Jt.dim,border:`1px solid ${Jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?Jt.accent:Jt.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:Jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Jt.bg,color:Jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Jt.accent,marginBottom:24},card:{background:Jt.card,border:`1px solid ${Jt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Jt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:`8px 10px`,color:Jt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Jt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Jt.accent,border:`1px solid ${Jt.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,ac=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ll=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lol.encode(s),QO=ol?YO:$O;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class wl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Qr=()=>new wl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Yr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),cl=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&ac(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new wl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new wl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const Hr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),qr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(qr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(qr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>nl.decode(je(s)),Ai=nl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-qr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new oc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,fl=Symbol(`Equality`),hw=(s,t)=>s===t||s[fl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},bl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&bl(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fl]!=null)return s[fl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const hl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(hl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(hl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=hl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!hl||process.stdout.isTTY)&&(!hl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` + `}),F.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),F.jsx(`div`,{style:{fontSize:7,color:Qt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),F.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&F.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:F.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[F.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),F.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>F.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Qt.bg,color:Qt.dim,border:`1px solid ${Qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:Qt.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Qt.bg,color:Qt.dim,border:`1px solid ${Qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Qt.bg,border:`1px solid ${Qt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?Qt.accent:Qt.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:Qt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Qt.bg,color:Qt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Qt.accent,marginBottom:6},card:{background:Qt.card,border:`1px solid ${Qt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Qt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Qt.bg,border:`1px solid ${Qt.border}`,padding:`8px 10px`,color:Qt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Qt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Qt.accent,border:`1px solid ${Qt.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,ac=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ll=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lol.encode(s),QO=ol?YO:$O;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class wl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Qr=()=>new wl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Yr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),cl=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&ac(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new wl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new wl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const Hr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),qr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(qr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(qr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>nl.decode(je(s)),Ai=nl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-qr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new oc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,fl=Symbol(`Equality`),hw=(s,t)=>s===t||s[fl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},bl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&bl(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fl]!=null)return s[fl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const hl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(hl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(hl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=hl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!hl||process.stdout.isTTY)&&(!hl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` `)}}const Md=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[fl]?hw(s,t):Lc(s)?ap(s,i=>iw(t,r=>Md(i,r))):vR(s)?bl(s,(i,r)=>Md(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Md(i,r)}equals(t){return this.constructor===t.constructor&&kr(this.shape,t.shape)}[NR](){return!0}[fl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Fr(this,Yc)}get optional(){return new vw(this)}cast(t){return KS(t,this),t}expect(t){return KS(t,this),t}}class pp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new pp(s,t);ue(pp);class gp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new gp(s);ue(gp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Vc=(...s)=>new Kc(s),mw=ue(Kc),LR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Sw=s=>{if(Kr.check(s))return[LR(s)];if(mw.check(s))return s.shape.map(t=>t+``);if(Ow.check(s))return[`[+-]?\\d+.?\\d*`];if(Rw.check(s))return[`.*`];if(xc.check(s))return s.shape.map(Sw).flat(1);bn()};class IR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Sw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(IR);const HR=Symbol(`optional`);class vw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[HR](){return!0}}const qR=ue(vw);class KR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(KR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):bl(this.shape,(r,l)=>{const o=this._isPartial&&!fp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const VR=s=>new Gc(s),GR=ue(Gc),$R=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class ww extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&bl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const bw=(s,t)=>new ww(s,t),YR=ue(ww);class Ew extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&bl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const QR=(...s)=>new Ew(s);ue(Ew);class Cw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new yp(t)}check(t,i){const r=Lc(t)&&ap(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const xw=(...s)=>new Cw(s),FR=ue(Cw),JR=be(s=>Lc(s));class _w extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const XR=(s,t=null)=>new _w(s,t);ue(_w);const ZR=XR(Ie);class WR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=QR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const PR=ue(WR),tD=be(s=>typeof s==`function`);class eD extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(eD,s=>s.shape.length>0);class yp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=iw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Fr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Fr(...s.map(t=>dl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new yp(s),xc=ue(yp),Tw=()=>!0,_c=be(Tw),nD=ue(gp,s=>s.shape===Tw),mp=be(s=>typeof s==`bigint`),sD=be(s=>s===mp),Aw=be(s=>typeof s==`symbol`);be(s=>s===Aw);const Ur=be(s=>typeof s==`number`),Ow=be(s=>s===Ur),Kr=be(s=>typeof s==`string`),Rw=be(s=>s===Kr),$c=be(s=>typeof s==`boolean`),iD=be(s=>s===$c),Dw=Vc(void 0);ue(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),rD=ue(Kc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(pp,s=>s.shape===Uint8Array);const aD=Fr(Ur,Kr,Yc,Dw,mp,$c,Aw);(()=>{const s=xw(_c),t=bw(Kr,_c),i=Fr(Ur,Kr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const dl=s=>{if(ZR.check(s))return s;if($R.check(s)){const t={};for(const i in s)t[i]=dl(s[i]);return VR(t)}else{if(JR.check(s))return Fr(...s.map(dl));if(aD.check(s))return Vc(s);if(tD.check(s))return ue(s)}bn()},KS=OR?()=>{}:(s,t)=>{const i=new BR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. ${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:dl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew lD(s),Mw=oD(_c).if(Ow,(s,t)=>Qh(t,kS,wc)).if(Rw,(s,t)=>jR(t)).if(iD,(s,t)=>qS(t)).if(sD,(s,t)=>BigInt(Qh(t,kS,wc))).if(xc,(s,t)=>Cr(t,Fh(t,s.shape))).if(GR,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(qR.check(l)){if(qS(t))continue;l=l.shape}i[r]=Mw(l,t)}return i}).if(FR,(s,t)=>{const i=[],r=yw(t,0,42);for(let l=0;lFh(t,s.shape)).if(rD,(s,t)=>null).if(PR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(nD,(s,t)=>Cr(t,Fh(t,[Ur,Kr,Yc,Dw,mp,$c,xw(Ur),bw(Fr(`a`,`b`,`c`),Ur)]))).if(YR,(s,t)=>{const i={},r=Qh(t,0,3);for(let l=0;lMw(dl(t),s),Qc=typeof document<`u`?document:{};be(s=>s.nodeType===dD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===uD);be(s=>s.nodeType===fD);const cD=s=>UO(s,(t,i)=>`${i}:${t};`).join(``),uD=Qc.ELEMENT_NODE,fD=Qc.TEXT_NODE,hD=Qc.DOCUMENT_NODE,dD=Qc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===hD);const ws=Symbol,kw=ws(),Uw=ws(),pD=ws(),gD=ws(),yD=ws(),zw=ws(),mD=ws(),Sp=ws(),SD=ws(),vD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...jw(s)),Nw.forEach(t=>t.print(s))},CD=(...s)=>{console.warn(...jw(s)),s.unshift(Sp),Nw.forEach(t=>t.print(s))},Nw=Oi(),Bw=s=>({[Symbol.iterator](){return this},next:s}),xD=(s,t)=>Bw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Jh=(s,t)=>Bw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Lw{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Iw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=kn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&_D(i,t.clock)!==null},vp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Yr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new Lw(i,r))},wp=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const l=r.length;At(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return At(o.restEncoder,0),wp(o,r),o.toUint8Array()}return null},qw=uw;class Jr extends rw{constructor({guid:t=gR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=qw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new $w,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=IS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>IS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Oe&&l!==i)if(l===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,jr)}getText(t=``){return this.get(t,Gr)}getMap(t=``){return this.get(t,Vr)}getXmlElement(t=``){return this.get(t,$r)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Jr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class OD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class RD extends OD{readLeftID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return qr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return ul(this.restDecoder)}readBuf(){return kR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class DD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DD{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new Yh(je(t)),this.clientDecoder=new oc(je(t)),this.leftClockDecoder=new Yh(je(t)),this.rightClockDecoder=new Yh(je(t)),this.infoDecoder=new LS(je(t),qr),this.stringDecoder=new hR(je(t)),this.parentInfoDecoder=new LS(je(t),qr),this.typeRefDecoder=new oc(je(t)),this.lenDecoder=new oc(je(t))}readLeftID(){return new zr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new zr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ul(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ul(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Yr(r,t[0].id.clock);const l=Gn(t,r);At(s.restEncoder,t.length-l),s.writeClient(i),At(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zD(s,t.clients.get(l),l,o)})},jD=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=ni(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new $w,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Jc;return Kw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},BD=(s,t)=>Kw(s,t.doc.store,t.beforeState),LD=(s,t,i,r=new Ac(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=jD(r,u),g=ND(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=ZS([m.update,g.update])}}else d.pendingStructs=g;const y=VS(r,l,d);if(d.pendingDs){const v=new Ac(Hr(d.pendingDs));wt(v.restDecoder);const b=VS(v,l,d);y&&b?d.pendingDs=ZS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,Vw(l.doc,v)}},i,!1),Vw=(s,t,i,r=Ac)=>{const l=Hr(t);LD(l,s,i,new r(l))},GS=(s,t,i)=>Vw(s,t,i,RD);class ID{constructor(){this.l=[]}}const $S=()=>new ID,YS=(s,t)=>s.l.push(t),QS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>hp(s.l,[t,i]);class zr{constructor(t,i){this.client=t,this.clock=i}}const Jo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new zr(s,t),HD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Tr=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Hw(t.ds,s.id),kd=(s,t)=>{const i=vs(s.meta,kd,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class $w{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Yw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Gn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Gn(i,t.clock)]},Xh=qD,Ud=(s,t,i)=>{const r=Gn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[Ud(s,i,t.clock)]},FS=(s,t,i)=>{const r=t.clients.get(i.client),l=Gn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Uc(s,o,i.clock-o.id.clock+1)),o},KD=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Gn(r,t.id.clock)]=i},Qw=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ud(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(vp(t.deleteSet),BD(s,t),wp(s,t.deleteSet),!0),XS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},cc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},GD=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Gn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=aw(l.length-1,1+Gn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+cc(l,p)}})},Fw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Gw(g._dEH,p,i))})}),d.push(()=>r.emit(`afterTransaction`,[i,r])),hp(d,[]),i._needFormattingCleanup&&uM(i)}finally{r.gc&&GD(o,l,r.gcFilter),$D(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Yr(Gn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+cc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Gn(b,v);w+11||w>0&&cc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(ED(Sp,kw,`[yjs] `,Uw,zw,`Changed the client-id because another client seems to be using it.`),r.clientID=qw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new kD;JS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Jc;JS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Fw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new VD(s,i,r),l.push(s._transaction),l.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Fw(l,0)}}return u};function*YD(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new de(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},ZS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Hr(m)));let l=r.map(m=>new QD(m,!0)),o=null;const u=new i,d=new FD(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)$a(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=JD(v,w)),o.struct.mergeWith(v)||($a(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())$a(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&($a(d,o.struct,o.offset),o=null),XD(d);const p=r.map(m=>AD(m)),g=TD(p);return wp(u,g),u.toUint8Array()},Jw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Qr(),s.written=0)},$a=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Jw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},XD=s=>{Jw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Kh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Kh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Kh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(WS);const i=this.target,r=Oi(),l=Oi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const ZD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{CD(`Invalid access: Add Yjs type to a document before reading data.`)},Xw=80;let Ep=0;class WD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ep++}}const PD=s=>{s.timestamp=Ep++},Zw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=Ep++},tM=(s,t,i)=>{if(s.length>=Xw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>ac(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&ac(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Yr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;vs(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=$S(),this._dEH=$S(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){YS(this._eH,t)}observeDeep(t){YS(this._dEH,t)}unobserve(t){QS(this._eH,t)}unobserveDeep(t){QS(this._dEH,t)}toJSON(){}}const Ww=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Pw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return gl(s,(r,l)=>{i.push(t(r,l,s))}),i},eM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},eb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Di(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new El(new Uint8Array(y))),l.integrate(s,0);break;case Jr:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Cl(y)),l.integrate(s,0);break;default:if(y instanceof Oe)l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},nb=()=>Vn(`Length exceeded!`),sb=(s,t,i,r)=>{if(i>t._length)throw nb();if(i===0)return t._searchMarker&&pl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},ib=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw nb();t._searchMarker&&pl(t._searchMarker,l,-o+r)},Rc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Cp=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new El(r);break;case Jr:d=new Cl(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},xp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},rb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},sM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Tr(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Xo=s=>(s.doc??ke(),xD(s._map.entries(),t=>!t[1].deleted));class iM extends Xc{}class jr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new jr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new jr}clone(){const t=new jr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new iM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{nM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return eb(this,t)}toArray(){return Pw(this)}slice(t=0,i=this.length){return Ww(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return tb(this,t)}forEach(t){gl(this,t)}[Symbol.iterator](){return eM(this)}_write(t){t.writeTypeRef(RM)}}const rM=s=>new jr;class aM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Vr extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Vr}clone(){const t=new Vr;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new aM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Oe?l.toJSON():l}}),t}get size(){return[...Xo(this)].length}keys(){return Jh(Xo(this),t=>t[0])}values(){return Jh(Xo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Jh(Xo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return xp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Rc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const lM=s=>new Vr,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&xR(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case pe:this.right.deleted||Xr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const PS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case pe:t.right.deleted||Xr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return PS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return PS(s,u,i)}},lb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Xr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ob=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},cb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Zh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l),p=r.constructor===String?new $n(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&pl(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),lb(s,t,i,d)},tv=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` `;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new $n(p)),i.right.integrate(s,0),i.forward()}lb(s,t,i,d)},ub=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case pe:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Xr(l,g);break}}}t=t.right}return d},oM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},cM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=_d(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case pe:Xr(u,l.content);break;default:t+=ub(i,r,l,o,u),o=_d(u),r=l;break}l=l.right}}),t},uM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&Qw(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Iw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===pe?t.add(o):oM(r,l)});for(const l of t)cM(l)})},ev=(s,t,i)=>{const r=i,l=_d(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case $n:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},CR(p)||(b.attributes=wR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case $n:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Xr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Gr extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Gr}clone(){const t=new Gr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new fM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===$n&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Tr(p,t)||i!==void 0&&Tr(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Tr(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Tr(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Tr(p,t)&&(g(),Xr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{ev(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new Gr;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),gl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){gl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class $r extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return gl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new $r(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Vr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class El{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new El(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new El(s.readBuf());class yl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new yl(this.len)}splice(t){const i=new yl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new yl(s.readLen()),fb=(s,t)=>new Jr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Cl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Cl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new Cl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===zr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===zr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new yl(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ll);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===zr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),kr(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Qr();At(l,r);for(let o=0;o{const r=Hr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class uc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Qr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Hr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Hr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(sv.Provider,{value:{scoresDB:l},children:t}):F.jsx(sv.Provider,{value:null,children:t})}const Yt=14,FM=30,JM=25,iv=120,XM=1500,Wo=.5,ZM=1,Ya=8,rv=14,Ft={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const xr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),et=W.useRef({x:0,y:0,stunnedUntil:0}),nt=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(nt/g*100),[nt,g]),Kt=W.useMemo(()=>{const st=new Map;return m.forEach(P=>{st.set(P.owner,(st.get(P.owner)||0)+1)}),st},[m]),ht=W.useMemo(()=>{let st=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>st&&(st=Mt,P=kt)}),!P||st===0)return null;const dt=Math.round(st/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const st=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);et.current={x:st,y:P,stunnedUntil:0},E({x:st,y:P});const dt=Ci(t);dt.set(l,{x:st,y:P,name:o,color:u});const pt=fc(t);return t.transact(()=>{pt.set(`${st},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const st=fc(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Wo*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return st.observe(P),P(),()=>st.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const st=Ci(t),P=()=>{b(td(t,l))};return st.observe(P),P(),()=>st.unobserve(P)},[t,l]),W.useEffect(()=>{const st=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,st),st(),()=>i.off(`change`,st)},[i,t,l,o]),W.useEffect(()=>{const st=new Set,P=pt=>{if(pt.key in xr){pt.preventDefault();const Mt=!J.current;st.add(pt.key),J.current=xr[pt.key],Mt&&Q.current?.(xr[pt.key])}},dt=pt=>{if(st.delete(pt.key),pt.key in xr){let Mt=!1;for(const kt of st)if(kt in xr){J.current=xr[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((st,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?Q.current?.({dx:Qn>0?1:-1,dy:0}):Q.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(st=>{st.preventDefault();const P=st.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(st=>{if(st.preventDefault(),!q.current)return;const P=st.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),Q=W.useRef(void 0),ot=W.useCallback(st=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=st.clientX,dt.y=st.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Yt-.5,te=Mt.y/Yt-.5,Cn=et.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?Q.current?.({dx:Ue>0?1:-1,dy:0}):Q.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const st=dt=>{const pt=et.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const _l=Ci(t);_l.set(_n,{...Li,stunnedUntil:xs}),_l.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=fc(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const xl=e2(l,Qn,d,p,Re);xl.length>0&&t.transact(()=>{for(const _n of xl)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};Q.current=st;const P=setInterval(()=>{const dt=J.current;dt&&st(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Yt,Dt=p*Yt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>F.jsxs(F.Fragment,{children:[Array.from({length:d},(st,P)=>F.jsx(`line`,{x1:P*Yt,y1:0,x2:P*Yt,y2:Dt,stroke:Ft.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(st,P)=>F.jsx(`line`,{x1:0,y1:P*Yt,x2:gt,y2:P*Yt,stroke:Ft.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const st=new Map;return st.set(l,u),v.forEach((P,dt)=>{st.set(dt,P.color)}),st},[l,u,v]);return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` +`?u.insert.slice(0,-1):u.insert;(typeof d!=`string`||d.length>0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Tr(p,t)||i!==void 0&&Tr(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Tr(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Tr(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Tr(p,t)&&(g(),Xr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{ev(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new Gr;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),gl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){gl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class $r extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return gl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new $r(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Vr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class El{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new El(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new El(s.readBuf());class yl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new yl(this.len)}splice(t){const i=new yl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new yl(s.readLen()),fb=(s,t)=>new Jr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Cl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Cl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new Cl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===zr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===zr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new yl(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ll);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===zr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),kr(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Qr();At(l,r);for(let o=0;o{const r=Hr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class uc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Qr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Hr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Hr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(sv.Provider,{value:{scoresDB:l},children:t}):F.jsx(sv.Provider,{value:null,children:t})}const Yt=14,FM=30,JM=25,iv=120,XM=1500,Wo=.5,ZM=1,Ya=8,rv=14,Jt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const xr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),et=W.useRef({x:0,y:0,stunnedUntil:0}),nt=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(nt/g*100),[nt,g]),Kt=W.useMemo(()=>{const st=new Map;return m.forEach(P=>{st.set(P.owner,(st.get(P.owner)||0)+1)}),st},[m]),ht=W.useMemo(()=>{let st=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>st&&(st=Mt,P=kt)}),!P||st===0)return null;const dt=Math.round(st/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const st=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);et.current={x:st,y:P,stunnedUntil:0},E({x:st,y:P});const dt=Ci(t);dt.set(l,{x:st,y:P,name:o,color:u});const pt=fc(t);return t.transact(()=>{pt.set(`${st},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const st=fc(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Wo*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return st.observe(P),P(),()=>st.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const st=Ci(t),P=()=>{b(td(t,l))};return st.observe(P),P(),()=>st.unobserve(P)},[t,l]),W.useEffect(()=>{const st=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,st),st(),()=>i.off(`change`,st)},[i,t,l,o]),W.useEffect(()=>{const st=new Set,P=pt=>{if(pt.key in xr){pt.preventDefault();const Mt=!J.current;st.add(pt.key),J.current=xr[pt.key],Mt&&Q.current?.(xr[pt.key])}},dt=pt=>{if(st.delete(pt.key),pt.key in xr){let Mt=!1;for(const kt of st)if(kt in xr){J.current=xr[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((st,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?Q.current?.({dx:Qn>0?1:-1,dy:0}):Q.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(st=>{st.preventDefault();const P=st.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(st=>{if(st.preventDefault(),!q.current)return;const P=st.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),Q=W.useRef(void 0),ot=W.useCallback(st=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=st.clientX,dt.y=st.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Yt-.5,te=Mt.y/Yt-.5,Cn=et.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?Q.current?.({dx:Ue>0?1:-1,dy:0}):Q.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const st=dt=>{const pt=et.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const _l=Ci(t);_l.set(_n,{...Li,stunnedUntil:xs}),_l.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=fc(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const xl=e2(l,Qn,d,p,Re);xl.length>0&&t.transact(()=>{for(const _n of xl)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};Q.current=st;const P=setInterval(()=>{const dt=J.current;dt&&st(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Yt,Dt=p*Yt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>F.jsxs(F.Fragment,{children:[Array.from({length:d},(st,P)=>F.jsx(`line`,{x1:P*Yt,y1:0,x2:P*Yt,y2:Dt,stroke:Jt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(st,P)=>F.jsx(`line`,{x1:0,y1:P*Yt,x2:gt,y2:P*Yt,stroke:Jt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const st=new Map;return st.set(l,u),v.forEach((P,dt)=>{st.set(dt,P.color)}),st},[l,u,v]);return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Jt.bg,color:Jt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } .live-dot { animation: blink 1.5s ease-in-out infinite; } @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Ft.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Ft.accent},children:o}),F.jsx(`span`,{style:{color:Ft.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Ft.accent:Ft.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Ft.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Ft.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Ft.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Ft.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Ft.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Ft.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Ft.grid,border:`1px solid ${Ft.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Ft.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); + `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Jt.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Jt.accent},children:o}),F.jsx(`span`,{style:{color:Jt.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Jt.accent:Jt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Jt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Jt.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Jt.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Jt.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Jt.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Jt.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Jt.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Jt.grid,border:`1px solid ${Jt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Jt.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index 14e557eea1..6e9f01a6b2 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From 9269f373547901672ea8afb9a2531aece79571cc Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 11:05:21 +0100 Subject: [PATCH 20/36] =?UTF-8?q?docs:=20demo=20section=20=E2=80=94=20focu?= =?UTF-8?q?s=20on=20Electric=20Cloud,=20not=20game=20mechanics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index aa9740ac79..7f0a12c781 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -42,13 +42,13 @@ For the full details, see the [Yjs Durable Streams Protocol](https://github.com/ ## Demo -Multiplayer territory game running on Yjs Durable Streams on Electric Cloud. Claim cells, encircle areas, compete in real time. +This demo runs live on Electric Cloud. Open it in multiple tabs or share the room link to play with others — all state syncs in real time over Durable Streams. Also works on mobile. ## Get started -Create a Yjs document with awareness and point it at your endpoint: +Here's how to set up a collaborative text editor. Create a Yjs document with awareness and point it at your endpoint: ```typescript import { YjsProvider } from '@durable-streams/y-durable-streams' From 8dec0a38d1141b2b31780420fc524295f28b880e Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 11:10:43 +0100 Subject: [PATCH 21/36] docs: rematch button, mobile-friendly demo text, rebuilt bundle Co-Authored-By: Claude Opus 4.6 (1M context) --- ...5-yjs-durable-streams-on-electric-cloud.md | 2 +- .../{index-CV-250Np.js => index-CeLYWEfe.js} | 32 +++++++++---------- .../public/demos/territory-wars/index.html | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) rename website/public/demos/territory-wars/assets/{index-CV-250Np.js => index-CeLYWEfe.js} (85%) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 7f0a12c781..e8b3753e35 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -42,7 +42,7 @@ For the full details, see the [Yjs Durable Streams Protocol](https://github.com/ ## Demo -This demo runs live on Electric Cloud. Open it in multiple tabs or share the room link to play with others — all state syncs in real time over Durable Streams. Also works on mobile. +This demo runs live on Electric Cloud. Open it in multiple tabs, share the room link, or try it on your phone — all state syncs in real time over Durable Streams. diff --git a/website/public/demos/territory-wars/assets/index-CV-250Np.js b/website/public/demos/territory-wars/assets/index-CeLYWEfe.js similarity index 85% rename from website/public/demos/territory-wars/assets/index-CV-250Np.js rename to website/public/demos/territory-wars/assets/index-CeLYWEfe.js index f501801d50..083c8d7710 100644 --- a/website/public/demos/territory-wars/assets/index-CV-250Np.js +++ b/website/public/demos/territory-wars/assets/index-CeLYWEfe.js @@ -1,42 +1,42 @@ -(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var hh={exports:{}},Va={};var C0;function j1(){if(C0)return Va;C0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var x0;function N1(){return x0||(x0=1,hh.exports=j1()),hh.exports}var F=N1(),dh={exports:{}},Ga={},ph={exports:{}},gh={};var _0;function B1(){return _0||(_0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ut=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],Q=H+1,ot=M[Q];if(0>l(Y,Z))Ql(ot,Y)?(M[at]=ot,M[Q]=Z,at=Q):(M[at]=Y,M[H]=Z,at=H);else if(Ql(ot,Z))M[at]=ot,M[Q]=Z,at=Q;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,nt());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at==`function`){y.callback=null,v=y.priorityLevel;var ut=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ut==`function`){y.callback=ut,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?nt():I=!1}}}var nt;if(typeof A==`function`)nt=function(){A(et)};else if(typeof MessageChannel<`u`){var Ct=new MessageChannel,Kt=Ct.port2;Ct.port1.onmessage=et,nt=function(){Kt.postMessage(null)}}else nt=function(){N(et,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-at))):(M.sortIndex=ut,t(p,M),w||b||(w=!0,I||(I=!0,nt()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var T0;function L1(){return T0||(T0=1,ph.exports=B1()),ph.exports}var yh={exports:{}},yt={};var A0;function I1(){if(A0)return yt;A0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var Q=Y.ref;return{$$typeof:s,type:_,key:H,ref:Q!==void 0?Q:null,props:Y}}function J(_,H){return tt(_.type,H,_.props)}function et(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function nt(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var Ct=/\/+/g;function Kt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?nt(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,Q,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var gt=!1;if(_===null)gt=!0;else switch(it){case`bigint`:case`string`:case`number`:gt=!0;break;case`object`:switch(_.$$typeof){case s:case t:gt=!0;break;case m:return gt=_._init,M(gt(_._payload),H,Y,Q,ot)}}if(gt)return ot=ot(_),gt=Q===``?`.`+Kt(_,0):Q,L(ot)?(Y=``,gt!=null&&(Y=gt.replace(Ct,`$&/`)+`/`),M(ot,H,Y,``,function(ln){return ln})):ot!=null&&(et(ot)&&(ot=J(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(Ct,`$&/`)+`/`)+gt)),H.push(ot)),1;gt=0;var Dt=Q===``?`.`:Q+`:`;if(L(_))for(var vt=0;vt<_.length;vt++)Q=_[vt],it=Dt+Kt(Q,vt),gt+=M(Q,H,Y,it,ot);else if(vt=b(_),typeof vt==`function`)for(_=vt.call(_),vt=0;!(Q=_.next()).done;)Q=Q.value,it=Dt+Kt(Q,vt++),gt+=M(Q,H,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,Q,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return gt}function q(_,H,Y){if(_==null)return _;var Q=[],ot=0;return M(_,Q,``,``,function(it){return H.call(Y,it,ot++)}),Q}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!et(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return yt.Activity=y,yt.Children=ut,yt.Component=N,yt.Fragment=i,yt.Profiler=l,yt.PureComponent=A,yt.StrictMode=r,yt.Suspense=p,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,yt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},yt.cache=function(_){return function(){return _.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var Q=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(Q[it]=H[it]);var it=arguments.length-2;if(it===1)Q.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=H1(),mh.exports}var M0;function K1(){if(M0)return Ga;M0=1;var s=L1(),t=jd(),i=q1();function r(e){var n=`https://react.dev/errors/`+e;if(1ut||(e.current=at[ut],at[ut]=null,ut--)}function Y(e,n){ut++,at[ut]=e.current,e.current=n}var Q=_(null),ot=_(null),it=_(null),gt=_(null);function Dt(e,n){switch(Y(it,n),Y(ot,e),Y(Q,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ym(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ym(n),e=Qm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(Q),Y(Q,e)}function vt(){H(Q),H(ot),H(it)}function ln(e){e.memoizedState!==null&&Y(gt,e);var n=Q.current,a=Qm(n,e.type);n!==a&&(Y(ot,e),Y(Q,a))}function Es(e){ot.current===e&&(H(Q),H(ot)),gt.current===e&&(H(gt),Ia._currentValue=Z)}var st,P;function dt(e){if(st===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);st=n&&n[1]||``,P=-1{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var hh={exports:{}},Ga={};var C0;function j1(){if(C0)return Ga;C0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Ga.Fragment=t,Ga.jsx=i,Ga.jsxs=i,Ga}var x0;function N1(){return x0||(x0=1,hh.exports=j1()),hh.exports}var Q=N1(),dh={exports:{}},$a={},ph={exports:{}},gh={};var _0;function B1(){return _0||(_0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ut=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],F=H+1,ot=M[F];if(0>l(Y,Z))Fl(ot,Y)?(M[at]=ot,M[F]=Z,at=F):(M[at]=Y,M[H]=Z,at=H);else if(Fl(ot,Z))M[at]=ot,M[F]=Z,at=F;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,st());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at==`function`){y.callback=null,v=y.priorityLevel;var ut=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ut==`function`){y.callback=ut,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?st():I=!1}}}var st;if(typeof A==`function`)st=function(){A(nt)};else if(typeof MessageChannel<`u`){var Ct=new MessageChannel,Kt=Ct.port2;Ct.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){N(nt,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-at))):(M.sortIndex=ut,t(p,M),w||b||(w=!0,I||(I=!0,st()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var T0;function L1(){return T0||(T0=1,ph.exports=B1()),ph.exports}var yh={exports:{}},yt={};var A0;function I1(){if(A0)return yt;A0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var F=Y.ref;return{$$typeof:s,type:_,key:H,ref:F!==void 0?F:null,props:Y}}function J(_,H){return tt(_.type,H,_.props)}function nt(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function st(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var Ct=/\/+/g;function Kt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?st(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,F,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var gt=!1;if(_===null)gt=!0;else switch(it){case`bigint`:case`string`:case`number`:gt=!0;break;case`object`:switch(_.$$typeof){case s:case t:gt=!0;break;case m:return gt=_._init,M(gt(_._payload),H,Y,F,ot)}}if(gt)return ot=ot(_),gt=F===``?`.`+Kt(_,0):F,L(ot)?(Y=``,gt!=null&&(Y=gt.replace(Ct,`$&/`)+`/`),M(ot,H,Y,``,function(ln){return ln})):ot!=null&&(nt(ot)&&(ot=J(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(Ct,`$&/`)+`/`)+gt)),H.push(ot)),1;gt=0;var Dt=F===``?`.`:F+`:`;if(L(_))for(var vt=0;vt<_.length;vt++)F=_[vt],it=Dt+Kt(F,vt),gt+=M(F,H,Y,it,ot);else if(vt=b(_),typeof vt==`function`)for(_=vt.call(_),vt=0;!(F=_.next()).done;)F=F.value,it=Dt+Kt(F,vt++),gt+=M(F,H,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,F,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return gt}function q(_,H,Y){if(_==null)return _;var F=[],ot=0;return M(_,F,``,``,function(it){return H.call(Y,it,ot++)}),F}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!nt(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return yt.Activity=y,yt.Children=ut,yt.Component=N,yt.Fragment=i,yt.Profiler=l,yt.PureComponent=A,yt.StrictMode=r,yt.Suspense=p,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,yt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},yt.cache=function(_){return function(){return _.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var F=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(F[it]=H[it]);var it=arguments.length-2;if(it===1)F.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=H1(),mh.exports}var M0;function K1(){if(M0)return $a;M0=1;var s=L1(),t=jd(),i=q1();function r(e){var n=`https://react.dev/errors/`+e;if(1ut||(e.current=at[ut],at[ut]=null,ut--)}function Y(e,n){ut++,at[ut]=e.current,e.current=n}var F=_(null),ot=_(null),it=_(null),gt=_(null);function Dt(e,n){switch(Y(it,n),Y(ot,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ym(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ym(n),e=Qm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(F),Y(F,e)}function vt(){H(F),H(ot),H(it)}function ln(e){e.memoizedState!==null&&Y(gt,e);var n=F.current,a=Qm(n,e.type);n!==a&&(Y(ot,e),Y(F,a))}function Es(e){ot.current===e&&(H(F),H(ot)),gt.current===e&&(H(gt),Ha._currentValue=Z)}var et,P;function dt(e){if(et===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);et=n&&n[1]||``,P=-1)`:-1f||x[c]!==U[f]){var V=` `+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{pt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?dt(a):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return dt(e.type);case 16:return dt(`Lazy`);case 13:return e.child!==n&&n!==null?dt(`Suspense Fallback`):dt(`Suspense`);case 19:return dt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return dt(`Activity`);default:return``}}function te(e){try{var n=``,a=null;do n+=kt(e,a),a=e,e=e.return;while(e);return n}catch(c){return` Error generating stack: `+c.message+` -`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,xl=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,_l=s.unstable_LowPriority,Tp=s.unstable_IdlePriority,yb=s.log,mb=s.unstable_setDisableYieldValue,Zr=null,Xe=null;function _s(e){if(typeof yb==`function`&&mb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Zr,e)}catch{}}var Ze=Math.clz32?Math.clz32:wb,Sb=Math.log,vb=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Tl=256,Al=262144,Ol=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Wr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Pr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&kl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{fu=!1}var As=null,hu=null,zl=null;function Qp(){if(zl)return zl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=aa),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),zl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=kl(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=kl(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,ua=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==kl(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Oo(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ya(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=Gl(k.type,k.key,k.props,null,R.mode,G),ya(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(nt(k)){if(ct=nt(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Zl(k),G);if(k.$$typeof===A)return Ht(R,O,Ql(R,k),G);Wl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ga=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Jl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Vl(e),bg(e,null,a),n}return Kl(e,c,n,a),Vl(e)}function ma(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function Sa(){if(Gu){var e=ir;if(e!==null)throw e}}function va(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ea(e,n,V,rn(e))}else Ea(e,n,c,rn(e))}catch($){Ea(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ea(e,n.next.queue,{},rn())}function cf(){return xe(Ia)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),ma(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ea(e,n,a,c)}function Ea(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Kl(e,n,f,0),qt===null&&ql(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=eo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var Ca={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var _y={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ao(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ao(4194308,4,e,n)},useInsertionEffect:function(e,n){ao(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return $t(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return $t(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $t(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$t(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),po(n,n.updateQueue),$t(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),$t(n),null;case 10:return ts(n.type),$t(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return $t(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,_a(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return $t(n),null}else 2*Re()-c.renderingStartTime>vo&&a!==536870912&&(n.flags|=128,f=!0,_a(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):($t(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&($t(n),n.subtreeFlags&6&&(n.flags|=8192)):$t(n),a=n.updateQueue,a!==null&&po(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),$t(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Ta(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Aa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function go(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(go(e,n,a),e=e.sibling;e!==null;)go(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=No,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}No=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Zr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,Ua(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(Pr(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),Pr(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(Pr(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var _o=null,Sr=null,Hf=!1,To=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,Hf||(Hf=!0,JE())}function Ua(e,n){if(!qf&&To){qf=!0;do for(var a=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Rl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){To=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=_o;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?_o=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||Ua(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&$m($)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function s0(e,n,a){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),n0.has(f)||(n0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function p1(e){fs.D(e),s0(`dns-prefetch`,e,null)}function g1(e,n){fs.C(e,n),s0(`preconnect`,e,n)}function y1(e,n,a){fs.L(e,n,a);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+cn(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+cn(a.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(Ba(h))||n===`script`&&c.querySelector(La(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function m1(e,n){fs.m(e,n);var a=vr;if(a&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),Te(c,`link`,e),ge(c),a.head.appendChild(c)}}}function S1(e,n,a){fs.S(e,n,a);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Mo(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function v1(e,n){fs.X(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w1(e,n){fs.M(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function i0(e,n,a,c){var f=(f=it.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(n=wr(a.href),a=Ki(f).hoistableStyles,c=a.get(n),c||(c={type:`style`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=wr(a.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=a.async,a=a.src,typeof a==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(a),a=Ki(f).hoistableScripts,c=a.get(n),c||(c={type:`script`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function r0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,a),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function La(e){return`script[async]`+e}function a0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(a.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),Mo(c,a.precedence,e),n.instance=c;case`stylesheet`:f=wr(a.href);var h=e.querySelector(Ba(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=r0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,Mo(h,a.precedence,e),n.instance=h;case`script`:return h=br(a.src),(f=e.querySelector(La(h)))?(n.instance=f,ge(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Mo(c,a.precedence,e));return n.instance}function Mo(e,n,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function E1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;switch(n.rel){case`stylesheet`:return e=n.disabled,typeof n.precedence==`string`&&e==null;default:return!0}case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function c0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function C1(e,n,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wr(c.href),h=n.querySelector(Ba(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=Uo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ge(h);return}h=n.ownerDocument||n,c=r0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uo.bind(e),n.addEventListener(`load`,a),n.addEventListener(`error`,a))}}var rh=0;function x1(e,n){return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function jo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(_1,e),zo=null,Uo.call(e))}function _1(e,n){if(!(n.state.loading&4)){var a=zo.get(e);if(a)var c=a.get(null);else{a=new Map,zo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=K1(),dh.exports}var G1=V1(),W=jd();const $1=`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`,Y1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0`,Q1=`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,F1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY`,cv=W.createContext(null);function Nd(){const s=W.useContext(cv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function J1(){return $1}function X1(){return Q1}function Z1(){return{Authorization:`Bearer ${Y1}`}}function W1(){return{Authorization:`Bearer ${F1}`}}function P1({children:s}){const t=J1(),i=X1(),r=W.useMemo(()=>Z1(),[]),l=W.useMemo(()=>W1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(cv.Provider,{value:o,children:s})}var Vo={exports:{}},Sh,U0;function tC(){if(U0)return Sh;U0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function eC(){if(z0)return Vo.exports;z0=1;var s=tC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=nt,m=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function L(J,et){var nt=p.get();nt.context=o,nt.release=I,nt.value=J,nt.callback=et||i,nt.errorHandler=v,y>=d||b.paused?g?(nt.next=g,g=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function I(J){J&&p.release(J);var et=g;et&&y<=d?b.paused?y--:(m===g&&(m=null),g=et.next,et.next=null,u.call(o,et.value,et.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Vo.exports=t,Vo.exports.promise=l,Vo.exports}var nC=eC();const uv=z1(nC),Dn=`Stream-Next-Offset`,zc=`Stream-Cursor`,jc=`Stream-Up-To-Date`,qn=`Stream-Closed`,vh=`Stream-Seq`,sC=`Stream-TTL`,iC=`Stream-Expires-At`,j0=`Producer-Id`,Go=`Producer-Epoch`,N0=`Producer-Seq`,rC=`Producer-Expected-Seq`,aC=`Producer-Received-Seq`,wh=`offset`,$o=`live`,lC=`stream-sse-data-encoding`;var ti=class fv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new fv(r,o,u,l,i)}},Bd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class nd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=B0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new nd(d,u,r,l)}static fromFetchError(t){const i=B0(t.status);return new nd(t.message,i,t.status,t.json??t.text)}};function B0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var oC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},hv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},cC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const uC=[429,503],Ld={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function fC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function dv(s,t=Ld){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Bd;if(b instanceof ti&&!uC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?fC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*l,r)}}}}const hC=[201,204,205];function dC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||hC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Bd:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function pC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function gC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function bh(s){return pC(s)||gC(s),s}async function*L0(s,t){const i=s.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,_l=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,Tl=s.unstable_LowPriority,Tp=s.unstable_IdlePriority,yb=s.log,mb=s.unstable_setDisableYieldValue,Wr=null,Xe=null;function _s(e){if(typeof yb==`function`&&mb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Wr,e)}catch{}}var Ze=Math.clz32?Math.clz32:wb,Sb=Math.log,vb=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Al=256,Ol=262144,Rl=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Pr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Rl;return Rl<<=1,(Rl&62914560)===0&&(Rl=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function ta(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&Ul(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var ia={};Object.defineProperty(ia,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,ia,ia),window.removeEventListener(`test`,ia,ia)}catch{fu=!1}var As=null,hu=null,jl=null;function Qp(){if(jl)return jl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=la),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),jl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ul(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ul(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,fa=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==Ul(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fa&&ua(fa,c)||(fa=c,c=Ro(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ma(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=$l(k.type,k.key,k.props,null,R.mode,G),ma(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(st(k)){if(ct=st(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Wl(k),G);if(k.$$typeof===A)return Ht(R,O,Fl(R,k),G);Pl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ya=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Xl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Gl(e),bg(e,null,a),n}return Vl(e,c,n,a),Gl(e)}function Sa(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function va(){if(Gu){var e=ir;if(e!==null)throw e}}function wa(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ca(e,n,V,rn(e))}else Ca(e,n,c,rn(e))}catch($){Ca(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ca(e,n.next.queue,{},rn())}function cf(){return xe(Ha)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),Sa(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},co(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ca(e,n,a,c)}function Ca(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(co(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Vl(e,n,f,0),qt===null&&Kl(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},co(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function co(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=no=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var xa={readContext:xe,use:ro,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};xa.useEffectEvent=Xt;var _y={readContext:xe,use:ro,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,lo(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return lo(4194308,4,e,n)},useInsertionEffect:function(e,n){lo(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=so++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return Yt(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Do(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return Yt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Yt(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),go(n,n.updateQueue),Yt(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),Yt(n),null;case 10:return ts(n.type),Yt(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return Yt(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ta(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=eo(e),h!==null){for(n.flags|=128,Ta(c,!1),e=h.updateQueue,n.updateQueue=e,go(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>wo&&(n.flags|=128,f=!0,Ta(c,!1),n.lanes=4194304)}else{if(!f)if(e=eo(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,go(n,e),Ta(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(n),null}else 2*Re()-c.renderingStartTime>wo&&a!==536870912&&(n.flags|=128,f=!0,Ta(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):(Yt(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&(Yt(n),n.subtreeFlags&6&&(n.flags|=8192)):Yt(n),a=n.updateQueue,a!==null&&go(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),Yt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Aa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Oa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function yo(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(yo(e,n,a),e=e.sibling;e!==null;)yo(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=Bo,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},Bo=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Bo=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Wr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,za(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Wr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(ta(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),ta(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-vo?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(ta(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var To=null,Sr=null,Hf=!1,Ao=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?To=Sr=e:Sr=Sr.next=e),Ao=!0,Hf||(Hf=!0,JE())}function za(e,n){if(!qf&&Ao){qf=!0;do for(var a=!1,c=To;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Dl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Pr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){Ao=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=To;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?To=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(Ao=!0)),c=f}fe!==0&&fe!==5||za(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&$m($)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function s0(e,n,a){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),n0.has(f)||(n0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function p1(e){fs.D(e),s0(`dns-prefetch`,e,null)}function g1(e,n){fs.C(e,n),s0(`preconnect`,e,n)}function y1(e,n,a){fs.L(e,n,a);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+cn(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+cn(a.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(La(h))||n===`script`&&c.querySelector(Ia(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function m1(e,n){fs.m(e,n);var a=vr;if(a&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(Ia(h)))return}c=a.createElement(`link`),Te(c,`link`,e),ge(c),a.head.appendChild(c)}}}function S1(e,n,a){fs.S(e,n,a);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(La(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,ko(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function v1(e,n){fs.X(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(Ia(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w1(e,n){fs.M(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(Ia(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function i0(e,n,a,c){var f=(f=it.current)?Mo(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(n=wr(a.href),a=Ki(f).hoistableStyles,c=a.get(n),c||(c={type:`style`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=wr(a.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(La(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=a.async,a=a.src,typeof a==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(a),a=Ki(f).hoistableScripts,c=a.get(n),c||(c={type:`script`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function La(e){return`link[rel="stylesheet"][`+e+`]`}function r0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,a),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function Ia(e){return`script[async]`+e}function a0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(a.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),ko(c,a.precedence,e),n.instance=c;case`stylesheet`:f=wr(a.href);var h=e.querySelector(La(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=r0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,ko(h,a.precedence,e),n.instance=h;case`script`:return h=br(a.src),(f=e.querySelector(Ia(h)))?(n.instance=f,ge(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,ko(c,a.precedence,e));return n.instance}function ko(e,n,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function E1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;switch(n.rel){case`stylesheet`:return e=n.disabled,typeof n.precedence==`string`&&e==null;default:return!0}case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function c0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function C1(e,n,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wr(c.href),h=n.querySelector(La(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=zo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ge(h);return}h=n.ownerDocument||n,c=r0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=zo.bind(e),n.addEventListener(`load`,a),n.addEventListener(`error`,a))}}var rh=0;function x1(e,n){return e.stylesheets&&e.count===0&&No(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function zo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)No(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var jo=null;function No(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,jo=new Map,n.forEach(_1,e),jo=null,zo.call(e))}function _1(e,n){if(!(n.state.loading&4)){var a=jo.get(e);if(a)var c=a.get(null);else{a=new Map,jo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=K1(),dh.exports}var G1=V1(),W=jd();const $1=`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`,Y1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0`,Q1=`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,F1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY`,cv=W.createContext(null);function Nd(){const s=W.useContext(cv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function J1(){return $1}function X1(){return Q1}function Z1(){return{Authorization:`Bearer ${Y1}`}}function W1(){return{Authorization:`Bearer ${F1}`}}function P1({children:s}){const t=J1(),i=X1(),r=W.useMemo(()=>Z1(),[]),l=W.useMemo(()=>W1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(cv.Provider,{value:o,children:s})}var Go={exports:{}},Sh,U0;function tC(){if(U0)return Sh;U0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function eC(){if(z0)return Go.exports;z0=1;var s=tC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=st,m=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function L(J,nt){var st=p.get();st.context=o,st.release=I,st.value=J,st.callback=nt||i,st.errorHandler=v,y>=d||b.paused?g?(st.next=g,g=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function I(J){J&&p.release(J);var nt=g;nt&&y<=d?b.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Go.exports=t,Go.exports.promise=l,Go.exports}var nC=eC();const uv=z1(nC),Dn=`Stream-Next-Offset`,zc=`Stream-Cursor`,jc=`Stream-Up-To-Date`,qn=`Stream-Closed`,vh=`Stream-Seq`,sC=`Stream-TTL`,iC=`Stream-Expires-At`,j0=`Producer-Id`,$o=`Producer-Epoch`,N0=`Producer-Seq`,rC=`Producer-Expected-Seq`,aC=`Producer-Received-Seq`,wh=`offset`,Yo=`live`,lC=`stream-sse-data-encoding`;var ti=class fv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new fv(r,o,u,l,i)}},Bd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class nd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=B0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new nd(d,u,r,l)}static fromFetchError(t){const i=B0(t.status);return new nd(t.message,i,t.status,t.json??t.text)}};function B0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var oC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},hv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},cC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const uC=[429,503],Ld={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function fC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function dv(s,t=Ld){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Bd;if(b instanceof ti&&!uC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?fC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*l,r)}}}}const hC=[201,204,205];function dC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||hC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Bd:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function pC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function gC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function bh(s){return pC(s)||gC(s),s}async function*L0(s,t){const i=s.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` `).replace(/\r/g,` `);const g=l.split(` `);l=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` `);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Id=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},pv=class sd extends Id{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new sd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new sd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Hd(this)}},Eh=class _r extends Id{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new _r({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new _r({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new pv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new _r({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Hd(this)}},Hd=class id extends Id{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new id(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new id(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const I0=`PAUSE_STREAM`;var yC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new pv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(I0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Hd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(zc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?L0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:SC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=rd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:rd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=L0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===I0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w(`bodyStream`),bh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return bh(i)}textStream(){this.#w(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return bh(t)}subscribeJson(s){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(Dn),o=s.headers.get(zc),u=s.headers.has(jc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function mC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>mC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function Wa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new hv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function Po(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const H0=new Set;function vC(){if(!(typeof process>`u`))return`production`}function wC(){return typeof globalThis.window<`u`}function bC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function EC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function gv(s,t){if(t===!1||vC()===`test`||!wC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,l=EC(r);l&&l.protocol===`http:`&&(H0.has(l.origin)||(H0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function CC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await xC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function xC(s){const t=s.url instanceof URL?s.url.toString():s.url;gv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(wh,r);const l=s.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set($o,l);const o=await Po(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await Wa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Ld,m=dv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Bd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(zc)??void 0,E=y.headers.has(jc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(lC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const J=new URL(t);J.searchParams.set(wh,I),tt||(l===`sse`?J.searchParams.set($o,`sse`):(l===!0||l===`long-poll`)&&J.searchParams.set($o,`long-poll`)),K&&J.searchParams.set(`cursor`,K);const et=await Po(s.params);for(const[Kt,ht]of Object.entries(et))J.searchParams.set(Kt,ht);const nt=await Wa(s.headers),Ct=await m(J.toString(),{method:`GET`,headers:nt,signal:X});return Ct.ok||await ps(Ct,t),Ct},L=l===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(wh,I),tt.searchParams.set($o,`sse`),K&&tt.searchParams.set(`cursor`,K);const J=await Po(s.params);for(const[Ct,Kt]of Object.entries(J))tt.searchParams.set(Ct,Kt);const et=await Wa(s.headers),nt=await m(tt.toString(),{method:`GET`,headers:et,signal:X});return nt.ok||await ps(nt,t),nt}:void 0;return new yC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var q0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},_C=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function K0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var yv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=uv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??`application/octet-stream`,i=K0(t)===`application/json`;let r;if(s!==void 0){const g=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[j0]:this.#e,[Go]:this.#n.toString(),[N0]:l.toString(),[qn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===403){const g=d.headers.get(Go),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new q0(m)}throw await ti.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,l=K0(r)===`application/json`;let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[j0]:this.#e,[Go]:i.toString(),[N0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(Dn)??``,duplicate:!1};if(g.status===403){const y=g.headers.get(Go),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new q0(v)}if(g.status===409){const y=g.headers.get(rC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function TC(s){return s!=null&&typeof s.then==`function`}var Hn=class Qa{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){RC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=uv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Ld},l=dv(this.#n,r);this.#e=dC(l)}static async create(t){const i=new Qa(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Qa(t);return await i.head(),i}static async head(t){return new Qa(t).head()}static async delete(t){return new Qa(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(Dn)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[sC]=String(t.ttlSeconds)),t?.expiresAt&&(i[iC]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=AC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[qn]=`true`;let o;t?.body!==void 0&&(xh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new hv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=TC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=OC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new yv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return CC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Wa(this.#t.headers)}async#f(){const t=await Wa(this.#t.headers),i=new URL(this.url),r=await Po(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function AC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function OC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function RC(s){if(!s.url)throw new oC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new cC;gv(s.url,s.warnOnHttp)}const DC=`__includes_scalar__`;class Mi{}class Nr extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class mv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Br(s){return s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function qd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function V0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function MC(s){return{expression:s,residual:!0}}function kC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function sl(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type===`ref`)return sl(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=kC(s,r);return o?o.type===`queryRef`?sl(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class $0 extends En{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class UC extends Ui{constructor(){super(`Collection requires a config`)}}class zC extends Ui{constructor(){super(`Collection requires a sync config`)}}class jC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class Y0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class ml extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class NC extends ml{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class BC extends ml{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class LC extends ml{constructor(){super(`Collection is in error state`)}}class IC extends ml{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class HC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class qC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class KC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class VC extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class GC extends Yn{constructor(){super(`The first argument to update is missing`)}}class $C extends Yn{constructor(){super(`No keys were passed to update`)}}class YC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class QC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class FC extends Yn{constructor(){super(`No keys were passed to delete`)}}class JC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Kd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class XC extends Kd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class ZC extends Kd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class WC extends Kd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class PC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class tx extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class ex extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class nx extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class sx extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class _h extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Th extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class ix extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class rx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class ax extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class lx extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class ox extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Yo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class cx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ux extends zi{constructor(){super(`Query must have a from clause`)}}class Q0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Id=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},pv=class sd extends Id{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new sd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new sd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Hd(this)}},Eh=class Tr extends Id{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new Tr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Tr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new pv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Hd(this)}},Hd=class id extends Id{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new id(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new id(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const I0=`PAUSE_STREAM`;var yC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new pv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(I0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Hd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(zc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?L0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:SC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=rd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:rd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=L0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===I0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w(`bodyStream`),bh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return bh(i)}textStream(){this.#w(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return bh(t)}subscribeJson(s){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(Dn),o=s.headers.get(zc),u=s.headers.has(jc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function mC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>mC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function Pa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new hv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function tc(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const H0=new Set;function vC(){if(!(typeof process>`u`))return`production`}function wC(){return typeof globalThis.window<`u`}function bC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function EC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function gv(s,t){if(t===!1||vC()===`test`||!wC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,l=EC(r);l&&l.protocol===`http:`&&(H0.has(l.origin)||(H0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function CC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await xC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function xC(s){const t=s.url instanceof URL?s.url.toString():s.url;gv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(wh,r);const l=s.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Yo,l);const o=await tc(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await Pa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Ld,m=dv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Bd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(zc)??void 0,E=y.headers.has(jc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(lC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const J=new URL(t);J.searchParams.set(wh,I),tt||(l===`sse`?J.searchParams.set(Yo,`sse`):(l===!0||l===`long-poll`)&&J.searchParams.set(Yo,`long-poll`)),K&&J.searchParams.set(`cursor`,K);const nt=await tc(s.params);for(const[Kt,ht]of Object.entries(nt))J.searchParams.set(Kt,ht);const st=await Pa(s.headers),Ct=await m(J.toString(),{method:`GET`,headers:st,signal:X});return Ct.ok||await ps(Ct,t),Ct},L=l===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(wh,I),tt.searchParams.set(Yo,`sse`),K&&tt.searchParams.set(`cursor`,K);const J=await tc(s.params);for(const[Ct,Kt]of Object.entries(J))tt.searchParams.set(Ct,Kt);const nt=await Pa(s.headers),st=await m(tt.toString(),{method:`GET`,headers:nt,signal:X});return st.ok||await ps(st,t),st}:void 0;return new yC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var q0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},_C=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function K0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var yv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=uv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??`application/octet-stream`,i=K0(t)===`application/json`;let r;if(s!==void 0){const g=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[j0]:this.#e,[$o]:this.#n.toString(),[N0]:l.toString(),[qn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===403){const g=d.headers.get($o),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new q0(m)}throw await ti.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,l=K0(r)===`application/json`;let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[j0]:this.#e,[$o]:i.toString(),[N0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(Dn)??``,duplicate:!1};if(g.status===403){const y=g.headers.get($o),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new q0(v)}if(g.status===409){const y=g.headers.get(rC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function TC(s){return s!=null&&typeof s.then==`function`}var Hn=class Qa{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){RC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=uv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Ld},l=dv(this.#n,r);this.#e=dC(l)}static async create(t){const i=new Qa(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Qa(t);return await i.head(),i}static async head(t){return new Qa(t).head()}static async delete(t){return new Qa(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(Dn)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[sC]=String(t.ttlSeconds)),t?.expiresAt&&(i[iC]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=AC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[qn]=`true`;let o;t?.body!==void 0&&(xh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new hv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=TC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=OC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new yv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return CC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Pa(this.#t.headers)}async#f(){const t=await Pa(this.#t.headers),i=new URL(this.url),r=await tc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function AC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function OC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function RC(s){if(!s.url)throw new oC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new cC;gv(s.url,s.warnOnHttp)}const DC=`__includes_scalar__`;class Mi{}class Br extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class mv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Lr(s){return s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function qd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function V0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function MC(s){return{expression:s,residual:!0}}function kC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function il(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type===`ref`)return il(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=kC(s,r);return o?o.type===`queryRef`?il(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class $0 extends En{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class UC extends Ui{constructor(){super(`Collection requires a config`)}}class zC extends Ui{constructor(){super(`Collection requires a sync config`)}}class jC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class Y0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class Sl extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class NC extends Sl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class BC extends Sl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class LC extends Sl{constructor(){super(`Collection is in error state`)}}class IC extends Sl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class HC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class qC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class KC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class VC extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class GC extends Yn{constructor(){super(`The first argument to update is missing`)}}class $C extends Yn{constructor(){super(`No keys were passed to update`)}}class YC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class QC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class FC extends Yn{constructor(){super(`No keys were passed to delete`)}}class JC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Kd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class XC extends Kd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class ZC extends Kd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class WC extends Kd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class PC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class tx extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class ex extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class nx extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class sx extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class _h extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Th extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class ix extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class rx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class ax extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class lx extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class ox extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Qo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class cx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ux extends zi{constructor(){super(`Query must have a from clause`)}}class Q0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: ❌ .where(({ user }) => user.id === 'abc') ✅ .where(({ user }) => eq(user.id, 'abc')) -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class fx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class hx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class dx extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class px extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class gx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Sv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class yx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class mx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Sx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class vx extends Le{constructor(){super(`Reference path cannot be empty`)}}class wx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class F0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class bx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class Ex extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Cx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class xx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class _x extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Tx extends ji{constructor(){super(`Invalid join condition`)}}class Ax extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ox extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Rx extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Mx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class J0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class kx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ux extends kx{constructor(){super(`Cannot combine empty expression list`)}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class jx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Nx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return tc(s,t,new Map)}function tc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&tc(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;otc(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&tc(s[u],t[u],i));return i.delete(s),o}return!1}const Bx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Bx.has(t)}const vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Ah=new WeakMap;let Lx=1;function X0(s){if(Ah.has(s))return Ah.get(s);const t=Lx++;return Ah.set(s,t),t}const Vd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=X0(s),d=X0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Ix=(s,t,i)=>Vd(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function Pa(s){return(t,i)=>s.direction===`asc`?Vd(t,i,s):Ix(t,i,s)}const Hx=Pa({direction:`asc`,nulls:`first`,stringSort:`locale`});function qx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Yx(s):$x(s);case`func`:return Qx(s,t);default:throw new Sx(s.type)}}function $x(s){const[t,...i]=s.path;if(!t)throw new vx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Yx(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Ar(r(o)),d=Ar(l(o));return me(u)||me(d)?null:Vx(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u{const u=r(o),d=l(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return me(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Ar(r(o)),d=l(o);return me(u)?null:Array.isArray(d)?d.some(p=>Ar(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Oh(d);return p?Gx(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new wx(s.name)}}function Z0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Fx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function W0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Jx(s){return ad.includes(s)}function bv(s){return s.some(t=>Jx(t))}function Sl(s,t,i){if(bv(t))return;const r=i??{...vv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Fx(l)}function Xx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=Sl(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=$d(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Zx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function s_(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=Sl(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Ev(s){return s.config.autoIndex===`eager`}function Bc(s,t,i,r,l){if(bv(t)||!Ev(i))return;const o=r??{...vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function i_(s,t){if(!Ev(t))return;const i=r_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function r_(s){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class a_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Rh=3e4;function Dh(s,t){if(t.length<=Rh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class o_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s==`string`?-1:1}function il(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we();function we(){return Math.random()*(2**31-1)>>>0}const Cv=new ArrayBuffer(8),g_=new DataView(Cv),Xs=new Uint8Array(Cv);class vl{constructor(){this.hash=u_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(p_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(f_);for(let i=0;i>>8&255)}return;case`number`:g_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(d_)):this.update(h_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=we(),x_=we(),__=we(),T_=we(),A_=we(),O_=we(),R_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function D_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&R_.has(t)}const M_=128,rl=new WeakMap;function Ne(s){const t=new vl;return xv(t,s),t.digest()}function k_(s){const t=rl.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=U_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=M_)i=z_(s);else return od(s);else{if(s instanceof File)return od(s);if(D_(s))i=j_(s);else{let r=s,l=C_;s instanceof Array&&(l=x_),s instanceof Map&&(l=__,r=[...s.entries()]),s instanceof Set&&(l=T_,r=[...s.entries()]),i=N_(r,l)}}return rl.set(s,i),i}function U_(s){const t=new vl;return t.update(E_),t.update(s.getTime()),t.digest()}function z_(s){const t=new vl;t.update(A_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new se(l)}#n(){const t=new a_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class I_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new I_(t)}}class _v{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends _v{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class H_ extends _v{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Yd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class q_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new K_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class K_ extends zn{sendData(t){this.writer.sendData(t)}}class V_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Tv(){return s=>{const t=new zn(s.graph,new Un),i=new V_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class tS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=tl(t),l=this.get(r);if(ec(l)){const[o,u]=l;if(tl(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ec(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(ec(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ec(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=tl(r);if(d!==Fa){const p=new tS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=tl(r),p=tl(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Ja;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new tS;if(p===d){const m=new Ja;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function tl(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fa}function ec(s){return Array.isArray(s)}class G_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Av(s){return t=>{const i=new zn(t.graph,new Un),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class $_ extends Ni{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function Y_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new $_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Q_ extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new Q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const F_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Or(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Or(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Or(s.slice(1),null,i)}function Ov(s){if(s.length!==Rv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Rv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xa(s){const t=Rv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function eS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function nS(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function J_(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function X_(s,t,i=F_){if(s!=null&&eS(s,i),t!=null&&eS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Or(``,g,i);if(p{const o=s(i,l);return o!==0?o:ld(t,r)}}class Qd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=c_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:rS(this.#t[r-1]),o=r===this.#t.length?null:rS(this.#t[r]),u=X_(l,o),d=sS(t,u);if(this.#t.splice(r,0,d),rthis.#e(iS(i),iS(r)))}}class Mv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Qd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class Z_ extends Ni{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Dv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Mv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function W_(s,t){return i=>{const r=new zn(i.graph,new Un),l=new Z_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class P_ extends H_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function kv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),l=new P_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class tT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends Ni{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function cd(s){return t=>{const i=new zn(t.graph,new Un),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class nT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function sT(s){return t=>{const i=new zn(t.graph,new Un),r=new nT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class iT extends Ni{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Dv(l));this.#t=new Mv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function rT(s,t){const i=t||{};return r=>{const l=new zn(r.graph,new Un),o=new iT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function aS(s){return`pipe`in s}function lS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!aS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>aS(l))),r=>{const l=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=il(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Av(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function aT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function oT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function cT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const fT={sum:aT,count:lT,avg:oT,min:cT,max:uT};function hT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(W_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Tv())}function dT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Tv())}function pT(s,t){return dT(rT,s,t)}const kh=`__virtual_synced__`,Uh=`__virtual_has_local__`;function oS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:gT,count:yT,avg:mT,min:ST,max:vT}=fT;function wT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Lr(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ox(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function cS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,w])=>oS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Uh]:{preMap:([,w])=>oS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Fo(A);else if(Lr(A)){const{transformed:z,extracted:L}=ud(A,T);for(const[I,K]of Object.entries(L))w[I]=Fo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(lS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[J,et]of Object.entries(r))et.type===`agg`&&(z[J]=D[J]);uS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${il(L)}`:`single_group`,K={...D,$selected:z},X=D[kh],tt=D[Uh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=V0(D),z=gc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Dr(L(K))}))}if(l&&l.length>0)for(const D of l)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Dr(D(z))}));return s}const p=wT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}uS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=V0(w),T=gc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Dr(w(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Fo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return gT(i);case`count`:return yT(l);case`avg`:return mT(i);case`min`:return ST(r);case`max`:return vT(r);default:throw new Rx(s.name)}}function gc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case`func`:{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case`ref`:return s;case`val`:return s;default:throw new Mx(s.type)}}function uS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Lr(s){return Br(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Lr(t)):!1:!1}function ud(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(l=>{const o=ud(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function ET(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:fd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(J=>J.expression.type===`ref`)?i.map(J=>{const et=J.expression,nt=sl(s,et,l);return he(nt?new Me(nt.path):J.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(J,et)=>{if(i.length===1){const nt=J&&N(J),Ct=et&&N(et);return v(nt,Ct)}if(I){const nt=Ct=>Ct&&I.map(Kt=>Kt(Ct));return v(nt(J),nt(et))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(I)return I.map(et=>et(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const et=J();return Math.max(0,w.limit-et)}}}}return g?t.pipe(hT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(pT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function fd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function CT(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?el(t.where):void 0,l=_T(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Wx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=el(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=el(t.where);return t.optimizedOnly?void 0:i(l)}}function el(s){const t=wv(s);return i=>{try{const r=t(i);return Dr(r)}catch{return!1}}}function xT(s,t){const i=el(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function _T(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=fd(p,s);Bc(y[0],y,s,v);const b=Sl(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Pa(m.compareOptions),v=fS(p.value,m.expression),b=fS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function fS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:wv(t)(s)}class hS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ld(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const nc=`__tanstack_db_direct`;class TT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?W0(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let J=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(J=!0);const et=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(J&&!et))if(A===void 0&&z!==void 0){const nt=N.get(D);if(nt){const Ct=nt.value,Kt=W0(Ct,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Kt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||et)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new hS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new hS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[nc]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Uv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function dS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return sc(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function sc(s){return s&&typeof s==`object`&&s.__refProxy===!0}function hd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function pS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function AT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function dd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function pd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(l=>ie(l)))}function OT(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(l=>ie(l)))}function RT(s,t){return new Je(`in`,[ie(s),ie(t)])}class DT{constructor(t){this.query=t}}class MT{constructor(t){this.query=t}}class zv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function kT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction===`asc`?pS:dd)(r,new Be(t[0]))}const i=[];for(let r=0;rpd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>OT(r,l))}class UT extends zv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&i_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?xT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=pd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?el(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:hd(tt,new Be(g))});if(J){const et=J.map(Ct=>Ct.key).filter(Ct=>!this.sentKeys.has(Ct)&&b(Ct));T.push(...et);const nt=m.take(i-T.length,g,b);T.push(...nt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const J of T){const et=this.collection.get(J);E.push({type:`insert`,key:J,value:et}),w=z?z(et):et,tt.add(J)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=kT(t,r);if(tt){const{expression:J}=t[0],et=r[0];let nt;if(et instanceof Date){const Ct=new Date(et.getTime()+1);nt=pd(AT(J,new Be(et)),dd(J,new Be(Ct)))}else nt=hd(J,new Be(et));I={whereFrom:tt,whereCurrent:nt,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:l??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Uv(),p=r(d);o=ie(p)}const u=new UT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new IC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const jT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),NT=s=>{clearTimeout(s)},BT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>jT(s),zh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):NT,jv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};jv.instance=null;let jh=jv;class LT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new BC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new ml(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new NC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&zh(this.idleCallbackId),this.idleCallbackId=BT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Fd=Symbol(`liveQueryInternal`);class IT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=HT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Fd];throw new VC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new ix;if(i.committed)throw new rx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new LC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new J0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new J0(this.id,t)})}this.preloadPromise=null}}function HT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const gS=1;function ic(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(l=>Zs(l)??null).sort((l,o)=>ic(xi(l),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([l,o])=>({key:Zs(l)??null,value:Zs(o)??null})).sort((l,o)=>ic(xi(l.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>ic(r,l));for(const[r,l]of i){const o=Zs(l);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>ic(r,l)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function KT(s,t,i,r,l){const o=qT(r),u=Zs(t)??null,d=Zs(l),g=Zs({signatureVersion:gS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:gS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function gd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>gd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=gd(r);return t}function VT(s){return JSON.parse(JSON.stringify(s))}class GT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=Uv(),o=t(l),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class fx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class hx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class dx extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class px extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class gx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Sv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class yx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class mx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Sx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class vx extends Le{constructor(){super(`Reference path cannot be empty`)}}class wx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class F0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class bx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class Ex extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Cx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class xx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class _x extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Tx extends ji{constructor(){super(`Invalid join condition`)}}class Ax extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ox extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Rx extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Mx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class J0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class kx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ux extends kx{constructor(){super(`Cannot combine empty expression list`)}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class jx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Nx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return ec(s,t,new Map)}function ec(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&ec(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;oec(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&ec(s[u],t[u],i));return i.delete(s),o}return!1}const Bx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Bx.has(t)}const vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Ah=new WeakMap;let Lx=1;function X0(s){if(Ah.has(s))return Ah.get(s);const t=Lx++;return Ah.set(s,t),t}const Vd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=X0(s),d=X0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Ix=(s,t,i)=>Vd(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function tl(s){return(t,i)=>s.direction===`asc`?Vd(t,i,s):Ix(t,i,s)}const Hx=tl({direction:`asc`,nulls:`first`,stringSort:`locale`});function qx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Yx(s):$x(s);case`func`:return Qx(s,t);default:throw new Sx(s.type)}}function $x(s){const[t,...i]=s.path;if(!t)throw new vx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Yx(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Or(r(o)),d=Or(l(o));return me(u)||me(d)?null:Vx(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u{const u=r(o),d=l(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return me(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Or(r(o)),d=l(o);return me(u)?null:Array.isArray(d)?d.some(p=>Or(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Oh(d);return p?Gx(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new wx(s.name)}}function Z0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Fx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function W0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Jx(s){return ad.includes(s)}function bv(s){return s.some(t=>Jx(t))}function vl(s,t,i){if(bv(t))return;const r=i??{...vv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Fx(l)}function Xx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=vl(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=$d(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Zx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function s_(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=vl(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Ev(s){return s.config.autoIndex===`eager`}function Bc(s,t,i,r,l){if(bv(t)||!Ev(i))return;const o=r??{...vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function i_(s,t){if(!Ev(t))return;const i=r_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function r_(s){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class a_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Rh=3e4;function Dh(s,t){if(t.length<=Rh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class o_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s==`string`?-1:1}function rl(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we();function we(){return Math.random()*(2**31-1)>>>0}const Cv=new ArrayBuffer(8),g_=new DataView(Cv),Xs=new Uint8Array(Cv);class wl{constructor(){this.hash=u_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(p_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(f_);for(let i=0;i>>8&255)}return;case`number`:g_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(d_)):this.update(h_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=we(),x_=we(),__=we(),T_=we(),A_=we(),O_=we(),R_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function D_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&R_.has(t)}const M_=128,al=new WeakMap;function Ne(s){const t=new wl;return xv(t,s),t.digest()}function k_(s){const t=al.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=U_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=M_)i=z_(s);else return od(s);else{if(s instanceof File)return od(s);if(D_(s))i=j_(s);else{let r=s,l=C_;s instanceof Array&&(l=x_),s instanceof Map&&(l=__,r=[...s.entries()]),s instanceof Set&&(l=T_,r=[...s.entries()]),i=N_(r,l)}}return al.set(s,i),i}function U_(s){const t=new wl;return t.update(E_),t.update(s.getTime()),t.digest()}function z_(s){const t=new wl;t.update(A_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new se(l)}#n(){const t=new a_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class I_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new I_(t)}}class _v{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends _v{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class H_ extends _v{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Yd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class q_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new K_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class K_ extends zn{sendData(t){this.writer.sendData(t)}}class V_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Tv(){return s=>{const t=new zn(s.graph,new Un),i=new V_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class tS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=el(t),l=this.get(r);if(nc(l)){const[o,u]=l;if(el(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(nc(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(nc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(nc(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=el(r);if(d!==Fa){const p=new tS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=el(r),p=el(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Ja;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new tS;if(p===d){const m=new Ja;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function el(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fa}function nc(s){return Array.isArray(s)}class G_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Av(s){return t=>{const i=new zn(t.graph,new Un),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class $_ extends Ni{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function Y_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new $_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Q_ extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new Q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const F_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Rr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Rr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Rr(s.slice(1),null,i)}function Ov(s){if(s.length!==Rv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Rv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xa(s){const t=Rv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function eS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function nS(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function J_(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function X_(s,t,i=F_){if(s!=null&&eS(s,i),t!=null&&eS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Rr(``,g,i);if(p{const o=s(i,l);return o!==0?o:ld(t,r)}}class Qd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=c_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:rS(this.#t[r-1]),o=r===this.#t.length?null:rS(this.#t[r]),u=X_(l,o),d=sS(t,u);if(this.#t.splice(r,0,d),rthis.#e(iS(i),iS(r)))}}class Mv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Qd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class Z_ extends Ni{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Dv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Mv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function W_(s,t){return i=>{const r=new zn(i.graph,new Un),l=new Z_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class P_ extends H_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function kv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),l=new P_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class tT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends Ni{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function cd(s){return t=>{const i=new zn(t.graph,new Un),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class nT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function sT(s){return t=>{const i=new zn(t.graph,new Un),r=new nT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class iT extends Ni{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Dv(l));this.#t=new Mv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function rT(s,t){const i=t||{};return r=>{const l=new zn(r.graph,new Un),o=new iT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function aS(s){return`pipe`in s}function lS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!aS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>aS(l))),r=>{const l=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=rl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Av(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function aT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function oT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function cT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const fT={sum:aT,count:lT,avg:oT,min:cT,max:uT};function hT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(W_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Tv())}function dT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Tv())}function pT(s,t){return dT(rT,s,t)}const kh=`__virtual_synced__`,Uh=`__virtual_has_local__`;function oS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:gT,count:yT,avg:mT,min:ST,max:vT}=fT;function wT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Ir(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ox(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function cS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,w])=>oS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Uh]:{preMap:([,w])=>oS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Jo(A);else if(Ir(A)){const{transformed:z,extracted:L}=ud(A,T);for(const[I,K]of Object.entries(L))w[I]=Jo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(lS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[J,nt]of Object.entries(r))nt.type===`agg`&&(z[J]=D[J]);uS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${rl(L)}`:`single_group`,K={...D,$selected:z},X=D[kh],tt=D[Uh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=V0(D),z=gc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Mr(L(K))}))}if(l&&l.length>0)for(const D of l)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Mr(D(z))}));return s}const p=wT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}uS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=V0(w),T=gc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Mr(w(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Jo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return gT(i);case`count`:return yT(l);case`avg`:return mT(i);case`min`:return ST(r);case`max`:return vT(r);default:throw new Rx(s.name)}}function gc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case`func`:{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case`ref`:return s;case`val`:return s;default:throw new Mx(s.type)}}function uS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Ir(s){return Lr(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Ir(t)):!1:!1}function ud(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(l=>{const o=ud(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function ET(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:fd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(J=>J.expression.type===`ref`)?i.map(J=>{const nt=J.expression,st=il(s,nt,l);return he(st?new Me(st.path):J.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(J,nt)=>{if(i.length===1){const st=J&&N(J),Ct=nt&&N(nt);return v(st,Ct)}if(I){const st=Ct=>Ct&&I.map(Kt=>Kt(Ct));return v(st(J),st(nt))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(I)return I.map(nt=>nt(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const nt=J();return Math.max(0,w.limit-nt)}}}}return g?t.pipe(hT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(pT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function fd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function CT(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?nl(t.where):void 0,l=_T(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Wx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=nl(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=nl(t.where);return t.optimizedOnly?void 0:i(l)}}function nl(s){const t=wv(s);return i=>{try{const r=t(i);return Mr(r)}catch{return!1}}}function xT(s,t){const i=nl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function _T(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=fd(p,s);Bc(y[0],y,s,v);const b=vl(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=tl(m.compareOptions),v=fS(p.value,m.expression),b=fS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function fS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:wv(t)(s)}class hS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ld(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const sc=`__tanstack_db_direct`;class TT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?W0(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let J=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(J=!0);const nt=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(J&&!nt))if(A===void 0&&z!==void 0){const st=N.get(D);if(st){const Ct=st.value,Kt=W0(Ct,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Kt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||nt)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new hS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new hS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[sc]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Uv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function dS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return ic(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function ic(s){return s&&typeof s==`object`&&s.__refProxy===!0}function hd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function pS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function AT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function dd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function pd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(l=>ie(l)))}function OT(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(l=>ie(l)))}function RT(s,t){return new Je(`in`,[ie(s),ie(t)])}class DT{constructor(t){this.query=t}}class MT{constructor(t){this.query=t}}class zv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function kT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction===`asc`?pS:dd)(r,new Be(t[0]))}const i=[];for(let r=0;rpd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>OT(r,l))}class UT extends zv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&i_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?xT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=pd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?nl(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:hd(tt,new Be(g))});if(J){const nt=J.map(Ct=>Ct.key).filter(Ct=>!this.sentKeys.has(Ct)&&b(Ct));T.push(...nt);const st=m.take(i-T.length,g,b);T.push(...st)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const J of T){const nt=this.collection.get(J);E.push({type:`insert`,key:J,value:nt}),w=z?z(nt):nt,tt.add(J)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=kT(t,r);if(tt){const{expression:J}=t[0],nt=r[0];let st;if(nt instanceof Date){const Ct=new Date(nt.getTime()+1);st=pd(AT(J,new Be(nt)),dd(J,new Be(Ct)))}else st=hd(J,new Be(nt));I={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:l??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Uv(),p=r(d);o=ie(p)}const u=new UT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new IC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const jT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),NT=s=>{clearTimeout(s)},BT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>jT(s),zh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):NT,jv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};jv.instance=null;let jh=jv;class LT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new BC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new Sl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new NC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&zh(this.idleCallbackId),this.idleCallbackId=BT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Fd=Symbol(`liveQueryInternal`);class IT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=HT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Fd];throw new VC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new ix;if(i.committed)throw new rx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new LC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new J0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new J0(this.id,t)})}this.preloadPromise=null}}function HT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const gS=1;function rc(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(l=>Zs(l)??null).sort((l,o)=>rc(xi(l),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([l,o])=>({key:Zs(l)??null,value:Zs(o)??null})).sort((l,o)=>rc(xi(l.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>rc(r,l));for(const[r,l]of i){const o=Zs(l);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>rc(r,l)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function KT(s,t,i,r,l){const o=qT(r),u=Zs(t)??null,d=Zs(l),g=Zs({signatureVersion:gS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:gS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function gd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>gd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=gd(r);return t}function VT(s){return JSON.parse(JSON.stringify(s))}class GT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=Uv(),o=t(l),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=KT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:VT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:gd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var $T={};const YT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),QT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),FT=new Set([`set`,`delete`,`clear`,`add`]),JT=new Set([`entries`,`keys`,`values`,`forEach`]);function Jd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function XT(s,t,i,r){if(YT.has(s))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(Jd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function ZT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Jd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function yS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function WT(s,t,i,r,l,o,u){if(JT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&$T.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(gs(o,t))}),l}if(ei(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=gs(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=gs(s[l],t);return i}let mS=0;function PT(){return mS+=1,mS}function Xd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Xd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:PT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),l.has(y))return Tt(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(QT.has(D))return yS(E,o,u);const A=XT(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return ZT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(FT.has(D))return yS(E,o,u);const A=WT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Jd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function tA(s){const t=s.map(i=>Xd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function eA(s,t){const{proxy:i,getChanges:r}=Xd(s);return t(i),r()}function nA(s,t){const{proxies:i,getChanges:r}=tA(s);return t(i),r()}function sA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function iA(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class rA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new rA,mc=[];let al=[],aA=0;function lA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Za(s){const t=new fA(s);return mc.push(t),t}function rc(){if(al.length>0)return al.slice(-1)[0]}function oA(s){yc.clear(s.id),al.push(s)}function cA(s){try{yc.flush(s.id)}finally{al=al.filter(t=>t.id!==s.id)}}function uA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let fA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new PC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=sA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=aA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&uA(this)}mutate(t){if(this.state!==`pending`)throw new ex;oA(this);try{t()}finally{cA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=lA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new nx;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new sx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class hA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=rc();if(!u&&!this.config.onInsert)throw new XC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new KC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Za({metadata:{[nc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=rc();if(!u&&!this.config.onDelete)throw new WC;if(Array.isArray(r)&&r.length===0)throw new FC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new JC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Za({autoCommit:!0,metadata:{[nc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new jC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new Y0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new $0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new Y0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new $0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new HC(i):new qC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new GC;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=rc();if(!o&&!this.config.onUpdate)throw new ZC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new $C;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new YC(w);return E});let y;u?y=nA(m,p):y=[eA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new QC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Za({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Za({metadata:{[nc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class dA extends zv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Zd(s){const t=new Wd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Wd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new UC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=KT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:VT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:gd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var $T={};const YT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),QT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),FT=new Set([`set`,`delete`,`clear`,`add`]),JT=new Set([`entries`,`keys`,`values`,`forEach`]);function Jd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function XT(s,t,i,r){if(YT.has(s))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(Jd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function ZT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Jd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function yS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function WT(s,t,i,r,l,o,u){if(JT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&$T.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(gs(o,t))}),l}if(ei(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=gs(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=gs(s[l],t);return i}let mS=0;function PT(){return mS+=1,mS}function Xd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Xd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:PT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),l.has(y))return Tt(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(QT.has(D))return yS(E,o,u);const A=XT(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return ZT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(FT.has(D))return yS(E,o,u);const A=WT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Jd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function tA(s){const t=s.map(i=>Xd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function eA(s,t){const{proxy:i,getChanges:r}=Xd(s);return t(i),r()}function nA(s,t){const{proxies:i,getChanges:r}=tA(s);return t(i),r()}function sA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function iA(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class rA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new rA,mc=[];let ll=[],aA=0;function lA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Za(s){const t=new fA(s);return mc.push(t),t}function ac(){if(ll.length>0)return ll.slice(-1)[0]}function oA(s){yc.clear(s.id),ll.push(s)}function cA(s){try{yc.flush(s.id)}finally{ll=ll.filter(t=>t.id!==s.id)}}function uA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let fA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new PC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=sA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=aA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&uA(this)}mutate(t){if(this.state!==`pending`)throw new ex;oA(this);try{t()}finally{cA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=lA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new nx;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new sx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class hA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=ac();if(!u&&!this.config.onInsert)throw new XC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new KC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Za({metadata:{[sc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=ac();if(!u&&!this.config.onDelete)throw new WC;if(Array.isArray(r)&&r.length===0)throw new FC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new JC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Za({autoCommit:!0,metadata:{[sc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new jC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new Y0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new $0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new Y0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new $0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new HC(i):new qC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new GC;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=ac();if(!o&&!this.config.onUpdate)throw new ZC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new $C;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new YC(w);return E});let y;u?y=nA(m,p):y=[eA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new QC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Za({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Za({metadata:{[sc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class dA extends zv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Zd(s){const t=new Wd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Wd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new UC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new dA,this._indexes=new GT,this._lifecycle=new LT(t,this.id),this._mutations=new hA(t,this.id),this._state=new TT(t),this._sync=new IT(t,this.id),this.comparisonOpts=pA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return CT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function pA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function gA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function yA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Za({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(gA(u))throw new tx}),o}}function mA(s){const t=SA(s);let i=s,r,l=0;const o=10;for(;lLv(u)),l=Iv(r),o=Nv(s);for(const[u,d]of l.singleSource)vA(s,u)&&!o.has(u)&&t.set(u,d);return t}function vA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Nv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function yd(s){const t={...s,from:s.from.type===`queryRef`?new Sn(yd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(yd(i.from.query),i.from.alias):i.from}))};return wA(t)}function wA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=Sd(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!G0(d)),r=Sd(t).map(d=>Lv(d)),l=Iv(r),o=EA(s,l),u=s.where.filter(d=>G0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Bv(s){return{...s,from:md(s.from),join:s.join?.map(t=>({...t,from:md(t.from)}))}}function md(s){if(s.type===`collectionRef`)return s;const t=Bv(s.query);if(bA(t)){const i=md(t.from);return i.type===`collectionRef`?new Nr(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function Sd(s){const t=[];for(const i of s){const r=qd(i);t.push(...Pd(r))}return t}function Pd(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...Pd(i));return t}else return[s]}function Lv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Iv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function EA(s,t){const i=new Set,r=Nv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=SS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:SS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(MC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Pd(qd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Rr(s){return{from:s.from.type===`collectionRef`?new Nr(s.from.collection,s.from.alias):new Sn(Rr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Nr(t.from.collection,t.from.alias):new Sn(Rr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function SS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Nr(s.collection,s.alias):new Sn(Rr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Nr(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!OA(s.query,r,s.alias))return new Sn(Rr(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(Rr(s.query),s.alias);const l=s.query.where||[],o={...Rr(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function CA(s,t,i){return s.select?Hv(s.select)||RA(s.select,t,i):!1}function xA(s){return s.groupBy&&s.groupBy.length>0}function _A(s){return s.having&&s.having.length>0}function TA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function AA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function OA(s,t,i){return!(CA(s,t,i)||xA(s)||_A(s)||TA(s)||AA(s))}function Hv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Hv(i))return!0}return!1}function tp(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...tp(i));break}return t}function RA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const l=tp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=tp(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new Ux;return s.length===1?s[0]:new Je(`and`,s)}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=kA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function kA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=zA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new F0(r);if(!X)throw new F0(I);const{activeSource:tt,lazySource:J}=NA(t.type,K,X),et=Object.keys(i),{mainExpr:nt,joinedExpr:Ct}=UA(t.left,t.right,et,z),Kt=he(nt),ht=he(Ct);let M=s.pipe(ce(([Z,at])=>[Ar(Kt(at)),[Z,at]])),q=L.pipe(ce(([Z,at])=>{const ut={[z]:at};return[Ar(ht(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new bx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,at=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=nt.type===`func`||Ct.type===`func`;if(!at&&!ut){const _=tt===`main`?z:l;y.add(_);const H=tt===`main`?M:q,Q=sl(w,tt===`main`?Ct:nt,J),ot=Q.collection,it=Q.path[0];it&&Bc(it,Q.path,ot);const gt=H.pipe(sT(Dt=>{const vt=N[_]||_,ln=g[vt];if(!ln)throw new zx(vt,_,J.id,Object.keys(g));if(ln.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[dt]])=>dt),st=new Me(Q.path);ln.requestSnapshot({where:RT(st,Es),optimizedOnly:!0})||ln.requestSnapshot()}));tt===`main`?M=gt:q=gt}}return M.pipe(kv(q,t.type),jA(t.type))}function UA(s,t,i,r){const l=i.filter(d=>d!==r),o=vd(s),u=vd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Cx:o===u?new Ex(o):l.includes(o)?u!==r?new _x(r):new Tx:new xx(o)}function vd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=vd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new Sv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new Ax(s.type)}}function jA(s){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function NA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeIA(l,r)))}function qA(s){return s.type===`agg`}function KA(s){return s&&typeof s==`object`&&!Br(s)}function qv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?l:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(KA(o)){qv([...s,r],o,i);continue}if(qA(o)||Lr(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Br(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const Mr=Symbol(`includesRouting`);function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:b,sourceWhereClauses:w}=mA(s);let E=b;g.set(E,s),Cd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=GA(E.from,T,i,r,l,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,at])=>[FA(at,ht),[Z,at]])).pipe(kv(m,`inner`)).pipe(ys(([Z,[at]])=>at!=null),ce(([Z,[at,ut]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=MA(X,E.join,A,I,z,T,p,g,i,r,l,o,u,d,s,vc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=qd(ht),q=he(M);X=X.pipe(ys(([Z,at])=>Dr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Dr(ht(q))));const tt=[],J=[];if(E.select){const ht=YA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));at=X.pipe(ce(([Y,Q])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(Q);let Dt=ot[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(Av(H=>H.map(([Y,Q])=>[Y,Q>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ut,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:he(Q)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:Q=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(Q);let Dt=ot[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});QA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new fx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new hx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=HA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[Mr]=q,[ht,M]})));const et=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=cS(X,E.groupBy,E.having,E.select,E.fnHaving,I,et):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Lr(M))&&(X=cS(X,[],E.having,E.select,E.fnHaving,I,et)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new px;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(Y_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=ET(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ut,[_,H]])=>{const Y=_.$selected,Q=vS(Ed(Y),_);if(m){const ot=_[z]?.__correlationKey,it=_.__parentContext??null;return delete Q.__correlationKey,delete Q.__parentContext,[ut,[Q,H,ot,it]]}return[ut,[Q,H]]})),at={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new gx;const Ct=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=vS(Ed(q),M);if(m){const at=M[z]?.__correlationKey,ut=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ut]]}return[ht,[Z,void 0]]})),Kt={collectionId:I,pipeline:Ct,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function VA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=VA(s);for(const l of i)if(t.has(l))throw new yx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type===`queryRef`&&bd(l.from.query,r)}function GA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new Sv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=vc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Ed(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new mx(s.type)}}function $A(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Ed(s){return $A(s)?s.value:s}function vS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Cd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),Cd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=ep(l,t);r.push(o)}return new Je(s.name,r)}}function np(s,t){return s.map(r=>{const l=ep(r.expression,t);return{...r,expression:l}})}const Gv=new WeakMap;function JA(s){return s.utils?.[Fd]?.getBuilder?.()}function XA(s,t){Gv.set(s,t)}function ZA(s){return Gv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Yo(i,d)}if(Array.isArray(t))throw new Yo(i,`array`);if(r.length!==1)throw r.length===0?new Yo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Yo(i,`string`):new ax(i);const l=r[0],o=t[l];let u;if(o instanceof Wd)u=new Nr(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new lx(i);u=new Sn(d,l)}else throw new ox(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new cx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=sc(l)?ie(l):l;if(!Br(o))throw new Q0(wS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?dS(i):Ei(i),l=t(r),o=sc(l)?ie(l):l;if(!Br(o))throw new Q0(wS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let l=t(r);sc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Yv(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?dS(r):Ei(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=Array.isArray(l)?l.map(d=>ie(d)):[ie(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ux;return this.query}}function wS(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function WA(s){return s===void 0?ie(null):s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function $v(s){return s!==null&&typeof s==`object`&&!Br(s)&&!s.__refProxy}function Yv(s,t=[]){if(!$v(s))return WA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Nh(l,r,t,`collection`);continue}if(l instanceof DT){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`array`);continue}if(l instanceof MT){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`concat`);continue}i[r]=Yv(l,t)}return i}function sp(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...sp(i));break}return t}function PA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return sp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)PA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of sp(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||$v(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=DC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function bS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function tO(s){const t=s(new Wt);return Qv(t)}function Qv(s){return s._getQuery()}function eO(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):ip(d)&&l(d))}return r(s),t}function Fv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Fv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function nO(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?l(d.query):ip(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function ip(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function sO(s){const t=typeof s.query==`function`?tO(s.query):Qv(s.query);if(t.select&&!ip(t.select))throw new dx;return t}function iO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*rO(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function aO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function lO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function oO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?np(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function cO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=il({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=np(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const ES=Symbol.for(`@tanstack/db.collection-config-builder`);class uO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=ep(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=aO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=iO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=oO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=rO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=np(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[ES]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[ES])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=cO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=lO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let fO=0;class hO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++fO}`,this.query=sO({query:t.query}),this.collections=eO(this.query);const i=nO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Jv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Fv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Fd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Nx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??rc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new q_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new jx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(cd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(vO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=mO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,xd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(cd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Ir(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Xv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=ZA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new uO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Jv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function CS(s){return s.materialization!==`collection`}function xS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Xv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(cd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Ir(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Xv(i.childCompilationResult.includes,t)),l})}function dO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function pO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function gO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Mr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Mr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function yO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Zv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function Ir(s,t){return t==null?s:JSON.stringify([s,t])}function _S(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Jv(u):void 0,m={collection:Zd({id:`__child-collection:${s}-${t}-${il(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=dO(l)),m}function xd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Mr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Ir(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=_S(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=xS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=CS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=_S(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&SO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}gO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=pO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&xd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&xd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=CS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=xS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Mr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Ir(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(yO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Mr]}function mO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function SO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function vO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function TS(s){return new hO(s).getConfig()}function Bh(s){if(typeof s==`function`){const i=TS({query:s});return AS(i)}else{const t=s,i=TS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),AS(i)}}function AS(s){const t=Zd(s),i=JA(s);return i&&XA(t,i),t}function Wv(s){return s!=null&&`operation`in s.headers}function Pv(s){return s!=null&&`control`in s.headers}var wO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Wv(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Pv(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const OS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function EO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function tw(s){for(const r of Object.keys(s))if(OS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(OS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...EO(l.type,l.primaryKey,l.schema)};return i}function ew(s){const{streamOptions:t,state:i,actions:r}=s,l=new Hn(t),o=new wO,u={};for(const[b,w]of Object.entries(i)){const E=Zd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:bO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Wv(N)?o.dispatchChange(N):Pv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=yA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const rp=600,CO=rp/2*1e3,xO=3600*24,_O={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Lh=tw({rooms:{schema:_O,type:`stream`,primaryKey:`roomId`}}),TO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},RS=tw({scores:{schema:TO,type:`stream`,primaryKey:`playerName`}});function AO(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nw=W.createContext(null);function sw(){const s=W.useContext(nw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function OO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Nd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:xO}),o=await AO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):F.jsx(nw.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function RO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new dA,this._indexes=new GT,this._lifecycle=new LT(t,this.id),this._mutations=new hA(t,this.id),this._state=new TT(t),this._sync=new IT(t,this.id),this.comparisonOpts=pA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return CT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function pA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function gA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function yA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Za({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(gA(u))throw new tx}),o}}function mA(s){const t=SA(s);let i=s,r,l=0;const o=10;for(;lLv(u)),l=Iv(r),o=Nv(s);for(const[u,d]of l.singleSource)vA(s,u)&&!o.has(u)&&t.set(u,d);return t}function vA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Nv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function yd(s){const t={...s,from:s.from.type===`queryRef`?new Sn(yd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(yd(i.from.query),i.from.alias):i.from}))};return wA(t)}function wA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=Sd(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!G0(d)),r=Sd(t).map(d=>Lv(d)),l=Iv(r),o=EA(s,l),u=s.where.filter(d=>G0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Bv(s){return{...s,from:md(s.from),join:s.join?.map(t=>({...t,from:md(t.from)}))}}function md(s){if(s.type===`collectionRef`)return s;const t=Bv(s.query);if(bA(t)){const i=md(t.from);return i.type===`collectionRef`?new Br(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function Sd(s){const t=[];for(const i of s){const r=qd(i);t.push(...Pd(r))}return t}function Pd(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...Pd(i));return t}else return[s]}function Lv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Iv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function EA(s,t){const i=new Set,r=Nv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=SS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:SS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(MC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Pd(qd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Dr(s){return{from:s.from.type===`collectionRef`?new Br(s.from.collection,s.from.alias):new Sn(Dr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Br(t.from.collection,t.from.alias):new Sn(Dr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function SS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Br(s.collection,s.alias):new Sn(Dr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Br(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!OA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);const l=s.query.where||[],o={...Dr(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function CA(s,t,i){return s.select?Hv(s.select)||RA(s.select,t,i):!1}function xA(s){return s.groupBy&&s.groupBy.length>0}function _A(s){return s.having&&s.having.length>0}function TA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function AA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function OA(s,t,i){return!(CA(s,t,i)||xA(s)||_A(s)||TA(s)||AA(s))}function Hv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Hv(i))return!0}return!1}function tp(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...tp(i));break}return t}function RA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const l=tp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=tp(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new Ux;return s.length===1?s[0]:new Je(`and`,s)}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=kA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function kA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=zA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new F0(r);if(!X)throw new F0(I);const{activeSource:tt,lazySource:J}=NA(t.type,K,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:Ct}=UA(t.left,t.right,nt,z),Kt=he(st),ht=he(Ct);let M=s.pipe(ce(([Z,at])=>[Or(Kt(at)),[Z,at]])),q=L.pipe(ce(([Z,at])=>{const ut={[z]:at};return[Or(ht(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new bx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,at=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=st.type===`func`||Ct.type===`func`;if(!at&&!ut){const _=tt===`main`?z:l;y.add(_);const H=tt===`main`?M:q,F=il(w,tt===`main`?Ct:st,J),ot=F.collection,it=F.path[0];it&&Bc(it,F.path,ot);const gt=H.pipe(sT(Dt=>{const vt=N[_]||_,ln=g[vt];if(!ln)throw new zx(vt,_,J.id,Object.keys(g));if(ln.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[dt]])=>dt),et=new Me(F.path);ln.requestSnapshot({where:RT(et,Es),optimizedOnly:!0})||ln.requestSnapshot()}));tt===`main`?M=gt:q=gt}}return M.pipe(kv(q,t.type),jA(t.type))}function UA(s,t,i,r){const l=i.filter(d=>d!==r),o=vd(s),u=vd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Cx:o===u?new Ex(o):l.includes(o)?u!==r?new _x(r):new Tx:new xx(o)}function vd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=vd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new Sv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new Ax(s.type)}}function jA(s){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function NA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeIA(l,r)))}function qA(s){return s.type===`agg`}function KA(s){return s&&typeof s==`object`&&!Lr(s)}function qv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?l:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(KA(o)){qv([...s,r],o,i);continue}if(qA(o)||Ir(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Lr(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const kr=Symbol(`includesRouting`);function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:b,sourceWhereClauses:w}=mA(s);let E=b;g.set(E,s),Cd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=GA(E.from,T,i,r,l,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,at])=>[FA(at,ht),[Z,at]])).pipe(kv(m,`inner`)).pipe(ys(([Z,[at]])=>at!=null),ce(([Z,[at,ut]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=MA(X,E.join,A,I,z,T,p,g,i,r,l,o,u,d,s,vc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=qd(ht),q=he(M);X=X.pipe(ys(([Z,at])=>Mr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Mr(ht(q))));const tt=[],J=[];if(E.select){const ht=YA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));at=X.pipe(ce(([Y,F])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(F);let Dt=ot[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(Av(H=>H.map(([Y,F])=>[Y,F>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ut,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:he(F)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:F=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(F);let Dt=ot[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});QA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new fx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new hx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=HA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[kr]=q,[ht,M]})));const nt=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=cS(X,E.groupBy,E.having,E.select,E.fnHaving,I,nt):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Ir(M))&&(X=cS(X,[],E.having,E.select,E.fnHaving,I,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new px;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(Y_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=ET(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ut,[_,H]])=>{const Y=_.$selected,F=vS(Ed(Y),_);if(m){const ot=_[z]?.__correlationKey,it=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ut,[F,H,ot,it]]}return[ut,[F,H]]})),at={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new gx;const Ct=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=vS(Ed(q),M);if(m){const at=M[z]?.__correlationKey,ut=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ut]]}return[ht,[Z,void 0]]})),Kt={collectionId:I,pipeline:Ct,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function VA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=VA(s);for(const l of i)if(t.has(l))throw new yx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type===`queryRef`&&bd(l.from.query,r)}function GA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new Sv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=vc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Ed(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new mx(s.type)}}function $A(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Ed(s){return $A(s)?s.value:s}function vS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Cd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),Cd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=ep(l,t);r.push(o)}return new Je(s.name,r)}}function np(s,t){return s.map(r=>{const l=ep(r.expression,t);return{...r,expression:l}})}const Gv=new WeakMap;function JA(s){return s.utils?.[Fd]?.getBuilder?.()}function XA(s,t){Gv.set(s,t)}function ZA(s){return Gv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Qo(i,d)}if(Array.isArray(t))throw new Qo(i,`array`);if(r.length!==1)throw r.length===0?new Qo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Qo(i,`string`):new ax(i);const l=r[0],o=t[l];let u;if(o instanceof Wd)u=new Br(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new lx(i);u=new Sn(d,l)}else throw new ox(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new cx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=ic(l)?ie(l):l;if(!Lr(o))throw new Q0(wS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?dS(i):Ei(i),l=t(r),o=ic(l)?ie(l):l;if(!Lr(o))throw new Q0(wS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let l=t(r);ic(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Yv(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?dS(r):Ei(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=Array.isArray(l)?l.map(d=>ie(d)):[ie(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ux;return this.query}}function wS(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function WA(s){return s===void 0?ie(null):s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function $v(s){return s!==null&&typeof s==`object`&&!Lr(s)&&!s.__refProxy}function Yv(s,t=[]){if(!$v(s))return WA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Nh(l,r,t,`collection`);continue}if(l instanceof DT){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`array`);continue}if(l instanceof MT){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`concat`);continue}i[r]=Yv(l,t)}return i}function sp(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...sp(i));break}return t}function PA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return sp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)PA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of sp(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||$v(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=DC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function bS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function tO(s){const t=s(new Wt);return Qv(t)}function Qv(s){return s._getQuery()}function eO(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):ip(d)&&l(d))}return r(s),t}function Fv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Fv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function nO(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?l(d.query):ip(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function ip(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function sO(s){const t=typeof s.query==`function`?tO(s.query):Qv(s.query);if(t.select&&!ip(t.select))throw new dx;return t}function iO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*rO(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function aO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function lO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function oO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?np(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function cO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=rl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=np(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const ES=Symbol.for(`@tanstack/db.collection-config-builder`);class uO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=ep(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=aO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=iO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=oO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=rO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=np(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[ES]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[ES])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=cO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=lO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let fO=0;class hO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++fO}`,this.query=sO({query:t.query}),this.collections=eO(this.query);const i=nO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Jv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Fv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Fd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Nx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ac()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new q_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new jx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(cd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(vO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=mO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,xd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(cd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Xv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=ZA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new uO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Jv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function CS(s){return s.materialization!==`collection`}function xS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Xv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(cd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Xv(i.childCompilationResult.includes,t)),l})}function dO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function pO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function gO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function yO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Zv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function Hr(s,t){return t==null?s:JSON.stringify([s,t])}function _S(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Jv(u):void 0,m={collection:Zd({id:`__child-collection:${s}-${t}-${rl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=dO(l)),m}function xd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[kr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Hr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=_S(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=xS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=CS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=_S(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&SO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}gO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=pO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&xd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&xd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=CS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=xS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[kr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Hr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(yO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[kr]}function mO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function SO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function vO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function TS(s){return new hO(s).getConfig()}function Bh(s){if(typeof s==`function`){const i=TS({query:s});return AS(i)}else{const t=s,i=TS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),AS(i)}}function AS(s){const t=Zd(s),i=JA(s);return i&&XA(t,i),t}function Wv(s){return s!=null&&`operation`in s.headers}function Pv(s){return s!=null&&`control`in s.headers}var wO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Wv(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Pv(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const OS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function EO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function tw(s){for(const r of Object.keys(s))if(OS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(OS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...EO(l.type,l.primaryKey,l.schema)};return i}function ew(s){const{streamOptions:t,state:i,actions:r}=s,l=new Hn(t),o=new wO,u={};for(const[b,w]of Object.entries(i)){const E=Zd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:bO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Wv(N)?o.dispatchChange(N):Pv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=yA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const rp=600,CO=rp/2*1e3,xO=3600*24,_O={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Lh=tw({rooms:{schema:_O,type:`stream`,primaryKey:`roomId`}}),TO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},RS=tw({scores:{schema:TO,type:`stream`,primaryKey:`playerName`}});function AO(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nw=W.createContext(null);function sw(){const s=W.useContext(nw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function OO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Nd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:xO}),o=await AO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):Q.jsx(nw.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function RO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. Instead, use a query builder function: const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Qt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return F.jsxs(`div`,{style:Ae.container,children:[F.jsx(`style`,{children:` +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Ft={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return Q.jsxs(`div`,{style:Ae.container,children:[Q.jsx(`style`,{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); .lobby-btn:active { opacity: 0.7; } - `}),F.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),F.jsx(`div`,{style:{fontSize:7,color:Qt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),F.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&F.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:F.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[F.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),F.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),F.jsxs(`div`,{style:{display:`flex`,gap:6},children:[F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),F.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&F.jsxs(`div`,{style:Ae.card,children:[F.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),F.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>F.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Qt.bg,color:Qt.dim,border:`1px solid ${Qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:Qt.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Qt.bg,color:Qt.dim,border:`1px solid ${Qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Qt.bg,border:`1px solid ${Qt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?Qt.accent:Qt.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:Qt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Qt.bg,color:Qt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Qt.accent,marginBottom:6},card:{background:Qt.card,border:`1px solid ${Qt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Qt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Qt.bg,border:`1px solid ${Qt.border}`,padding:`8px 10px`,color:Qt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Qt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Qt.accent,border:`1px solid ${Qt.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,ac=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ll=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lol.encode(s),QO=ol?YO:$O;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class wl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Qr=()=>new wl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Yr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),cl=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&ac(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class lc{constructor(){this.encoder=new wl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new wl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new lc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const Hr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),qr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(qr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(qr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>nl.decode(je(s)),Ai=nl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-qr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class oc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new oc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,fl=Symbol(`Equality`),hw=(s,t)=>s===t||s[fl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},bl=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&bl(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fl]!=null)return s[fl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const hl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(hl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(hl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=hl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!hl||process.stdout.isTTY)&&(!hl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Md=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[fl]?hw(s,t):Lc(s)?ap(s,i=>iw(t,r=>Md(i,r))):vR(s)?bl(s,(i,r)=>Md(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Md(i,r)}equals(t){return this.constructor===t.constructor&&kr(this.shape,t.shape)}[NR](){return!0}[fl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Fr(this,Yc)}get optional(){return new vw(this)}cast(t){return KS(t,this),t}expect(t){return KS(t,this),t}}class pp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new pp(s,t);ue(pp);class gp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new gp(s);ue(gp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Vc=(...s)=>new Kc(s),mw=ue(Kc),LR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Sw=s=>{if(Kr.check(s))return[LR(s)];if(mw.check(s))return s.shape.map(t=>t+``);if(Ow.check(s))return[`[+-]?\\d+.?\\d*`];if(Rw.check(s))return[`.*`];if(xc.check(s))return s.shape.map(Sw).flat(1);bn()};class IR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Sw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(IR);const HR=Symbol(`optional`);class vw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[HR](){return!0}}const qR=ue(vw);class KR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(KR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):bl(this.shape,(r,l)=>{const o=this._isPartial&&!fp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const VR=s=>new Gc(s),GR=ue(Gc),$R=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class ww extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&bl(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const bw=(s,t)=>new ww(s,t),YR=ue(ww);class Ew extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&bl(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const QR=(...s)=>new Ew(s);ue(Ew);class Cw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new yp(t)}check(t,i){const r=Lc(t)&&ap(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const xw=(...s)=>new Cw(s),FR=ue(Cw),JR=be(s=>Lc(s));class _w extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const XR=(s,t=null)=>new _w(s,t);ue(_w);const ZR=XR(Ie);class WR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=QR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const PR=ue(WR),tD=be(s=>typeof s==`function`);class eD extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(eD,s=>s.shape.length>0);class yp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=iw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Fr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Fr(...s.map(t=>dl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new yp(s),xc=ue(yp),Tw=()=>!0,_c=be(Tw),nD=ue(gp,s=>s.shape===Tw),mp=be(s=>typeof s==`bigint`),sD=be(s=>s===mp),Aw=be(s=>typeof s==`symbol`);be(s=>s===Aw);const Ur=be(s=>typeof s==`number`),Ow=be(s=>s===Ur),Kr=be(s=>typeof s==`string`),Rw=be(s=>s===Kr),$c=be(s=>typeof s==`boolean`),iD=be(s=>s===$c),Dw=Vc(void 0);ue(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),rD=ue(Kc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(pp,s=>s.shape===Uint8Array);const aD=Fr(Ur,Kr,Yc,Dw,mp,$c,Aw);(()=>{const s=xw(_c),t=bw(Kr,_c),i=Fr(Ur,Kr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const dl=s=>{if(ZR.check(s))return s;if($R.check(s)){const t={};for(const i in s)t[i]=dl(s[i]);return VR(t)}else{if(JR.check(s))return Fr(...s.map(dl));if(aD.check(s))return Vc(s);if(tD.check(s))return ue(s)}bn()},KS=OR?()=>{}:(s,t)=>{const i=new BR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:dl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew lD(s),Mw=oD(_c).if(Ow,(s,t)=>Qh(t,kS,wc)).if(Rw,(s,t)=>jR(t)).if(iD,(s,t)=>qS(t)).if(sD,(s,t)=>BigInt(Qh(t,kS,wc))).if(xc,(s,t)=>Cr(t,Fh(t,s.shape))).if(GR,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(qR.check(l)){if(qS(t))continue;l=l.shape}i[r]=Mw(l,t)}return i}).if(FR,(s,t)=>{const i=[],r=yw(t,0,42);for(let l=0;lFh(t,s.shape)).if(rD,(s,t)=>null).if(PR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(nD,(s,t)=>Cr(t,Fh(t,[Ur,Kr,Yc,Dw,mp,$c,xw(Ur),bw(Fr(`a`,`b`,`c`),Ur)]))).if(YR,(s,t)=>{const i={},r=Qh(t,0,3);for(let l=0;lMw(dl(t),s),Qc=typeof document<`u`?document:{};be(s=>s.nodeType===dD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===uD);be(s=>s.nodeType===fD);const cD=s=>UO(s,(t,i)=>`${i}:${t};`).join(``),uD=Qc.ELEMENT_NODE,fD=Qc.TEXT_NODE,hD=Qc.DOCUMENT_NODE,dD=Qc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===hD);const ws=Symbol,kw=ws(),Uw=ws(),pD=ws(),gD=ws(),yD=ws(),zw=ws(),mD=ws(),Sp=ws(),SD=ws(),vD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...jw(s)),Nw.forEach(t=>t.print(s))},CD=(...s)=>{console.warn(...jw(s)),s.unshift(Sp),Nw.forEach(t=>t.print(s))},Nw=Oi(),Bw=s=>({[Symbol.iterator](){return this},next:s}),xD=(s,t)=>Bw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Jh=(s,t)=>Bw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Lw{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Iw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=kn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&_D(i,t.clock)!==null},vp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Yr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new Lw(i,r))},wp=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const l=r.length;At(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return At(o.restEncoder,0),wp(o,r),o.toUint8Array()}return null},qw=uw;class Jr extends rw{constructor({guid:t=gR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=qw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new $w,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=IS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>IS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Vt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Vt(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Oe&&l!==i)if(l===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,jr)}getText(t=``){return this.get(t,Gr)}getMap(t=``){return this.get(t,Vr)}getXmlElement(t=``){return this.get(t,$r)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Jr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Vt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class OD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class RD extends OD{readLeftID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return qr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return ul(this.restDecoder)}readBuf(){return kR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class DD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DD{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new Yh(je(t)),this.clientDecoder=new oc(je(t)),this.leftClockDecoder=new Yh(je(t)),this.rightClockDecoder=new Yh(je(t)),this.infoDecoder=new LS(je(t),qr),this.stringDecoder=new hR(je(t)),this.parentInfoDecoder=new LS(je(t),qr),this.typeRefDecoder=new oc(je(t)),this.lenDecoder=new oc(je(t))}readLeftID(){return new zr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new zr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ul(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ul(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Yr(r,t[0].id.clock);const l=Gn(t,r);At(s.restEncoder,t.length-l),s.writeClient(i),At(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zD(s,t.clients.get(l),l,o)})},jD=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=ni(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new $w,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Jc;return Kw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},BD=(s,t)=>Kw(s,t.doc.store,t.beforeState),LD=(s,t,i,r=new Ac(s))=>Vt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=jD(r,u),g=ND(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=ZS([m.update,g.update])}}else d.pendingStructs=g;const y=VS(r,l,d);if(d.pendingDs){const v=new Ac(Hr(d.pendingDs));wt(v.restDecoder);const b=VS(v,l,d);y&&b?d.pendingDs=ZS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,Vw(l.doc,v)}},i,!1),Vw=(s,t,i,r=Ac)=>{const l=Hr(t);LD(l,s,i,new r(l))},GS=(s,t,i)=>Vw(s,t,i,RD);class ID{constructor(){this.l=[]}}const $S=()=>new ID,YS=(s,t)=>s.l.push(t),QS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>hp(s.l,[t,i]);class zr{constructor(t,i){this.client=t,this.clock=i}}const Jo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new zr(s,t),HD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Tr=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Hw(t.ds,s.id),kd=(s,t)=>{const i=vs(s.meta,kd,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class $w{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Yw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Gn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Gn(i,t.clock)]},Xh=qD,Ud=(s,t,i)=>{const r=Gn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[Ud(s,i,t.clock)]},FS=(s,t,i)=>{const r=t.clients.get(i.client),l=Gn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Uc(s,o,i.clock-o.id.clock+1)),o},KD=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Gn(r,t.id.clock)]=i},Qw=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ud(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(vp(t.deleteSet),BD(s,t),wp(s,t.deleteSet),!0),XS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},cc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},GD=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Gn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=aw(l.length-1,1+Gn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+cc(l,p)}})},Fw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Gw(g._dEH,p,i))})}),d.push(()=>r.emit(`afterTransaction`,[i,r])),hp(d,[]),i._needFormattingCleanup&&uM(i)}finally{r.gc&&GD(o,l,r.gcFilter),$D(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Yr(Gn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+cc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Gn(b,v);w+11||w>0&&cc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(ED(Sp,kw,`[yjs] `,Uw,zw,`Changed the client-id because another client seems to be using it.`),r.clientID=qw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new kD;JS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Jc;JS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Fw(s,t+1)}}},Vt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new VD(s,i,r),l.push(s._transaction),l.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Fw(l,0)}}return u};function*YD(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new de(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},ZS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(Hr(m)));let l=r.map(m=>new QD(m,!0)),o=null;const u=new i,d=new FD(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)$a(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=JD(v,w)),o.struct.mergeWith(v)||($a(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())$a(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&($a(d,o.struct,o.offset),o=null),XD(d);const p=r.map(m=>AD(m)),g=TD(p);return wp(u,g),u.toUint8Array()},Jw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Qr(),s.written=0)},$a=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Jw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},XD=s=>{Jw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Kh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Kh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Kh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(WS);const i=this.target,r=Oi(),l=Oi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const ZD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{CD(`Invalid access: Add Yjs type to a document before reading data.`)},Xw=80;let Ep=0;class WD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ep++}}const PD=s=>{s.timestamp=Ep++},Zw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=Ep++},tM=(s,t,i)=>{if(s.length>=Xw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>ac(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&ac(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Yr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;vs(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=$S(),this._dEH=$S(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){YS(this._eH,t)}observeDeep(t){YS(this._dEH,t)}unobserve(t){QS(this._eH,t)}unobserveDeep(t){QS(this._dEH,t)}toJSON(){}}const Ww=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Pw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return gl(s,(r,l)=>{i.push(t(r,l,s))}),i},eM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},eb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Di(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new El(new Uint8Array(y))),l.integrate(s,0);break;case Jr:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Cl(y)),l.integrate(s,0);break;default:if(y instanceof Oe)l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},nb=()=>Vn(`Length exceeded!`),sb=(s,t,i,r)=>{if(i>t._length)throw nb();if(i===0)return t._searchMarker&&pl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},ib=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw nb();t._searchMarker&&pl(t._searchMarker,l,-o+r)},Rc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Cp=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new El(r);break;case Jr:d=new Cl(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},xp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},rb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},sM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Tr(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Xo=s=>(s.doc??ke(),xD(s._map.entries(),t=>!t[1].deleted));class iM extends Xc{}class jr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new jr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new jr}clone(){const t=new jr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new iM(this,t))}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Vt(this.doc,i=>{nM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return eb(this,t)}toArray(){return Pw(this)}slice(t=0,i=this.length){return Ww(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return tb(this,t)}forEach(t){gl(this,t)}[Symbol.iterator](){return eM(this)}_write(t){t.writeTypeRef(RM)}}const rM=s=>new jr;class aM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Vr extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Vr}clone(){const t=new Vr;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new aM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Oe?l.toJSON():l}}),t}get size(){return[...Xo(this)].length}keys(){return Jh(Xo(this),t=>t[0])}values(){return Jh(Xo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Jh(Xo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return xp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?Vt(this.doc,t=>{this.forEach(function(i,r,l){Rc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const lM=s=>new Vr,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&xR(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case pe:this.right.deleted||Xr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const PS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case pe:t.right.deleted||Xr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return PS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return PS(s,u,i)}},lb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Xr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ob=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},cb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Zh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l),p=r.constructor===String?new $n(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&pl(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),lb(s,t,i,d)},tv=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` -`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new $n(p)),i.right.integrate(s,0),i.forward()}lb(s,t,i,d)},ub=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case pe:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Xr(l,g);break}}}t=t.right}return d},oM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},cM=s=>{let t=0;return Vt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=_d(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case pe:Xr(u,l.content);break;default:t+=ub(i,r,l,o,u),o=_d(u),r=l;break}l=l.right}}),t},uM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&Qw(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}Vt(i,r=>{Iw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===pe?t.add(o):oM(r,l)});for(const l of t)cM(l)})},ev=(s,t,i)=>{const r=i,l=_d(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case $n:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Vt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},CR(p)||(b.attributes=wR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case $n:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Xr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Gr extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Gr}clone(){const t=new Gr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new fM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===$n&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Vt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Tr(p,t)||i!==void 0&&Tr(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Tr(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Tr(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Tr(p,t)&&(g(),Xr(o,p.content));break}p=p.right}g()};return t||i?Vt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Vt(r,l=>{ev(l,Zo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Vt(l,o=>{const u=Zo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new Gr;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),gl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Vt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Vt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Vt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){gl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class $r extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Vt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Vt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return gl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new $r(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Vr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class El{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new El(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new El(s.readBuf());class yl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new yl(this.len)}splice(t){const i=new yl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new yl(s.readLen()),fb=(s,t)=>new Jr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Cl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Cl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new Cl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===zr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===zr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Jo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new yl(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ll);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===zr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),kr(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Qr();At(l,r);for(let o=0;o{const r=Hr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class uc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Qr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=Hr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Hr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(uc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(uc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(sv.Provider,{value:{scoresDB:l},children:t}):F.jsx(sv.Provider,{value:null,children:t})}const Yt=14,FM=30,JM=25,iv=120,XM=1500,Wo=.5,ZM=1,Ya=8,rv=14,Jt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const xr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function fc(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=fc(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),et=W.useRef({x:0,y:0,stunnedUntil:0}),nt=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(nt/g*100),[nt,g]),Kt=W.useMemo(()=>{const st=new Map;return m.forEach(P=>{st.set(P.owner,(st.get(P.owner)||0)+1)}),st},[m]),ht=W.useMemo(()=>{let st=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>st&&(st=Mt,P=kt)}),!P||st===0)return null;const dt=Math.round(st/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const st=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);et.current={x:st,y:P,stunnedUntil:0},E({x:st,y:P});const dt=Ci(t);dt.set(l,{x:st,y:P,name:o,color:u});const pt=fc(t);return t.transact(()=>{pt.set(`${st},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const st=fc(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Wo*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return st.observe(P),P(),()=>st.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const st=Ci(t),P=()=>{b(td(t,l))};return st.observe(P),P(),()=>st.unobserve(P)},[t,l]),W.useEffect(()=>{const st=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,st),st(),()=>i.off(`change`,st)},[i,t,l,o]),W.useEffect(()=>{const st=new Set,P=pt=>{if(pt.key in xr){pt.preventDefault();const Mt=!J.current;st.add(pt.key),J.current=xr[pt.key],Mt&&Q.current?.(xr[pt.key])}},dt=pt=>{if(st.delete(pt.key),pt.key in xr){let Mt=!1;for(const kt of st)if(kt in xr){J.current=xr[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((st,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?Q.current?.({dx:Qn>0?1:-1,dy:0}):Q.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(st=>{st.preventDefault();const P=st.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(st=>{if(st.preventDefault(),!q.current)return;const P=st.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),Q=W.useRef(void 0),ot=W.useCallback(st=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=st.clientX,dt.y=st.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Yt-.5,te=Mt.y/Yt-.5,Cn=et.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?Q.current?.({dx:Ue>0?1:-1,dy:0}):Q.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const st=dt=>{const pt=et.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const _l=Ci(t);_l.set(_n,{...Li,stunnedUntil:xs}),_l.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=fc(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const xl=e2(l,Qn,d,p,Re);xl.length>0&&t.transact(()=>{for(const _n of xl)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};Q.current=st;const P=setInterval(()=>{const dt=J.current;dt&&st(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Yt,Dt=p*Yt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>F.jsxs(F.Fragment,{children:[Array.from({length:d},(st,P)=>F.jsx(`line`,{x1:P*Yt,y1:0,x2:P*Yt,y2:Dt,stroke:Jt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(st,P)=>F.jsx(`line`,{x1:0,y1:P*Yt,x2:gt,y2:P*Yt,stroke:Jt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const st=new Map;return st.set(l,u),v.forEach((P,dt)=>{st.set(dt,P.color)}),st},[l,u,v]);return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Jt.bg,color:Jt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` + `}),Q.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),Q.jsx(`div`,{style:{fontSize:7,color:Ft.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),Q.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),Q.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&Q.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:Q.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),Q.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>Q.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),Q.jsxs(`span`,{style:{fontSize:7,color:Ft.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:Q.jsx(`span`,{style:{fontSize:8,color:i?Ft.accent:Ft.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),Q.jsx(`button`,{className:`lobby-btn`,style:{background:Ft.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Ft.accent,marginBottom:6},card:{background:Ft.card,border:`1px solid ${Ft.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Ft.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 10px`,color:Ft.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Ft.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Ft.accent,border:`1px solid ${Ft.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,lc=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ol=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lcl.encode(s),QO=cl?YO:$O;let sl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});sl&&sl.decode(new Uint8Array).length===1&&(sl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class bl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Fr=()=>new bl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Qr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),ul=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&lc(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class oc{constructor(){this.encoder=new bl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new bl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new oc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new bl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const qr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),Kr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(Kr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Kr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>sl.decode(je(s)),Ai=sl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-Kr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class cc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new cc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,hl=Symbol(`Equality`),hw=(s,t)=>s===t||s[hl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},El=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&El(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[hl]!=null)return s[hl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const dl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(dl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(dl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=dl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!dl||process.stdout.isTTY)&&(!dl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Md=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[hl]?hw(s,t):Lc(s)?ap(s,i=>iw(t,r=>Md(i,r))):vR(s)?El(s,(i,r)=>Md(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Md(i,r)}equals(t){return this.constructor===t.constructor&&Ur(this.shape,t.shape)}[NR](){return!0}[hl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Jr(this,Yc)}get optional(){return new vw(this)}cast(t){return KS(t,this),t}expect(t){return KS(t,this),t}}class pp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new pp(s,t);ue(pp);class gp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new gp(s);ue(gp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Vc=(...s)=>new Kc(s),mw=ue(Kc),LR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Sw=s=>{if(Vr.check(s))return[LR(s)];if(mw.check(s))return s.shape.map(t=>t+``);if(Ow.check(s))return[`[+-]?\\d+.?\\d*`];if(Rw.check(s))return[`.*`];if(xc.check(s))return s.shape.map(Sw).flat(1);bn()};class IR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Sw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(IR);const HR=Symbol(`optional`);class vw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[HR](){return!0}}const qR=ue(vw);class KR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(KR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):El(this.shape,(r,l)=>{const o=this._isPartial&&!fp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const VR=s=>new Gc(s),GR=ue(Gc),$R=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class ww extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&El(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const bw=(s,t)=>new ww(s,t),YR=ue(ww);class Ew extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&El(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const QR=(...s)=>new Ew(s);ue(Ew);class Cw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new yp(t)}check(t,i){const r=Lc(t)&&ap(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const xw=(...s)=>new Cw(s),FR=ue(Cw),JR=be(s=>Lc(s));class _w extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const XR=(s,t=null)=>new _w(s,t);ue(_w);const ZR=XR(Ie);class WR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=QR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const PR=ue(WR),tD=be(s=>typeof s==`function`);class eD extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(eD,s=>s.shape.length>0);class yp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=iw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Jr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Jr(...s.map(t=>pl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new yp(s),xc=ue(yp),Tw=()=>!0,_c=be(Tw),nD=ue(gp,s=>s.shape===Tw),mp=be(s=>typeof s==`bigint`),sD=be(s=>s===mp),Aw=be(s=>typeof s==`symbol`);be(s=>s===Aw);const zr=be(s=>typeof s==`number`),Ow=be(s=>s===zr),Vr=be(s=>typeof s==`string`),Rw=be(s=>s===Vr),$c=be(s=>typeof s==`boolean`),iD=be(s=>s===$c),Dw=Vc(void 0);ue(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),rD=ue(Kc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(pp,s=>s.shape===Uint8Array);const aD=Jr(zr,Vr,Yc,Dw,mp,$c,Aw);(()=>{const s=xw(_c),t=bw(Vr,_c),i=Jr(zr,Vr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const pl=s=>{if(ZR.check(s))return s;if($R.check(s)){const t={};for(const i in s)t[i]=pl(s[i]);return VR(t)}else{if(JR.check(s))return Jr(...s.map(pl));if(aD.check(s))return Vc(s);if(tD.check(s))return ue(s)}bn()},KS=OR?()=>{}:(s,t)=>{const i=new BR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:pl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew lD(s),Mw=oD(_c).if(Ow,(s,t)=>Qh(t,kS,wc)).if(Rw,(s,t)=>jR(t)).if(iD,(s,t)=>qS(t)).if(sD,(s,t)=>BigInt(Qh(t,kS,wc))).if(xc,(s,t)=>Cr(t,Fh(t,s.shape))).if(GR,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(qR.check(l)){if(qS(t))continue;l=l.shape}i[r]=Mw(l,t)}return i}).if(FR,(s,t)=>{const i=[],r=yw(t,0,42);for(let l=0;lFh(t,s.shape)).if(rD,(s,t)=>null).if(PR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(nD,(s,t)=>Cr(t,Fh(t,[zr,Vr,Yc,Dw,mp,$c,xw(zr),bw(Jr(`a`,`b`,`c`),zr)]))).if(YR,(s,t)=>{const i={},r=Qh(t,0,3);for(let l=0;lMw(pl(t),s),Qc=typeof document<`u`?document:{};be(s=>s.nodeType===dD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===uD);be(s=>s.nodeType===fD);const cD=s=>UO(s,(t,i)=>`${i}:${t};`).join(``),uD=Qc.ELEMENT_NODE,fD=Qc.TEXT_NODE,hD=Qc.DOCUMENT_NODE,dD=Qc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===hD);const ws=Symbol,kw=ws(),Uw=ws(),pD=ws(),gD=ws(),yD=ws(),zw=ws(),mD=ws(),Sp=ws(),SD=ws(),vD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...jw(s)),Nw.forEach(t=>t.print(s))},CD=(...s)=>{console.warn(...jw(s)),s.unshift(Sp),Nw.forEach(t=>t.print(s))},Nw=Oi(),Bw=s=>({[Symbol.iterator](){return this},next:s}),xD=(s,t)=>Bw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Jh=(s,t)=>Bw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Lw{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Iw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=kn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&_D(i,t.clock)!==null},vp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Qr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new Lw(i,r))},wp=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const l=r.length;At(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return At(o.restEncoder,0),wp(o,r),o.toUint8Array()}return null},qw=uw;class Xr extends rw{constructor({guid:t=gR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=qw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new $w,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=IS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>IS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Gt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Gt(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Oe&&l!==i)if(l===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Nr)}getText(t=``){return this.get(t,$r)}getMap(t=``){return this.get(t,Gr)}getXmlElement(t=``){return this.get(t,Yr)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Xr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Gt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class OD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class RD extends OD{readLeftID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return Kr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return fl(this.restDecoder)}readBuf(){return kR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class DD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DD{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new Yh(je(t)),this.clientDecoder=new cc(je(t)),this.leftClockDecoder=new Yh(je(t)),this.rightClockDecoder=new Yh(je(t)),this.infoDecoder=new LS(je(t),Kr),this.stringDecoder=new hR(je(t)),this.parentInfoDecoder=new LS(je(t),Kr),this.typeRefDecoder=new cc(je(t)),this.lenDecoder=new cc(je(t))}readLeftID(){return new jr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new jr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return fl(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return fl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Qr(r,t[0].id.clock);const l=Gn(t,r);At(s.restEncoder,t.length-l),s.writeClient(i),At(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zD(s,t.clients.get(l),l,o)})},jD=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=ni(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new $w,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Jc;return Kw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},BD=(s,t)=>Kw(s,t.doc.store,t.beforeState),LD=(s,t,i,r=new Ac(s))=>Gt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=jD(r,u),g=ND(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=ZS([m.update,g.update])}}else d.pendingStructs=g;const y=VS(r,l,d);if(d.pendingDs){const v=new Ac(qr(d.pendingDs));wt(v.restDecoder);const b=VS(v,l,d);y&&b?d.pendingDs=ZS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,Vw(l.doc,v)}},i,!1),Vw=(s,t,i,r=Ac)=>{const l=qr(t);LD(l,s,i,new r(l))},GS=(s,t,i)=>Vw(s,t,i,RD);class ID{constructor(){this.l=[]}}const $S=()=>new ID,YS=(s,t)=>s.l.push(t),QS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>hp(s.l,[t,i]);class jr{constructor(t,i){this.client=t,this.clock=i}}const Xo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new jr(s,t),HD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Ar=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Hw(t.ds,s.id),kd=(s,t)=>{const i=vs(s.meta,kd,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class $w{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Yw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Gn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Gn(i,t.clock)]},Xh=qD,Ud=(s,t,i)=>{const r=Gn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[Ud(s,i,t.clock)]},FS=(s,t,i)=>{const r=t.clients.get(i.client),l=Gn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Uc(s,o,i.clock-o.id.clock+1)),o},KD=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Gn(r,t.id.clock)]=i},Qw=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ud(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(vp(t.deleteSet),BD(s,t),wp(s,t.deleteSet),!0),XS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},uc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},GD=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Gn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=aw(l.length-1,1+Gn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+uc(l,p)}})},Fw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Gw(g._dEH,p,i))})}),d.push(()=>r.emit(`afterTransaction`,[i,r])),hp(d,[]),i._needFormattingCleanup&&uM(i)}finally{r.gc&&GD(o,l,r.gcFilter),$D(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Qr(Gn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+uc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Gn(b,v);w+11||w>0&&uc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(ED(Sp,kw,`[yjs] `,Uw,zw,`Changed the client-id because another client seems to be using it.`),r.clientID=qw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new kD;JS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Jc;JS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Fw(s,t+1)}}},Gt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new VD(s,i,r),l.push(s._transaction),l.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Fw(l,0)}}return u};function*YD(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new de(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},ZS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(qr(m)));let l=r.map(m=>new QD(m,!0)),o=null;const u=new i,d=new FD(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Ya(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=JD(v,w)),o.struct.mergeWith(v)||(Ya(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())Ya(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ya(d,o.struct,o.offset),o=null),XD(d);const p=r.map(m=>AD(m)),g=TD(p);return wp(u,g),u.toUint8Array()},Jw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Fr(),s.written=0)},Ya=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Jw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},XD=s=>{Jw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Kh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Kh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Kh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(WS);const i=this.target,r=Oi(),l=Oi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const ZD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{CD(`Invalid access: Add Yjs type to a document before reading data.`)},Xw=80;let Ep=0;class WD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ep++}}const PD=s=>{s.timestamp=Ep++},Zw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=Ep++},tM=(s,t,i)=>{if(s.length>=Xw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>lc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&lc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Qr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;vs(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=$S(),this._dEH=$S(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){YS(this._eH,t)}observeDeep(t){YS(this._dEH,t)}unobserve(t){QS(this._eH,t)}unobserveDeep(t){QS(this._dEH,t)}toJSON(){}}const Ww=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Pw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return yl(s,(r,l)=>{i.push(t(r,l,s))}),i},eM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},eb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Di(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Cl(new Uint8Array(y))),l.integrate(s,0);break;case Xr:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new xl(y)),l.integrate(s,0);break;default:if(y instanceof Oe)l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},nb=()=>Vn(`Length exceeded!`),sb=(s,t,i,r)=>{if(i>t._length)throw nb();if(i===0)return t._searchMarker&&gl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},ib=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw nb();t._searchMarker&&gl(t._searchMarker,l,-o+r)},Rc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Cp=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new Cl(r);break;case Xr:d=new xl(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},xp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},rb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},sM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Ar(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Zo=s=>(s.doc??ke(),xD(s._map.entries(),t=>!t[1].deleted));class iM extends Xc{}class Nr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Nr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Nr}clone(){const t=new Nr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new iM(this,t))}insert(t,i){this.doc!==null?Gt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Gt(this.doc,i=>{nM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Gt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return eb(this,t)}toArray(){return Pw(this)}slice(t=0,i=this.length){return Ww(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return tb(this,t)}forEach(t){yl(this,t)}[Symbol.iterator](){return eM(this)}_write(t){t.writeTypeRef(RM)}}const rM=s=>new Nr;class aM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Gr extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Gr}clone(){const t=new Gr;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new aM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Oe?l.toJSON():l}}),t}get size(){return[...Zo(this)].length}keys(){return Jh(Zo(this),t=>t[0])}values(){return Jh(Zo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Jh(Zo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return xp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?Gt(this.doc,t=>{this.forEach(function(i,r,l){Rc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const lM=s=>new Gr,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&xR(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case pe:this.right.deleted||Zr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const PS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case pe:t.right.deleted||Zr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return PS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return PS(s,u,i)}},lb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Zr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ob=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},cb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Zh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l),p=r.constructor===String?new $n(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&gl(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),lb(s,t,i,d)},tv=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new $n(p)),i.right.integrate(s,0),i.forward()}lb(s,t,i,d)},ub=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case pe:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Zr(l,g);break}}}t=t.right}return d},oM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},cM=s=>{let t=0;return Gt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=_d(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case pe:Zr(u,l.content);break;default:t+=ub(i,r,l,o,u),o=_d(u),r=l;break}l=l.right}}),t},uM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&Qw(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}Gt(i,r=>{Iw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===pe?t.add(o):oM(r,l)});for(const l of t)cM(l)})},ev=(s,t,i)=>{const r=i,l=_d(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case $n:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Gt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},CR(p)||(b.attributes=wR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case $n:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Zr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class $r extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new $r}clone(){const t=new $r;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new fM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===$n&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Gt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Ar(p,t)||i!==void 0&&Ar(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Ar(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Ar(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Ar(p,t)&&(g(),Zr(o,p.content));break}p=p.right}g()};return t||i?Gt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Gt(r,l=>{ev(l,Wo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new $r;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Yr||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),yl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Gt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Gt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Gt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){yl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class Yr extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new Yr(this.nodeName)}clone(){const t=new Yr(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return yl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new Yr(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Gr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends $r{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Cl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Cl(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new Cl(s.readBuf());class ml{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new ml(this.len)}splice(t){const i=new ml(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new ml(s.readLen()),fb=(s,t)=>new Xr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class xl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new xl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new xl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===jr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===jr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Xo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new ml(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ol);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===jr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Ur(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Fr();At(l,r);for(let o=0;o{const r=qr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class fc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Fr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=qr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(fc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(fc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(fc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?Q.jsx(sv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(sv.Provider,{value:null,children:t})}const Qt=14,FM=30,JM=25,iv=120,XM=1500,Po=.5,ZM=1,xr=8,rv=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const _r={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function Wa(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=Wa(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>et&&(et=Mt,P=kt)}),!P||et===0)return null;const dt=Math.round(et/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const dt=Ci(t);dt.set(l,{x:et,y:P,name:o,color:u});const pt=Wa(t);return t.transact(()=>{pt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=Wa(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Po*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Ci(t),P=()=>{b(td(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=pt=>{if(pt.key in _r){pt.preventDefault();const Mt=!J.current;et.add(pt.key),J.current=_r[pt.key],Mt&&F.current?.(_r[pt.key])}},dt=pt=>{if(et.delete(pt.key),pt.key in _r){let Mt=!1;for(const kt of et)if(kt in _r){J.current=_r[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((et,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?F.current?.({dx:Qn>0?1:-1,dy:0}):F.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),F=W.useRef(void 0),ot=W.useCallback(et=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=et.clientX,dt.y=et.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Qt-.5,te=Mt.y/Qt-.5,Cn=nt.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?F.current?.({dx:Ue>0?1:-1,dy:0}):F.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=dt=>{const pt=nt.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const Tl=Ci(t);Tl.set(_n,{...Li,stunnedUntil:xs}),Tl.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=Wa(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const _l=e2(l,Qn,d,p,Re);_l.length>0&&t.transact(()=>{for(const _n of _l)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};F.current=et;const P=setInterval(()=>{const dt=J.current;dt&&et(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Qt,Dt=p*Qt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx(`line`,{x1:P*Qt,y1:0,x2:P*Qt,y2:Dt,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx(`line`,{x1:0,y1:P*Qt,x2:gt,y2:P*Qt,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,dt)=>{et.set(dt,P.color)}),et},[l,u,v]);return Q.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Q.jsx(`style`,{children:` @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } .live-dot { animation: blink 1.5s ease-in-out infinite; } @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Jt.accent,fontFamily:`inherit`,fontSize:Ya,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Jt.accent},children:o}),F.jsx(`span`,{style:{color:Jt.dim},children:`@`}),F.jsx(`span`,{style:{color:D?Jt.accent:Jt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),F.jsxs(`div`,{style:{color:Jt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(st=>!st),children:[T,` PLAYERS`,z&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Jt.bg,border:`1px solid ${Jt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([st,P])=>({id:st,name:P.name,color:P.color}))].map(st=>{const P=Kt.get(st.id)||0,dt=Math.round(P/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:st.color,display:`inline-block`}}),st.name]}),F.jsxs(`span`,{style:{color:Jt.accent},children:[dt,`%`]})]},st.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:Ya},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:rv,color:Jt.accent},children:[Ct,`%`]}),` `,F.jsx(`span`,{style:{color:Jt.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Wo*100)-5?`#FF3D71`:Jt.dim},children:[`WIN AT `,Math.round(Wo*100),`%`]}),ht&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Jt.dim},children:ht.name}),` `,F.jsxs(`span`,{style:{fontSize:rv,color:Jt.accent},children:[ht.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Jt.grid,border:`1px solid ${Jt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([st,P])=>{const[dt,pt]=st.split(`,`).map(Number),Mt=Es.get(P.owner)||Jt.accent;return F.jsx(`rect`,{x:dt*Yt,y:pt*Yt,width:Yt,height:Yt,fill:Mt,opacity:.5},st)}),Array.from(v.entries()).map(([st,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const st=et.current.stunnedUntil>0&&Date.now(){const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Jr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?F.jsxs(`div`,{style:ed.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ed.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(gb.Provider,{value:N,children:F.jsx(QM,{roomId:s,children:F.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?F.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return F.jsx(P1,{children:F.jsx(OO,{children:F.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(F.jsx(u2,{})); + `}),Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:xr},children:[Q.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:xr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Q.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[Q.jsx(`span`,{style:{color:Vt.accent},children:o}),Q.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Q.jsx(`span`,{style:{color:D?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),Q.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(et=>!et),children:[T,` PLAYERS`,z&&Q.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,dt=Math.round(P/g*100);return Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Q.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Q.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:et.color,display:`inline-block`}}),et.name]}),Q.jsxs(`span`,{style:{color:Vt.accent},children:[dt,`%`]})]},et.id)})})]})]}),Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:xr},children:[Q.jsxs(`div`,{children:[Q.jsxs(`span`,{style:{fontSize:rv,color:Vt.accent},children:[Ct,`%`]}),` `,Q.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Q.jsxs(`div`,{style:{textAlign:`right`},children:[Q.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Po*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Po*100),`%`]}),ht&&Q.jsxs(`div`,{children:[Q.jsx(`span`,{style:{color:Vt.dim},children:ht.name}),` `,Q.jsxs(`span`,{style:{fontSize:rv,color:Vt.accent},children:[ht.pct,`%`]})]})]})]}),Q.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Vt.grid,border:`1px solid ${Vt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([et,P])=>{const[dt,pt]=et.split(`,`).map(Number),Mt=Es.get(P.owner)||Vt.accent;return Q.jsx(`rect`,{x:dt*Qt,y:pt*Qt,width:Qt,height:Qt,fill:Mt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const et=Wa(t);t.transact(()=>{Array.from(et.keys()).forEach(dt=>et.delete(dt))}),K(null)},style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Q.jsx(`button`,{onClick:it,style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}const av=[`#00E5FF`,`#FF3D71`,`#6eeb83`,`#ffbc42`,`#ee6352`,`#9ac2c9`,`#8acb88`,`#1be7ff`,`#C77DFF`,`#72EFDD`,`#F72585`,`#4ECDC4`];function s2(s){return av[s%av.length]}function i2(s){let t=0;for(let i=0;i{const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Xr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs(`div`,{style:ed.center,children:[Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Q.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?Q.jsxs(`div`,{style:ed.center,children:[Q.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Q.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Q.jsx(gb.Provider,{value:N,children:Q.jsx(QM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Q.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(P1,{children:Q.jsx(OO,{children:Q.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(Q.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index 6e9f01a6b2..ed0f9efcf9 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From 75ff4847b5da7e6dc1e943990f7858a24d43230a Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 11:22:24 +0100 Subject: [PATCH 22/36] =?UTF-8?q?docs:=20update=20description,=20excerpt,?= =?UTF-8?q?=20demo=20text,=20our=E2=86=92an?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../2026-03-25-yjs-durable-streams-on-electric-cloud.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index e8b3753e35..00111860c4 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -1,9 +1,9 @@ --- title: 'Yjs CRDTs over HTTP on Durable Streams' description: >- - Yjs sync over HTTP instead of WebSockets. y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching. Now live on Electric Cloud. + y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching built on Durable Streams. excerpt: >- - We've released y-durable-streams — a new Yjs provider that syncs collaborative documents over plain HTTP instead of WebSockets. Open protocol with built-in compaction, now live on Electric Cloud. + We've built y-durable-streams — a new Yjs provider on Durable Streams, an open HTTP protocol for persistent, resumable, real-time streams. authors: [balegas] image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png tags: [durable-streams, cloud, release, sync, collaboration] @@ -26,7 +26,7 @@ There is no standardized reference implementation if you want to implement this ## Yjs on bare HTTP -We've built [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) — a new Yjs provider on [Durable Streams](/primitives/durable-streams), our open HTTP protocol for persistent, resumable, real-time streams. +We've built [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) — a new Yjs provider on [Durable Streams](/primitives/durable-streams), an open HTTP protocol for persistent, resumable, real-time streams. Instead of WebSocket relay servers, document updates flow through plain HTTP. Clients POST edits and subscribe for real-time updates via SSE or long-polling — no persistent connections, no sticky sessions. Because it's standard HTTP, it works with the infrastructure you already have: load balancers, reverse proxies, CDNs. Snapshots are cacheable at the edge, so fan-out scales without extra effort. @@ -42,7 +42,7 @@ For the full details, see the [Yjs Durable Streams Protocol](https://github.com/ ## Demo -This demo runs live on Electric Cloud. Open it in multiple tabs, share the room link, or try it on your phone — all state syncs in real time over Durable Streams. +A demo of `y-durable-streams` live on Electric Cloud. Game state is stored in a Yjs Y.Map — each grid cell is a CRDT entry with last-writer-wins conflict resolution. Player presence uses awareness streams. Open it in multiple tabs, share the room link, or try it on your phone. From 05e9fa91237107affd876fa0f53e1a204aeb0fc6 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 11:50:33 +0100 Subject: [PATCH 23/36] docs: shorter, punchier excerpt Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 00111860c4..34da0bb5ba 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -3,7 +3,7 @@ title: 'Yjs CRDTs over HTTP on Durable Streams' description: >- y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching built on Durable Streams. excerpt: >- - We've built y-durable-streams — a new Yjs provider on Durable Streams, an open HTTP protocol for persistent, resumable, real-time streams. + Sync Yjs documents over plain HTTP. y-durable-streams brings built-in compaction, real-time presence, and CDN caching to collaborative apps. authors: [balegas] image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png tags: [durable-streams, cloud, release, sync, collaboration] From 7f3fd688112f7fbd36dacbda58d5fb7f4dbe032a Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Mon, 30 Mar 2026 11:54:28 +0100 Subject: [PATCH 24/36] =?UTF-8?q?docs:=20excerpt=20=E2=80=94=20fan-out=20v?= =?UTF-8?q?ia=20CDN,=20agentic=20systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md index 34da0bb5ba..a506ffaa07 100644 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md @@ -3,7 +3,7 @@ title: 'Yjs CRDTs over HTTP on Durable Streams' description: >- y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching built on Durable Streams. excerpt: >- - Sync Yjs documents over plain HTTP. y-durable-streams brings built-in compaction, real-time presence, and CDN caching to collaborative apps. + Sync Yjs documents over plain HTTP. y-durable-streams brings built-in compaction, real-time presence, and fan-out via CDN to collaborative apps and agentic systems. authors: [balegas] image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png tags: [durable-streams, cloud, release, sync, collaboration] From 2dde8a8ecf2b8975070b20da4f7578ac00f00962 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Tue, 31 Mar 2026 16:09:54 +0100 Subject: [PATCH 25/36] docs: add territory wars demo listing, update blog post - Remove embedded iframe, link to demo page instead - Add territory-wars demo to /demos with screenshot - Remove game rules from demo description - Add header image and SnapshotSyncDiagram component - Remove outdated outline file Co-Authored-By: Claude Opus 4.6 (1M context) --- ...5-yjs-durable-streams-on-electric-cloud.md | 100 ----- ...rable-streams-on-electric-cloud.outline.md | 162 -------- ...1-yjs-durable-streams-on-electric-cloud.md | 95 +++++ website/demos/territory-wars.md | 18 + .../territory-wars/assets/index-DqJU4iAc.js | 42 ++ .../header.jpg | Bin 0 -> 292161 bytes .../img/demos/territory-wars-screenshot.png | Bin 0 -> 93373 bytes .../src/components/SnapshotSyncDiagram.vue | 365 ++++++++++++++++++ 8 files changed, 520 insertions(+), 262 deletions(-) delete mode 100644 website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md delete mode 100644 website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md create mode 100644 website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md create mode 100644 website/demos/territory-wars.md create mode 100644 website/public/demos/territory-wars/assets/index-DqJU4iAc.js create mode 100644 website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.jpg create mode 100644 website/public/img/demos/territory-wars-screenshot.png create mode 100644 website/src/components/SnapshotSyncDiagram.vue diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md deleted file mode 100644 index a506ffaa07..0000000000 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: 'Yjs CRDTs over HTTP on Durable Streams' -description: >- - y-durable-streams is a new open-protocol Yjs provider with built-in compaction, presence, and CDN caching built on Durable Streams. -excerpt: >- - Sync Yjs documents over plain HTTP. y-durable-streams brings built-in compaction, real-time presence, and fan-out via CDN to collaborative apps and agentic systems. -authors: [balegas] -image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png -tags: [durable-streams, cloud, release, sync, collaboration] -outline: [2, 3] -post: true -published: true ---- - -[Yjs](https://yjs.dev) is the de facto library for collaborative editing on the web. It's battle-proven, CRDT-based, and powers tools like [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), [BlockNote](https://www.blocknotejs.org/) and more. And it's not just collaboration between humans anymore — agents are increasingly editing documents, generating code, and filling in forms alongside users. Whether it's humans or agents collaborating, they need reliable, conflict-free sync. - ->[!info] 🚀  Try it now ->Sign up to [Electric Cloud](https://dashboard.electric-sql.com), create a Yjs service, and connect your app. ->See the [`y-durable-streams` source](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) and [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub. - -## The problem with WebSockets - -Most Yjs setups are built on WebSockets to relay updates to clients. WebSockets are point-to-point connections with no fan-out distribution. They require sticky connections and content can't be cached at a CDN, which means there is a latency penalty for every user or agent that needs to retrieve the initial state of a document. - -There is no standardized reference implementation if you want to implement this yourself. There are hosted services you can buy, but that means vendor lock-in and a new piece of infrastructure to add to your stack. - -## Yjs on bare HTTP - -We've built [`y-durable-streams`](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) — a new Yjs provider on [Durable Streams](/primitives/durable-streams), an open HTTP protocol for persistent, resumable, real-time streams. - -Instead of WebSocket relay servers, document updates flow through plain HTTP. Clients POST edits and subscribe for real-time updates via SSE or long-polling — no persistent connections, no sticky sessions. Because it's standard HTTP, it works with the infrastructure you already have: load balancers, reverse proxies, CDNs. Snapshots are cacheable at the edge, so fan-out scales without extra effort. - -The provider handles document sync, server-side compaction, and awareness out of the box. It's open source, backed by an [open protocol specification](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md), and now live on [Electric Cloud](/cloud). - -## How it works - -Each document is backed by a durable stream — a persistent, append-only log. Every edit is appended to the stream, and all connected clients receive it in real time. When a new client joins, it doesn't replay the full history. Instead, it loads a **snapshot** — a compacted version of the document at a point in time — and subscribes for live updates from there. As documents grow, the server automatically compacts accumulated updates into new snapshots, so initial sync stays fast. - -Presence — cursors, selections, user info — is handled through **awareness streams**. These are ephemeral: clients only receive the latest changes, and each stream has a built-in TTL that garbage-collects stale state from disconnected clients. A default awareness stream is created with every document, and you can create additional named ones for different purposes. - -For the full details, see the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) specification. - -## Demo - -A demo of `y-durable-streams` live on Electric Cloud. Game state is stored in a Yjs Y.Map — each grid cell is a CRDT entry with last-writer-wins conflict resolution. Player presence uses awareness streams. Open it in multiple tabs, share the room link, or try it on your phone. - - - -## Get started - -Here's how to set up a collaborative text editor. Create a Yjs document with awareness and point it at your endpoint: - -```typescript -import { YjsProvider } from '@durable-streams/y-durable-streams' -import { Awareness } from 'y-protocols/awareness' -import * as Y from 'yjs' - -const doc = new Y.Doc() -const awareness = new Awareness(doc) - -const provider = new YjsProvider({ - doc, - awareness, - baseUrl: 'https://api.electric-sql.cloud/v1/stream/svc-your-service', - docId: 'my-document', -}) -``` - -Then wire it into your editor. Here's an example with TipTap: - -```typescript -import { useEditor, EditorContent } from '@tiptap/react' -import StarterKit from '@tiptap/starter-kit' -import Collaboration from '@tiptap/extension-collaboration' -import CollaborationCursor from '@tiptap/extension-collaboration-cursor' - -const editor = useEditor({ - extensions: [ - StarterKit.configure({ history: false }), - Collaboration.configure({ document: doc }), - CollaborationCursor.configure({ provider }), - ], -}) -``` - -The provider handles sync, compaction, and awareness. Cursors, selections, and user presence work out of the box — every client that connects to the same `docId` sees the same document, in real time. - -Clone the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) to see a working example, or drop the provider into your existing Yjs project. - -## No lock-in - -The Yjs Durable Streams protocol is [fully documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) with a conformance test suite — you can self-host, switch providers, or build your own compatible server at any time. - -Electric Cloud implements the documented protocol strictly — no proprietary extensions, no vendor-specific APIs. It's just a faster way to get started. - -## Next steps - -- sign up to [Electric Cloud](https://dashboard.electric-sql.com) -- check the [example app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -- any questions, let us know in [Discord](https://discord.electric-sql.com) diff --git a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md b/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md deleted file mode 100644 index 82ae6c1a1b..0000000000 --- a/website/blog/posts/2026-03-25-yjs-durable-streams-on-electric-cloud.outline.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: '...' -description: >- - ... -excerpt: >- - ... -authors: [balegas] -image: /img/blog/yjs-durable-streams-on-electric-cloud/header.jpg -tags: [durable-streams, cloud, release, sync, collaboration] -outline: [2, 3] -post: true -published: false ---- - - - -Yjs durable streams are now available on Electric Cloud. Real-time -collaborative editing as a managed service — sync Yjs documents over HTTP -instead of WebSockets. - -Open protocol. Sub-50ms latency. Runs on the edge. Built-in compaction. No -infrastructure to manage. Create a service, point your Yjs app at it. - - - -:::info -- [Create a Yjs service on Electric Cloud](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -- [`y-durable-streams` on GitHub](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams) -- [Demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -::: - -## Context - - - -- Durable Streams is an open HTTP protocol for persistent, resumable, - real-time streams. Append-only logs with their own URL that clients can - read from any position -- `y-durable-streams` is a Yjs provider that replaces WebSocket-based sync - with plain HTTP — works with standard load balancers and CDNs, no sticky - sessions -- Electric Cloud has been running durable streams services since January. - Yjs is the latest service type - -## What's shipping - - - -- Managed Yjs sync on Electric Cloud — one click to create a service, get - an endpoint, connect your Yjs app -- Sub-50ms latency, edge-deployed, scales without you thinking about it -- Built-in server-side compaction — accumulated updates get merged into - snapshots automatically, initial loads stay fast as documents grow -- Awareness and presence out of the box — cursors, selections, user status - over the same HTTP transport -- Open protocol, no vendor lock-in — `y-durable-streams` works against any - durable streams server, self-hosted or cloud -- Just HTTP — no WebSocket servers, no sticky sessions, CDN-friendly - - - -## Get started - - - - - -- Link to create a Yjs durable streams service on Electric Cloud -- Clone the demo app and point it at your cloud endpoint: - -```typescript -import { YjsProvider } from '@durable-streams/y-durable-streams' -import * as Y from 'yjs' - -const doc = new Y.Doc() -const provider = new YjsProvider({ - doc, - baseUrl: 'https://your-service.electric-sql.cloud/v1/yjs', - docId: 'my-document', -}) -``` - - - -*** - -Next steps: - -- [Sign up for Electric Cloud](https://dashboard.electric-sql.cloud/) -- [Try the demo](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) -- [Join Discord](https://discord.electric-sql.com) - -*** - - - - diff --git a/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md new file mode 100644 index 0000000000..3f0008f714 --- /dev/null +++ b/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md @@ -0,0 +1,95 @@ +--- +title: 'Yjs CRDTs over HTTP on Durable Streams' +description: >- + We've released a new Yjs provider built on Durable Streams — sync fan-out and fast catch-up from the edge for collaborative and agentic systems. Now live on Electric Cloud. +excerpt: >- + We've released a new Yjs provider built on Durable Streams — sync fan-out and fast catch-up from the edge for collaborative and agentic systems. Now live on Electric Cloud. +authors: [balegas] +image: /img/blog/yjs-durable-streams-on-electric-cloud/header.png +tags: [durable-streams, cloud, release, sync, collaboration] +outline: [2, 3] +post: true +published: true +--- + +[Yjs](https://yjs.dev) is the de facto library for collaborative editing on the web — battle-proven, CRDT-based, and powering tools like [TipTap](https://tiptap.dev), [CodeMirror](https://codemirror.net), and [BlockNote](https://www.blocknotejs.org/). Today we're releasing [`y-durable-streams`](https://www.npmjs.com/package/@durable-streams/y-durable-streams) — a new Yjs provider built on [Durable Streams](/primitives/durable-streams), now live on [Electric Cloud](/cloud). It brings built-in persistence, compaction, and real-time presence to collaborative apps and agentic systems. + +>[!info] 🚀  Try it now +>[Create a Yjs service](https://dashboard.electric-sql.cloud/?intent=create&serviceType=yjs), see the [integration docs](https://durablestreams.com/yjs), [source code](https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams), and [demo app](https://github.com/balegas/territory-wars). + +## Yjs on Durable Streams + +[Durable Streams](/primitives/durable-streams) is an open HTTP protocol for persistent, resumable, real-time streams. Data is durably stored, synced over plain HTTP, and cacheable at the edge. + +Most Yjs setups rely on WebSocket relay servers that maintain persistent point-to-point connections to sync changes to clients in real time. As agentic systems bring more participants into collaborative documents, they challenge the scalability of these setups. + +Durable Streams use a fan-out architecture for syncing changes in real time. Write changes to a log once and sync them via an edge cache or CDN to any number of connected clients. + +## How it works + +Every document (CRDT) is backed by its own durable stream — a persistent, append-only log. You POST edits to the stream and subscribe to real-time updates via SSE or long-polling. This is the primary channel for syncing live changes to connected clients. + +As updates accumulate, the protocol compacts them into **snapshots** — immutable, point-in-time representations of the document. When a new client opens the document, it fetches the latest snapshot. As new snapshots are generated, the protocol directs clients to the latest one and garbage-collects old ones. + +Presence information flows through dedicated **awareness streams**, separate from the document stream. Awareness data is ephemeral, so these streams have a built-in TTL that automatically cleans them up when there are no active clients. + +For the full details, see the [Yjs Durable Streams Protocol](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) specification. + +## Demo + +Try [Territory Wars](/demos/territory-wars) — a multiplayer territory capture game running `y-durable-streams` live on Electric Cloud. Game state is stored in a Yjs Y.Map CRDT, and player presence uses awareness streams. + +## Get started + +Here's how to set up a collaborative text editor — create a Yjs document with awareness and point it at your endpoint: + +```typescript +import { YjsProvider } from '@durable-streams/y-durable-streams' +import { Awareness } from 'y-protocols/awareness' +import * as Y from 'yjs' + +const doc = new Y.Doc() +const awareness = new Awareness(doc) + +const provider = new YjsProvider({ + doc, + awareness, + baseUrl: 'https://api.electric-sql.cloud/v1/stream/svc-your-service', + docId: 'my-document', +}) +``` + +Then wire it into your editor. Here's an example with TipTap: + +```typescript +import { useEditor, EditorContent } from '@tiptap/react' +import StarterKit from '@tiptap/starter-kit' +import Collaboration from '@tiptap/extension-collaboration' +import CollaborationCursor from '@tiptap/extension-collaboration-cursor' + +const editor = useEditor({ + extensions: [ + StarterKit.configure({ history: false }), + Collaboration.configure({ document: doc }), + CollaborationCursor.configure({ provider }), + ], +}) +``` + +The provider handles sync, compaction, and awareness. Cursors, selections, and user presence work out of the box — every client that connects to the same `docId` sees the same document, in real time. + +Clone the [demo app](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) to see a working example, or drop the provider into your existing Yjs project. + +## No lock-in + +The entire protocol is [documented](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) and ships with a conformance test suite you can run against any implementation. Self-host it, switch providers, or build your own compatible server — your documents are yours. + +Electric Cloud implements the protocol faithfully — no proprietary extensions, no vendor-specific APIs. It's the fastest way to get started. + +## Next steps + +- [Create a Yjs service](https://dashboard.electric-sql.cloud/?intent=create&serviceType=yjs) on Electric Cloud +- [Integration docs](https://durablestreams.com/yjs) and [protocol spec](https://github.com/durable-streams/durable-streams/blob/main/packages/y-durable-streams/YJS-PROTOCOL.md) +- [Territory Wars demo](https://github.com/balegas/territory-wars) and [collaborative editor example](https://github.com/durable-streams/durable-streams/tree/main/examples/yjs-demo) on GitHub + +Join us on [Discord](https://discord.electric-sql.com) with any questions. diff --git a/website/demos/territory-wars.md b/website/demos/territory-wars.md new file mode 100644 index 0000000000..c2c12ba3cc --- /dev/null +++ b/website/demos/territory-wars.md @@ -0,0 +1,18 @@ +--- +title: Territory Wars +description: >- + Multiplayer territory capture game built with Yjs CRDTs on Durable Streams. +deployed_url: /demos/territory-wars/index.html +source_url: https://github.com/balegas/territory-wars +image: /img/demos/territory-wars-screenshot.png +demo: true +order: 5 +--- + +# {{ $frontmatter.title }} + +{{ $frontmatter.description }} + + + + diff --git a/website/public/demos/territory-wars/assets/index-DqJU4iAc.js b/website/public/demos/territory-wars/assets/index-DqJU4iAc.js new file mode 100644 index 0000000000..4fcf5940c3 --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-DqJU4iAc.js @@ -0,0 +1,42 @@ +(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const a of document.querySelectorAll(`link[rel="modulepreload"]`))r(a);new MutationObserver(a=>{for(const o of a)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin===`use-credentials`?o.credentials=`include`:a.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function j1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var dh={exports:{}},$l={};var _0;function N1(){if(_0)return $l;_0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,a,o){var u=null;if(o!==void 0&&(u=``+o),a.key!==void 0&&(u=``+a.key),`key`in a){o={};for(var d in a)d!==`key`&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:s,type:r,key:u,ref:a!==void 0?a:null,props:o}}return $l.Fragment=t,$l.jsx=i,$l.jsxs=i,$l}var T0;function B1(){return T0||(T0=1,dh.exports=N1()),dh.exports}var Q=B1(),ph={exports:{}},Gl={},gh={exports:{}},yh={};var A0;function L1(){return A0||(A0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[rt];if(0>>1;rt<_;){var H=2*(rt+1)-1,Y=M[H],F=H+1,ct=M[F];if(0>a(Y,Z))Fa(ct,Y)?(M[rt]=ct,M[F]=Z,rt=F):(M[rt]=Y,M[H]=Z,rt=H);else if(Fa(ct,Z))M[rt]=ct,M[F]=Z,rt=F;else break t}}return q}function a(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,lt());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function nt(){return T?!0:!(s.unstable_now()-ttM&&nt());){var rt=y.callback;if(typeof rt==`function`){y.callback=null,v=y.priorityLevel;var ft=rt(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft==`function`){y.callback=ft,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?lt():I=!1}}}var lt;if(typeof A==`function`)lt=function(){A(J)};else if(typeof MessageChannel<`u`){var at=new MessageChannel,Nt=at.port2;at.port1.onmessage=J,lt=function(){Nt.postMessage(null)}}else lt=function(){N(J,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125rt?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-rt))):(M.sortIndex=ft,t(p,M),w||b||(w=!0,I||(I=!0,lt()))),M},s.unstable_shouldYield=nt,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(yh)),yh}var O0;function I1(){return O0||(O0=1,gh.exports=L1()),gh.exports}var mh={exports:{}},mt={};var R0;function H1(){if(R0)return mt;R0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var F=Y.ref;return{$$typeof:s,type:_,key:H,ref:F!==void 0?F:null,props:Y}}function nt(_,H){return tt(_.type,H,_.props)}function J(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function lt(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var at=/\/+/g;function Nt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?lt(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,F,ct){var st=typeof _;(st===`undefined`||st===`boolean`)&&(_=null);var yt=!1;if(_===null)yt=!0;else switch(st){case`bigint`:case`string`:case`number`:yt=!0;break;case`object`:switch(_.$$typeof){case s:case t:yt=!0;break;case m:return yt=_._init,M(yt(_._payload),H,Y,F,ct)}}if(yt)return ct=ct(_),yt=F===``?`.`+Nt(_,0):F,L(ct)?(Y=``,yt!=null&&(Y=yt.replace(at,`$&/`)+`/`),M(ct,H,Y,``,function(an){return an})):ct!=null&&(J(ct)&&(ct=nt(ct,Y+(ct.key==null||_&&_.key===ct.key?``:(``+ct.key).replace(at,`$&/`)+`/`)+yt)),H.push(ct)),1;yt=0;var Dt=F===``?`.`:F+`:`;if(L(_))for(var wt=0;wt<_.length;wt++)F=_[wt],st=Dt+Nt(F,wt),yt+=M(F,H,Y,st,ct);else if(wt=b(_),typeof wt==`function`)for(_=wt.call(_),wt=0;!(F=_.next()).done;)F=F.value,st=Dt+Nt(F,wt++),yt+=M(F,H,Y,st,ct);else if(st===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,F,ct);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return yt}function q(_,H,Y){if(_==null)return _;var F=[],ct=0;return M(_,F,``,``,function(st){return H.call(Y,st,ct++)}),F}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var rt=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ft={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!J(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return mt.Activity=y,mt.Children=ft,mt.Component=N,mt.Fragment=i,mt.Profiler=a,mt.PureComponent=A,mt.StrictMode=r,mt.Suspense=p,mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,mt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},mt.cache=function(_){return function(){return _.apply(null,arguments)}},mt.cacheSignal=function(){return null},mt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var F=E({},_.props),ct=_.key;if(H!=null)for(st in H.key!==void 0&&(ct=``+H.key),H)!X.call(H,st)||st===`key`||st===`__self`||st===`__source`||st===`ref`&&H.ref===void 0||(F[st]=H[st]);var st=arguments.length-2;if(st===1)F.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),Sh.exports=q1(),Sh.exports}var U0;function V1(){if(U0)return Gl;U0=1;var s=I1(),t=Nd(),i=K1();function r(e){var n=`https://react.dev/errors/`+e;if(1ft||(e.current=rt[ft],rt[ft]=null,ft--)}function Y(e,n){ft++,rt[ft]=e.current,e.current=n}var F=_(null),ct=_(null),st=_(null),yt=_(null);function Dt(e,n){switch(Y(st,n),Y(ct,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Fm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Fm(n),e=Jm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(F),Y(F,e)}function wt(){H(F),H(ct),H(st)}function an(e){e.memoizedState!==null&&Y(yt,e);var n=F.current,l=Jm(n,e.type);n!==l&&(Y(ct,e),Y(F,l))}function Es(e){ct.current===e&&(H(F),H(ct)),yt.current===e&&(H(yt),Hl._currentValue=Z)}var et,P;function pt(e){if(et===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);et=n&&n[1]||``,P=-1)`:-1f||x[c]!==U[f]){var V=` +`+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{gt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:``)?pt(l):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return pt(e.type);case 16:return pt(`Lazy`);case 13:return e.child!==n&&n!==null?pt(`Suspense Fallback`):pt(`Suspense`);case 19:return pt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return pt(`Activity`);default:return``}}function te(e){try{var n=``,l=null;do n+=kt(e,l),l=e,e=e.return;while(e);return n}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,xa=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,_a=s.unstable_LowPriority,Op=s.unstable_IdlePriority,mb=s.log,Sb=s.unstable_setDisableYieldValue,Wr=null,Xe=null;function _s(e){if(typeof mb==`function`&&Sb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Wr,e)}catch{}}var Ze=Math.clz32?Math.clz32:bb,vb=Math.log,wb=Math.LN2;function bb(e){return e>>>=0,e===0?32:31-(vb(e)/wb|0)|0}var Ta=256,Aa=262144,Oa=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,n,l){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):l||(l=C&~e,l!==0&&(f=ii(l))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):l||(l=c&~e,l!==0&&(f=ii(l)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,l=n&-n,h>=l||h===32&&(l&4194048)!==0)?n:f}function Pr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Eb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rp(){var e=Oa;return Oa<<=1,(Oa&62914560)===0&&(Oa=4194304),e}function tu(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function tl(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cb(e,n,l,c,f,h){var S=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(l=S&~l;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rb=/[\n"\\]/g;function cn(e){return e.replace(Rb,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function lu(e,n,l,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):l!=null?au(e,S,on(l)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Kp(e,n,l,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||l!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){ru(e);return}l=l!=null?``+on(l):``,n=n!=null?``+on(n):l,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),ru(e)}function au(e,n,l){n===`number`&&ka(e.ownerDocument)===e||e.defaultValue===``+l||(e.defaultValue=``+l)}function $i(e,n,l,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),hu=!1;if(Xn)try{var il={};Object.defineProperty(il,`passive`,{get:function(){hu=!0}}),window.addEventListener(`test`,il,il),window.removeEventListener(`test`,il,il)}catch{hu=!1}var As=null,du=null,za=null;function Jp(){if(za)return za;var e,n=du,l=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=al),eg=` `,ng=!1;function sg(e,n){switch(e){case`keyup`:return sE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ig(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function rE(e,n){switch(e){case`compositionend`:return ig(n);case`keypress`:return n.which!==32?null:(ng=!0,eg);case`textInput`:return e=n.data,e===eg&&ng?null:e;default:return null}}function lE(e,n){if(Fi)return e===`compositionend`||!Su&&sg(e,n)?(e=Jp(),za=du=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:l,offset:n-e};e=c}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=hg(l)}}function pg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?pg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function gg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ka(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href==`string`}catch{l=!1}if(l)e=n.contentWindow;else break;n=ka(e.document)}return n}function bu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var pE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,Eu=null,fl=null,Cu=!1;function yg(e,n,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cu||Ji==null||Ji!==ka(c)||(c=Ji,`selectionStart`in c&&bu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fl&&ul(fl,c)||(fl=c,c=Oo(Eu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|l<vt?(_t=ot,ot=null):_t=ot.sibling;var zt=j(R,ot,k[vt],$);if(zt===null){ot===null&&(ot=_t);break}e&&ot&&zt.alternate===null&&n(R,ot),O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt,ot=_t}if(vt===k.length)return l(R,ot),Ot&&Wn(R,vt),ut;if(ot===null){for(;vtvt?(_t=ot,ot=null):_t=ot.sibling;var Js=j(R,ot,zt.value,$);if(Js===null){ot===null&&(ot=_t);break}e&&ot&&Js.alternate===null&&n(R,ot),O=h(Js,O,vt),Ut===null?ut=Js:Ut.sibling=Js,Ut=Js,ot=_t}if(zt.done)return l(R,ot),Ot&&Wn(R,vt),ut;if(ot===null){for(;!zt.done;vt++,zt=k.next())zt=G(R,zt.value,$),zt!==null&&(O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,vt),ut}for(ot=c(ot);!zt.done;vt++,zt=k.next())zt=B(ot,R,vt,zt.value,$),zt!==null&&(e&&zt.alternate!==null&&ot.delete(zt.key===null?vt:zt.key),O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt);return e&&ot.forEach(function(z1){return n(R,z1)}),Ot&&Wn(R,vt),ut}function qt(R,O,k,$){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ut=k.key;O!==null;){if(O.key===ut){if(ut=k.type,ut===E){if(O.tag===7){l(R,O.sibling),$=f(O,k.props.children),$.return=R,R=$;break t}}else if(O.elementType===ut||typeof ut==`object`&&ut!==null&&ut.$$typeof===X&&gi(ut)===O.type){l(R,O.sibling),$=f(O,k.props),ml($,k),$.return=R,R=$;break t}l(R,O);break}else n(R,O);O=O.sibling}k.type===E?($=ui(k.props.children,R.mode,$,k.key),$.return=R,R=$):($=$a(k.type,k.key,k.props,null,R.mode,$),ml($,k),$.return=R,R=$)}return S(R);case w:t:{for(ut=k.key;O!==null;){if(O.key===ut)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){l(R,O.sibling),$=f(O,k.children||[]),$.return=R,R=$;break t}else{l(R,O);break}else n(R,O);O=O.sibling}$=Du(k,R.mode,$),$.return=R,R=$}return S(R);case X:return k=gi(k),qt(R,O,k,$)}if(ht(k))return it(R,O,k,$);if(lt(k)){if(ut=lt(k),typeof ut!=`function`)throw Error(r(150));return k=ut.call(k),dt(R,O,k,$)}if(typeof k.then==`function`)return qt(R,O,Za(k),$);if(k.$$typeof===A)return qt(R,O,Qa(R,k),$);Wa(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(l(R,O.sibling),$=f(O,k),$.return=R,R=$):(l(R,O),$=Ru(k,R.mode,$),$.return=R,R=$),S(R)):l(R,O)}return function(R,O,k,$){try{yl=0;var ut=qt(R,O,k,$);return lr=null,ut}catch(ot){if(ot===rr||ot===Ja)throw ot;var Ut=Pe(29,ot,null,R.mode);return Ut.lanes=$,Ut.return=R,Ut}}}var mi=Ig(!0),Hg=Ig(!1),ks=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,l){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Va(e),Cg(e,null,l),n}return Ka(e,c,n,l),Va(e)}function Sl(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,l|=c,n.lanes=l,Mp(e,l)}}function $u(e,n){var l=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var f=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,l=l.next}while(l!==null);h===null?f=h=n:h=h.next=n}else f=h=n;l={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Gu=!1;function vl(){if(Gu){var e=ir;if(e!==null)throw e}}function wl(e,n,l,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var it=e,dt=C;j=n;var qt=l;switch(dt.tag){case 1:if(it=dt.payload,typeof it==`function`){G=it.call(qt,G,j);break t}G=it;break t;case 3:it.flags=it.flags&-65537|128;case 0:if(it=dt.payload,j=typeof it==`function`?it.call(qt,G,j):it,j==null)break t;G=y({},G,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=G):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=G),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=G}}function qg(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Kg(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,ff(e,!1,n,l);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=CE(x,c);Cl(e,n,V,rn(e))}else Cl(e,n,c,rn(e))}catch(G){Cl(e,n,{then:function(){},status:`rejected`,reason:G},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function RE(){}function cf(e,n,l,c){if(e.tag!==5)throw Error(r(476));var f=wy(e).queue;vy(e,f,n,Z,l===null?RE:function(){return by(e),l(c)})}function wy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function by(e){var n=wy(e);n.next===null&&(n=e.alternate.memoizedState),Cl(e,n.next.queue,{},rn())}function uf(){return xe(Hl)}function Ey(){return ne().memoizedState}function Cy(){return ne().memoizedState}function DE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=rn();e=Us(l);var c=zs(n,e,l);c!==null&&(Ye(c,n,l),Sl(c,n,l)),n={cache:Lu()},e.payload=n;return}n=n.return}}function ME(e,n,l){var c=rn();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},oo(e)?_y(n,l):(l=Au(e,n,l,c),l!==null&&(Ye(l,e,c),Ty(l,n,c)))}function xy(e,n,l){var c=rn();Cl(e,n,l,c)}function Cl(e,n,l,c){var f={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(oo(e))_y(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,l);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Ka(e,n,f,0),Kt===null&&qa(),!1}catch{}if(l=Au(e,n,f,c),l!==null)return Ye(l,e,c),Ty(l,n,c),!0}return!1}function ff(e,n,l,c){if(c={lane:2,revertLane:Vf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Au(e,l,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===St||n!==null&&n===St}function _y(e,n){or=eo=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Ty(e,n,l){if((l&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,l|=c,n.lanes=l,Mp(e,l)}}var xl={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};xl.useEffectEvent=Xt;var Ay={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:uy,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,lo(4194308,4,py.bind(null,n,e),l)},useLayoutEffect:function(e,n){return lo(4194308,4,e,n)},useInsertionEffect:function(e,n){lo(4,2,e,n)},useMemo:function(e,n){var l=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return l.memoizedState=[c,n],c},useReducer:function(e,n,l){var c=ze();if(l!==void 0){var f=l(n);if(Si){_s(!0);try{l(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=ME.bind(null,St,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=sf(e);var n=e.queue,l=xy.bind(null,St,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:af,useDeferredValue:function(e,n){var l=ze();return of(l,e,n)},useTransition:function(){var e=sf(!1);return e=vy.bind(null,St,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var c=St,f=ze();if(Ot){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Kt===null)throw Error(r(349));(xt&127)!==0||Fg(c,n,l)}f.memoizedState=l;var h={value:l,getSnapshot:n};return f.queue=h,uy(Xg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Jg.bind(null,c,h,l,n),null),l},useId:function(){var e=ze(),n=Kt.identifierPrefix;if(Ot){var l=Nn,c=jn;l=(c&~(1<<32-Ze(c)-1)).toString(32)+l,n=`_`+n+`R_`+l,l=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return Yt(n),_f(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=st.current,er(n)){if(e=n.stateNode,l=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Ym(e.nodeValue,l)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return Yt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),l!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),e=!1}else l=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Yt(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),f=!1}else f=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=l,n):(l=c!==null,e=e!==null&&e.memoizedState!==null,l&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),po(n,n.updateQueue),Yt(n),null);case 4:return wt(),e===null&&Qf(n.stateNode.containerInfo),Yt(n),null;case 10:return ts(n.type),Yt(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return Yt(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Tl(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,Tl(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)xg(l,e),l=l.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,Tl(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),Tl(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(n),null}else 2*Re()-c.renderingStartTime>vo&&l!==536870912&&(n.flags|=128,f=!0,Tl(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,l=ee.current,Y(ee,f?l&1|2:l&1),Ot&&Wn(n,c.treeForkCount),e):(Yt(n),null);case 22:case 23:return en(n),Qu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(l&536870912)!==0&&(n.flags&128)===0&&(Yt(n),n.subtreeFlags&6&&(n.flags|=8192)):Yt(n),l=n.updateQueue,l!==null&&po(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==l&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ts(re),Yt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function NE(e,n){switch(ku(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),wt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return wt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Qu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Zy(e,n){switch(ku(n),n.tag){case 3:ts(re),wt();break;case 26:case 27:case 5:Es(n);break;case 4:wt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Qu(),e!==null&&H(pi);break;case 24:ts(re)}}function Al(e,n){try{var l=n.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){c=void 0;var h=l.create,S=l.inst;c=h(),S.destroy=c}l=l.next}while(l!==f)}}catch(C){Lt(n,n.return,C)}}function Bs(e,n,l){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=l,U=C;try{U()}catch(V){Lt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Lt(n,n.return,V)}}function Wy(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Kg(n,l)}catch(c){Lt(e,e.return,c)}}}function Py(e,n,l){l.props=vi(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(c){Lt(e,n,c)}}function Ol(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof l==`function`?e.refCleanup=l(c):l.current=c}}catch(f){Lt(e,n,f)}}function Bn(e,n){var l=e.ref,c=e.refCleanup;if(l!==null)if(typeof c==`function`)try{c()}catch(f){Lt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l==`function`)try{l(null)}catch(f){Lt(e,n,f)}else l.current=null}function tm(e){var n=e.type,l=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&c.focus();break t;case`img`:l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(f){Lt(e,e.return,f)}}function Tf(e,n,l){try{var c=e.stateNode;i1(c,e.type,l,n),c[He]=n}catch(f){Lt(e,e.return,f)}}function em(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$s(e.type)||e.tag===4}function Af(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||em(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$s(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Of(e,n,l){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName===`HTML`?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName===`HTML`?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&$s(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Of(e,n,l),e=e.sibling;e!==null;)Of(e,n,l),e=e.sibling}function go(e,n,l){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(c!==4&&(c===27&&$s(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(go(e,n,l),e=e.sibling;e!==null;)go(e,n,l),e=e.sibling}function nm(e){var n=e.stateNode,l=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,l),n[Ee]=e,n[He]=l}catch(h){Lt(e,e.return,h)}}var rs=!1,oe=!1,Rf=!1,sm=typeof WeakSet==`function`?WeakSet:Set,ye=null;function BE(e,n){if(e=e.containerInfo,Xf=No,e=gg(e),bu(e)){if(`selectionStart`in e)var l={start:e.selectionStart,end:e.selectionEnd};else t:{l=(l=e.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break t}var S=0,C=-1,x=-1,U=0,V=0,G=e,j=null;e:for(;;){for(var B;G!==l||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(B=G.firstChild)!==null;)j=G,G=B;for(;;){if(G===e)break e;if(j===l&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=G.nextSibling)!==null)break;G=j,j=G.parentNode}G=B}l=C===-1||x===-1?null:{start:C,end:x}}else l=null}l=l||{start:0,end:0}}else l=null;for(Zf={focusedElem:e,selectionRange:l},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title`))),Te(h,c,l),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=c0(`link`,`href`,f).get(c+(l.href||``));if(S){for(var C=0;Cqt&&(S=qt,qt=dt,dt=S);var R=dg(C,dt),O=dg(C,qt);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=G.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),dt>qt?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for(G=[],B=C;B=B.parentNode;)B.nodeType===1&&G.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;Cl?32:l,M.T=null,l=Nf,Nf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,pm(h.current),fm(h,h.current,S,l),jt=C,zl(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Wr,h)}catch{}return!0}finally{q.p=f,M.T=c,km(e,n)}}function zm(e,n,l){n=fn(l,n),n=gf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(tl(e,2),Ln(e))}function Lt(e,n,l){if(e.tag===3)zm(e,e,l);else for(;n!==null;){if(n.tag===3){zm(n,e,l);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(l,e),l=jy(2),c=zs(n,l,2),c!==null&&(Ny(l,c,n,e),tl(c,2),Ln(c));break}}n=n.return}}function Hf(e,n,l){var c=e.pingCache;if(c===null){c=e.pingCache=new HE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(l)||(kf=!0,f.add(l),e=GE.bind(null,e,n,l),n.then(e,e))}function GE(e,n,l){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Kt===e&&(xt&l)===l&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):Uf|=l,pr===xt&&(pr=0)),Ln(e)}function jm(e,n){n===0&&(n=Rp()),e=ci(e,n),e!==null&&(tl(e,n),Ln(e))}function YE(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),jm(e,l)}function QE(e,n){var l=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),jm(e,l)}function FE(e,n){return Ue(e,n)}var _o=null,Sr=null,qf=!1,To=!1,Kf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,qf||(qf=!0,XE())}function zl(e,n){if(!Kf&&To){Kf=!0;do for(var l=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,Im(c,h))}else h=xt,h=Ra(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Pr(c,h)||(l=!0,Im(c,h));c=c.next}while(l);Kf=!1}}function JE(){Nm()}function Nm(){To=qf=!1;var e=0;Vs!==0&&l1()&&(e=Vs);for(var n=Re(),l=null,c=_o;c!==null;){var f=c.next,h=Bm(c,n);h===0?(c.next=null,l===null?_o=f:l.next=f,f===null&&(Sr=l)):(l=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||zl(e),Vs!==0&&(Vs=0)}function Bm(e,n){for(var l=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,G=x.initiatorType;V&&Qm(G)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function r0(e,n,l){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof l==`string`&&(f+=`[crossorigin="`+l+`"]`),i0.has(f)||(i0.add(f),e={rel:e,crossOrigin:l,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function g1(e){fs.D(e),r0(`dns-prefetch`,e,null)}function y1(e,n){fs.C(e,n),r0(`preconnect`,e,n)}function m1(e,n,l){fs.L(e,n,l);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&l&&l.imageSrcSet?(f+=`[imagesrcset="`+cn(l.imageSrcSet)+`"]`,typeof l.imageSizes==`string`&&(f+=`[imagesizes="`+cn(l.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&l&&l.imageSrcSet?void 0:e,as:n},l),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(Ll(h))||n===`script`&&c.querySelector(Il(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function S1(e,n){fs.m(e,n);var l=vr;if(l&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),l.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(l.querySelector(Il(h)))return}c=l.createElement(`link`),Te(c,`link`,e),ge(c),l.head.appendChild(c)}}}function v1(e,n,l){fs.S(e,n,l);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ll(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},l),(l=mn.get(h))&&ih(e,l);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Mo(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function w1(e,n){fs.X(e,n);var l=vr;if(l&&e){var c=Ki(l).hoistableScripts,f=br(e),h=c.get(f);h||(h=l.querySelector(Il(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&rh(e,n),h=l.createElement(`script`),ge(h),Te(h,`link`,e),l.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function b1(e,n){fs.M(e,n);var l=vr;if(l&&e){var c=Ki(l).hoistableScripts,f=br(e),h=c.get(f);h||(h=l.querySelector(Il(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&rh(e,n),h=l.createElement(`script`),ge(h),Te(h,`link`,e),l.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function l0(e,n,l,c){var f=(f=st.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof l.precedence==`string`&&typeof l.href==`string`?(n=wr(l.href),l=Ki(f).hoistableStyles,c=l.get(n),c||(c={type:`style`,instance:null,count:0,state:null},l.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(l.rel===`stylesheet`&&typeof l.href==`string`&&typeof l.precedence==`string`){e=wr(l.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ll(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(l={rel:`preload`,as:`style`,href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},mn.set(e,l),h||E1(f,e,l,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=l.async,l=l.src,typeof l==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(l),l=Ki(f).hoistableScripts,c=l.get(n),c||(c={type:`script`,instance:null,count:0,state:null},l.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function Ll(e){return`link[rel="stylesheet"][`+e+`]`}function a0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function E1(e,n,l,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,l),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function Il(e){return`script[async]`+e}function o0(e,n,l){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(l.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),Mo(c,l.precedence,e),n.instance=c;case`stylesheet`:f=wr(l.href);var h=e.querySelector(Ll(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=a0(l),(f=mn.get(f))&&ih(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,Mo(h,l.precedence,e),n.instance=h;case`script`:return h=br(l.src),(f=e.querySelector(Il(h)))?(n.instance=f,ge(f),f):(c=l,(f=mn.get(h))&&(c=y({},l),rh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Mo(c,l.precedence,e));return n.instance}function Mo(e,n,l){for(var c=l.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function C1(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;return n.rel===`stylesheet`?(e=n.disabled,typeof n.precedence==`string`&&e==null):!0;case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function f0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function x1(e,n,l,c){if(l.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=wr(c.href),h=n.querySelector(Ll(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=Uo.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=h,ge(h);return}h=n.ownerDocument||n,c=a0(c),(f=mn.get(f))&&ih(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),l.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Uo.bind(e),n.addEventListener(`load`,l),n.addEventListener(`error`,l))}}var lh=0;function _1(e,n){return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0lh?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function jo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(T1,e),zo=null,Uo.call(e))}function T1(e,n){if(!(n.state.loading&4)){var l=zo.get(e);if(l)var c=l.get(null);else{l=new Map,zo.set(e,l);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),ph.exports=V1(),ph.exports}var G1=$1(),W=Nd();const Y1={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk2NDc3NH0.ttTdONjhP14VQVVmD0SKK5oqmM0RP3GnnbEh5QFsZyY`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTY0NzkxfQ.CcNaI0-j2F0LJXeoBUsU2Fxkt0llv64XV9uSUBBCje0`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},fv=W.createContext(null);function Bd(){const s=W.useContext(fv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function Vo(s){const t=Y1[s];if(!t)throw new Error(`Missing environment variable: ${s}`);return t}function Q1({children:s}){const t=Vo(`VITE_YJS_URL`),i=Vo(`VITE_DS_URL`),r=W.useMemo(()=>({Authorization:`Bearer ${Vo(`VITE_YJS_TOKEN`)}`}),[]),a=W.useMemo(()=>({Authorization:`Bearer ${Vo(`VITE_DS_TOKEN`)}`}),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:a}),[t,i,r,a]);return Q.jsx(fv.Provider,{value:o,children:s})}var $o={exports:{}},vh,j0;function F1(){if(j0)return vh;j0=1;function s(t){var i=new t,r=i;function a(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:a,release:o}}return vh=s,vh}var N0;function J1(){if(N0)return $o.exports;N0=1;var s=F1();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=at,m=at):(g=at,m=at,b.saturated()):(y++,u.call(o,at.value,at.worked))}function L(J,lt){var at=p.get();at.context=o,at.release=I,at.value=J,at.callback=lt||i,at.errorHandler=v,y>=d||b.paused?g?(at.next=g,g=at):(g=at,m=at,b.saturated()):(y++,u.call(o,at.value,at.worked))}function I(J){J&&p.release(J);var lt=g;lt&&y<=d?b.paused?y--:(m===g&&(m=null),g=lt.next,lt.next=null,u.call(o,lt.value,lt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(){var J=g;for(g=null,m=null;J;){var lt=J.next,at=J.callback,Nt=J.errorHandler,ht=J.value,M=J.context;J.value=null,J.callback=i,J.errorHandler=null,Nt&&Nt(new Error(`abort`),ht),at.call(M,new Error(`abort`)),J.release(J),J=lt}b.drain=i}function nt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function a(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return $o.exports=t,$o.exports.promise=a,$o.exports}var X1=J1();const hv=j1(X1),Dn=`Stream-Next-Offset`,jc=`Stream-Cursor`,Nc=`Stream-Up-To-Date`,qn=`Stream-Closed`,wh=`Stream-Seq`,Z1=`Stream-TTL`,W1=`Stream-Expires-At`,B0=`Producer-Id`,Go=`Producer-Epoch`,L0=`Producer-Seq`,P1=`Producer-Expected-Seq`,tC=`Producer-Received-Seq`,bh=`offset`,Yo=`live`,eC=`stream-sse-data-encoding`;var ti=class dv extends Error{status;text;json;headers;constructor(t,i,r,a,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=a}static async fromResponse(t,i){const r=t.status,a=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new dv(r,o,u,a,i)}},Ld=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class sd extends Error{status;code;details;constructor(t,i,r,a){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=a}static async fromResponse(t,i){const r=t.status;let a;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{a=await t.json()}catch{a=await t.text()}else a=await t.text();const u=I0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new sd(d,u,r,a)}static fromFetchError(t){const i=I0(t.status);return new sd(t.message,i,t.status,t.json??t.text)}};function I0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var nC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},pv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},sC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const iC=[429,503],Id={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function rC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function gv(s,t=Id){const{initialDelay:i,maxDelay:r,multiplier:a,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Ld;if(b instanceof ti&&!iC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?rC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*a,r)}}}}const lC=[201,204,205];function aC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||lC.includes(r.status))return r;const a=await r.arrayBuffer();return new Response(a,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(a){throw t[1]?.signal?.aborted?new Ld:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),a instanceof Error?a.message:typeof a==`string`?a:`failed to read body`)}}}function oC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function cC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,a=0;return{async next(){if(r)return{done:!0,value:void 0};a++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{a--}},async return(u){if(a>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(a>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Eh(s){return oC(s)||cC(s),s}async function*H0(s,t){const i=s.getReader(),r=new TextDecoder;let a=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;a+=r.decode(p,{stream:!0}),a=a.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=a.split(` +`);a=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(a+=u),a&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Hd=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},yv=class id extends Hd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new id({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new id({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new qd(this)}},Ch=class Tr extends Hd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new Tr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Tr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const a=t-this.connectionStartTime;if(a=r.maxShortConnections?{action:`fallback`,state:new yv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return a>=r.minConnectionDuration?{action:`healthy`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new qd(this)}},qd=class rd extends Hd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new rd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new rd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const q0=`PAUSE_STREAM`;var uC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#r;#i;#y;#a;#h;#f;#o;#C;#d;#p=!1;#x=null;#c=`active`;#u;#w;#g;#m;#S;#b;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Ch(t):new yv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#r=!1,this.#y=s.isJsonMode,this.#a=s.abortController,this.#h=s.fetchNext,this.#f=s.startSSE,this.#S={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#b=s.encoding,this.#d=new Promise((i,r)=>{this.#o=i,this.#C=r}),this.#O=this.#I(s.firstResponse),this.#a.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#a.signal.reason),this.#m?.(),this.#g=void 0,this.#m=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#w=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#c===`active`&&(this.#c=`pause-requested`,this.#i=this.#i.pause(),this.#g=new Promise(s=>{this.#m=s}),this.#u?.abort(q0))}#T(){if(this.#c===`paused`||this.#c===`pause-requested`){if(this.#a.signal.aborted)return;this.#i instanceof qd&&(this.#i=this.#i.resume().state),this.#c=`active`,this.#m?.(),this.#g=void 0,this.#m=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#r}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#y)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#l(){this.#w?.(),this.#o()}#_(s){this.#w?.(),this.#C(s)}#v(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#p,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(jc)||void 0,upToDate:s.headers.has(Nc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Ch||(this.#i=new Ch({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#f)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#a.signal.aborted,this.#S);if(this.#i=s.state,s.action===`fallback`)return this.#S.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#S.backoffMaxDelay,this.#S.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(a=>setTimeout(a,r))}this.#z(),this.#u=new AbortController;const t=await this.#f(this.offset,this.cursor,this.#u.signal);return t.body?H0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:hC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#b)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:a}=await t.next();if(r){const o=ld(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#b,this.#y);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(a.type===`control`)return this.#U(a),{type:`response`,response:ld(i,a.streamNextOffset,a.streamCursor,a.upToDate??!1,a.streamClosed??!1,this.contentType,this.#b,this.#y)};i.push(a.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=H0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#l(),r.close();return}return}if(i){if(this.#c===`pause-requested`||this.#c===`paused`){if(this.#c=`paused`,this.#g&&await this.#g,this.#a.signal.aborted){this.#l(),r.close();return}const a=await this.#k();if(a)i=a;else{this.#l(),r.close();return}}for(;;){const a=await this.#B(i);switch(a.type){case`response`:a.newIterator&&(i=a.newIterator),r.enqueue(a.response);return;case`closed`:this.#l(),r.close();return;case`error`:this.#_(a.error),r.error(a.error);return;case`continue`:a.newIterator&&(i=a.newIterator);continue}}}if(this.#M()){let a=!1;if(this.#c===`pause-requested`||this.#c===`paused`){if(this.#c=`paused`,this.#g&&await this.#g,this.#a.signal.aborted){this.#l(),r.close();return}a=!0}if(this.#a.signal.aborted){this.#l(),r.close();return}this.#u=new AbortController;const o=await this.#h(this.offset,this.cursor,this.#u.signal,a);this.#N(o),r.enqueue(o);return}this.#l(),r.close()}catch(a){if(this.#u?.signal.aborted&&this.#u.signal.reason===q0){this.#c===`pause-requested`&&(this.#c=`paused`);return}this.#a.signal.aborted?(this.#l(),r.close()):(this.#_(a instanceof Error?a:new Error(String(a))),r.error(a))}},cancel:()=>{this.#a.abort(),this.#w?.(),this.#l()}})}#E(){return this.#O.getReader()}async body(){this.#v(`body`),this.#p=!0;const s=this.#E(),t=[];try{let r=await s.read();for(;!r.done;){const a=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),a)break;r=await s.read()}}finally{s.releaseLock()}if(this.#l(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#v(`json`),this.#A(),this.#p=!0;const s=this.#E(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#l(),t}async text(){this.#v(`text`),this.#p=!0;const s=this.#E(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,a=await i.value.text();if(a&&t.push(a),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#l(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done;){const o=this.upToDate,u=a.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;a=await i.read()}await t.close(),this.#l()}catch(a){if(this.#a.signal.aborted){try{await t.close()}catch{}this.#l()}else{try{await t.abort(a)}catch{}this.#_(a instanceof Error?a:new Error(String(a)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#v(`bodyStream`),Eh(this.#j())}jsonStream(){this.#v(`jsonStream`),this.#A();const s=this.#E();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let a=await s.read();for(;!a.done;){const d=(await a.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}a=await s.read()}this.#l(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return Eh(i)}textStream(){this.#v(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return Eh(t)}subscribeJson(s){this.#v(`subscribeJson`),this.#A();const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#v(`subscribeBytes`);const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#v(`subscribeText`);const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#a.abort(s),this.#w?.(),this.#l()}get closed(){return this.#d}};function xh(s,t,i,r){const a=s.headers.get(Dn),o=s.headers.get(jc),u=s.headers.has(Nc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:a??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function fC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let a=0;ay.length>0).map(y=>fC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function tc(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new pv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function ec(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const K0=new Set;function dC(){if(!(typeof process>`u`))return`production`}function pC(){return typeof globalThis.window<`u`}function gC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function yC(s){try{return new URL(s)}catch{const t=gC();if(t)try{return new URL(s,t)}catch{return}return}}function mv(s,t){if(t===!1||dC()===`test`||!pC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,a=yC(r);a&&a.protocol===`http:`&&(K0.has(a.origin)||(K0.add(a.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function mC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await SC({...s,headers:t,params:i})}catch(r){if(s.onError){const a=await s.onError(r instanceof Error?r:new Error(String(r)));if(a===void 0)throw r;a.params&&(i={...i,...a.params}),a.headers&&(t={...t,...a.headers});continue}throw r}}async function SC(s){const t=s.url instanceof URL?s.url.toString():s.url;mv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(bh,r);const a=s.live??!0;(a===`long-poll`||a===`sse`)&&i.searchParams.set(Yo,a);const o=await ec(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await tc(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Id,m=gv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Ld?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(jc)??void 0,E=y.headers.has(Nc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(eC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const nt=new URL(t);nt.searchParams.set(bh,I),tt||(a===`sse`?nt.searchParams.set(Yo,`sse`):(a===!0||a===`long-poll`)&&nt.searchParams.set(Yo,`long-poll`)),K&&nt.searchParams.set(`cursor`,K);const J=await ec(s.params);for(const[Nt,ht]of Object.entries(J))nt.searchParams.set(Nt,ht);const lt=await tc(s.headers),at=await m(nt.toString(),{method:`GET`,headers:lt,signal:X});return at.ok||await ps(at,t),at},L=a===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(bh,I),tt.searchParams.set(Yo,`sse`),K&&tt.searchParams.set(`cursor`,K);const nt=await ec(s.params);for(const[at,Nt]of Object.entries(nt))tt.searchParams.set(at,Nt);const J=await tc(s.headers),lt=await m(tt.toString(),{method:`GET`,headers:J,signal:X});return lt.ok||await ps(lt,t),lt}:void 0;return new uC({url:t,contentType:v,live:a,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var V0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},vC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function $0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var Sv=class{#t;#e;#n;#s=0;#r;#i;#y;#a;#h;#f;#o=[];#C=0;#d=null;#p;#x;#c=!1;#u=null;#w;#g;#m=new Map;constructor(s,t,i){const r=i?.epoch??0,a=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(a<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#r=i?.autoClaim??!1,this.#i=a,this.#y=u,this.#h=i?.signal,this.#f=i?.onError,this.#a=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#g=!this.#r,this.#p=hv.promise(this.#O.bind(this),this.#x),this.#h&&this.#h.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#c)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#o.push({body:t}),this.#C+=t.length,this.#C>=this.#i?this.#b():this.#d||(this.#d=setTimeout(()=>{this.#d=null,this.#o.length>0&&this.#b()},this.#y))}async flush(){this.#d&&(clearTimeout(this.#d),this.#d=null),this.#o.length>0&&this.#b(),await this.#p.drained()}async detach(){if(!this.#c){this.#c=!0;try{await this.flush()}catch{}}}async close(s){if(this.#c){if(this.#u)return this.#u;await this.flush();const i=await this.#S(this.#w);return this.#u=i,i}this.#c=!0,this.#w=s,await this.flush();const t=await this.#S(s);return this.#u=t,t}async#S(s){const t=this.#t.contentType??`application/octet-stream`,i=$0(t)===`application/json`;let r;if(s!==void 0){const p=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(p)}]`:r=p}const a=this.#s,o={"content-type":t,[B0]:this.#e,[Go]:this.#n.toString(),[L0]:a.toString(),[qn]:`true`},u=await this.#a(this.#t.url,{method:`POST`,headers:o,body:r,signal:this.#h});if(u.status===204)return this.#s=a+1,{finalOffset:u.headers.get(Dn)??``};if(u.status===200)return this.#s=a+1,{finalOffset:u.headers.get(Dn)??``};if(u.status===403){const p=u.headers.get(Go),g=p?parseInt(p,10):this.#n;if(this.#r){const m=g+1;return this.#n=m,this.#s=0,this.#S(s)}throw new V0(g)}throw await ti.fromResponse(u,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#o.length}get inFlightCount(){return this.#p.length()}#b(){if(this.#o.length===0)return;const s=this.#o,t=this.#s;this.#o=[],this.#C=0,this.#s++,this.#r&&!this.#g&&this.#p.length()>0?this.#p.drained().then(()=>{this.#p.push({batch:s,seq:t}).catch(()=>{})}):this.#p.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#g||(this.#g=!0),this.#R(r,i,void 0)}catch(a){throw this.#R(r,i,a),this.#f&&this.#f(a),a}}#R(s,t,i){let r=this.#m.get(s);r||(r=new Map,this.#m.set(s,r));const a=r.get(t);if(a){a.resolved=!0,a.error=i;for(const u of a.waiters)u(i);a.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):a()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,a=$0(r)===`application/json`;let o;if(a)o=`[${s.map(y=>new TextDecoder().decode(y.body)).join(`,`)}]`;else{const m=s.reduce((b,w)=>b+w.body.length,0),y=new Uint8Array(m);let v=0;for(const b of s)y.set(b.body,v),v+=b.body.length;o=y}const u=this.#t.url,d={"content-type":r,[B0]:this.#e,[Go]:i.toString(),[L0]:t.toString()},p=await this.#a(u,{method:`POST`,headers:d,body:o,signal:this.#h});if(p.status===204)return{offset:``,duplicate:!0};if(p.status===200)return{offset:p.headers.get(Dn)??``,duplicate:!1};if(p.status===403){const m=p.headers.get(Go),y=m?parseInt(m,10):i;if(this.#r){const v=y+1;return this.#n=v,this.#s=1,this.#T(s,0,v)}throw new V0(y)}if(p.status===409){const m=p.headers.get(P1),y=m?parseInt(m,10):0;if(y0&&this.#f(s),this.#o=[],this.#C=0,this.#d&&(clearTimeout(this.#d),this.#d=null)}};function _h(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function wC(s){return s!=null&&typeof s.then==`function`}var Hn=class Ql{url;contentType;#t;#e;#n;#s;#r;#i=[];constructor(t){CC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#n=t.onError,t.contentType&&(this.contentType=t.contentType),this.#s=t.batching!==!1,this.#s&&(this.#r=hv.promise(this.#h.bind(this),1));const r=t.fetch??((...u)=>fetch(...u)),a={...t.backoffOptions??Id},o=gv(r,a);this.#e=aC(o)}static async create(t){const i=new Ql(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ql(t);return await i.head(),i}static async head(t){return new Ql(t).head()}static async delete(t){return new Ql(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=await this.#e(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});a.ok||await ps(a,this.url);const o=a.headers.get(`content-type`)??void 0,u=a.headers.get(Dn)??void 0,d=a.headers.get(`etag`)??void 0,p=a.headers.get(`cache-control`)??void 0,g=a.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t?.contentType??this.#t.contentType;a&&(i[`content-type`]=a),t?.ttlSeconds!==void 0&&(i[Z1]=String(t.ttlSeconds)),t?.expiresAt&&(i[W1]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=bC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:a&&(this.contentType=a),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});a.ok||await ps(a,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t?.contentType??this.#t.contentType??this.contentType;a&&(i[`content-type`]=a),i[qn]=`true`;let o;t?.body!==void 0&&(_h(a)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new pv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=wC(t)?await t:t;return this.#s&&this.#r?this.#a(r,i):this.#y(r,i)}async#y(t,i){const{requestHeaders:r,fetchUrl:a}=await this.#o(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[wh]=i.seq);const u=_h(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(a.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#a(t,i){return new Promise((r,a)=>{if(this.#i.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:a}),this.#r.idle()){const o=this.#i.splice(0);this.#r.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#h(t){try{await this.#f(t);for(const i of t)i.resolve();if(this.#i.length>0){const i=this.#i.splice(0);this.#r.push(i).catch(r=>{for(const a of i)a.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#i)r.reject(i);throw this.#i=[],i}}async#f(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t[0]?.contentType??this.#t.contentType??this.contentType;a&&(i[`content-type`]=a);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[wh]=o);const u=_h(a)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:a}=await this.#o(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[wh]=i.seq);const u=EC(t),d=await this.#e(a.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const a=new Sv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){a.append(o)},async close(){if(await a.close(),r)throw r},abort(o){a.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return mC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#n,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async#o(){const t=await tc(this.#t.headers),i=new URL(this.url),r=await ec(this.#t.params);for(const[a,o]of Object.entries(r))i.searchParams.set(a,o);return{requestHeaders:t,fetchUrl:i}}};function bC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function EC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,a){typeof r==`string`?a.enqueue(new TextEncoder().encode(r)):a.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:a,value:o}=await i.next();a?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(a){r.error(a)}},cancel(){i.return?.()}})}function CC(s){if(!s.url)throw new nC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new sC;mv(s.url,s.warnOnHttp)}const xC=`__includes_scalar__`;class Mi{}class Br extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class vv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,a,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=a,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Lr(s){return s instanceof vv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function Kd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function Y0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function _C(s){return{expression:s,residual:!0}}function TC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function sa(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const a=s.select[r];if(a&&a.type===`ref`)return sa(s,a,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...a]=t.path,o=TC(s,r);return o?o.type===`queryRef`?sa(o.query,new Me(a),i):{collection:o.collection,path:a}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class Q0 extends En{constructor(t,i,r){const a=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||a),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class AC extends Ui{constructor(){super(`Collection requires a config`)}}class OC extends Ui{constructor(){super(`Collection requires a sync config`)}}class RC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class F0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class ma extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class DC extends ma{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class MC extends ma{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class kC extends ma{constructor(){super(`Collection is in error state`)}}class UC extends ma{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class zC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class jC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class NC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class BC extends Yn{constructor(t,i,r){const a=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${a}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${a}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(a)}}class LC extends Yn{constructor(){super(`The first argument to update is missing`)}}class IC extends Yn{constructor(){super(`No keys were passed to update`)}}class HC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class qC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class KC extends Yn{constructor(){super(`No keys were passed to delete`)}}class VC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Vd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class $C extends Vd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class GC extends Vd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class YC extends Vd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class QC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class FC extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class JC extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class XC extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class ZC extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class Th extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Ah extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class WC extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class PC extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class tx extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ex extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class nx extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Qo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class sx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ix extends zi{constructor(){super(`Query must have a from clause`)}}class J0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class rx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class lx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class ax extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class ox extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class cx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class wv extends Le{constructor(t,i,r){const a=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${a} not found in inputs map${o}`)}}class ux extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class fx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class hx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class dx extends Le{constructor(){super(`Reference path cannot be empty`)}}class px extends Le{constructor(t){super(`Unknown function: ${t}`)}}class X0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class gx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class yx extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class mx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Sx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class vx extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class wx extends ji{constructor(){super(`Invalid join condition`)}}class bx extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Bc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ex extends Bc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Cx extends Bc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class xx extends Bc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class _x extends Bc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class Z0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class Tx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ax extends Tx{constructor(){super(`Cannot combine empty expression list`)}}class Ox extends Le{constructor(t,i,r,a){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${a.join(`, `)}. This indicates a bug in alias tracking.`)}}class Rx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Dx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return nc(s,t,new Map)}function nc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const a=Array.from(s.entries()).every(([o,u])=>t.has(o)&&nc(u,t.get(o),i));return i.delete(s),a}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),a=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===a.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,a=t;if(r.length!==a.length)return!1;for(let o=0;onc(a,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),a=Object.keys(t);if(r.length!==a.length)return i.delete(s),!1;const o=r.every(u=>u in t&&nc(s[u],t[u],i));return i.delete(s),o}return!1}const Mx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Mx.has(t)}const bv={direction:`asc`,nulls:`first`,stringSort:`locale`},Oh=new WeakMap;let kx=1;function W0(s){if(Oh.has(s))return Oh.get(s);const t=kx++;return Oh.set(s,t),t}const $d=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const a=typeof s==`object`,o=typeof t==`object`;if(a||o){if(a&&o){const u=W0(s),d=W0(t);return u-d}if(a)return 1;if(o)return-1}return st?1:0},Ux=(s,t,i)=>$d(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function Pl(s){return(t,i)=>s.direction===`asc`?$d(t,i,s):Ux(t,i,s)}const zx=Pl({direction:`asc`,nulls:`first`,stringSort:`locale`});function jx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Hx(s):Ix(s);case`func`:return qx(s,t);default:throw new hx(s.type)}}function Ix(s){const[t,...i]=s.path;if(!t)throw new dx;if(t===`$selected`){if(i.length===0)return a=>a.$selected;if(i.length===1){const a=i[0];return o=>o.$selected?.[a]}else return a=>{const o=a.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return a=>a[r];if(i.length===1){const a=i[0];return o=>o[r]?.[a]}else return a=>{const o=a[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Hx(s){const t=s.path;return i=>{let r=i;for(const a of t){if(r==null)return r;r=r[a]}return r}}function qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],a=i[1];return o=>{const u=Or(r(o)),d=Or(a(o));return me(u)||me(d)?null:Bx(u,d)}}case`gt`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u{const u=r(o),d=a(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let a=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(a=!0)}return a?null:!0};case`or`:return r=>{let a=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(a=!0)}return a?null:!1};case`not`:{const r=i[0];return a=>{const o=r(a);return me(o)?null:!o}}case`in`:{const r=i[0],a=i[1];return o=>{const u=Or(r(o)),d=a(o);return me(u)?null:Array.isArray(d)?d.some(p=>Or(p)===u):!1}}case`like`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:P0(u,d,!1)}}case`ilike`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:P0(u,d,!0)}}case`upper`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(a=>{const o=a(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const a of i){const o=a(r);if(o!=null)return o}return null};case`add`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],a=i[1];return o=>{const u=r(o),p=a(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return a=>{const o=r(a),u=Rh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return a=>{const o=r(a),u=Rh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],a=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=a(o),p=Rh(d);return p?Lx(u,p):null}}case`isUndefined`:{const r=i[0];return a=>r(a)===void 0}case`isNull`:{const r=i[0];return a=>r(a)===null}default:throw new px(s.name)}}function P0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Kx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function tS(s,t,i,r,a){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??a(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Vx(s){return ad.includes(s)}function Cv(s){return s.some(t=>Vx(t))}function Sa(s,t,i){if(Cv(t))return;const r=i??{...bv,...s.compareOptions};for(const a of s.indexes.values())if(a.matchesField(t)&&a.matchesCompareOptions(r))return a.matchesDirection(r.direction)?a:new Kx(a)}function $x(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=Sa(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of a)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const a=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:$x(a)}}return{canOptimize:!1,matchingKeys:new Set}}function Xx(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const a=Yd(r,t);a.canOptimize&&i.push(a)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Gx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function Zx(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const a=i.path,o=r.value,u=Sa(t,a);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function xv(s){return s.config.autoIndex===`eager`}function Lc(s,t,i,r,a){if(Cv(t)||!xv(i))return;const o=r??{...bv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:a?{compareFn:a,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function Wx(s,t){if(!xv(t))return;const i=Px(s);for(const{fieldName:r,fieldPath:a}of i)Lc(r,a,t)}function Px(s){const t=[];function i(r){if(r.type!==`func`)return;const a=r;if(a.name===`and`){for(const g of a.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(a.name)||a.args.length<1||a.args[0].type!==`ref`)return;const d=a.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class t_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),a=i(r);return this.set(t,a),a}}const Dh=3e4;function Mh(s,t){if(t.length<=Dh)s.push(...t);else for(let i=0;i0)a=o;else return o}return r}class n_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let a=0;at?1:0:typeof s==`string`?-1:1}function ia(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const i_=we(),r_=we(),l_=we(),a_=we(),o_=we();function we(){return Math.random()*(2**31-1)>>>0}const _v=new ArrayBuffer(8),c_=new DataView(_v),Xs=new Uint8Array(_v);class va{constructor(){this.hash=i_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(o_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(r_);for(let i=0;i>>8&255)}return;case`number`:c_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(a_)):this.update(l_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we(),g_=we(),y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function x_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&C_.has(t)}const __=128,ra=new WeakMap;function Ne(s){const t=new va;return Tv(t,s),t.digest()}function T_(s){const t=ra.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=A_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=__)i=O_(s);else return cd(s);else{if(s instanceof File)return cd(s);if(x_(s))i=R_(s);else{let r=s,a=m_;s instanceof Array&&(a=S_),s instanceof Map&&(a=v_,r=[...s.entries()]),s instanceof Set&&(a=w_,r=[...s.entries()]),i=D_(r,a)}}return ra.set(s,i),i}function A_(s){const t=new va;return t.update(y_),t.update(s.getTime()),t.digest()}function O_(s){const t=new va;t.update(b_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Mh(i,this.#t),Mh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${kh.getStringId(u)}|${kh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=kh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const a=[];for(const[o,u]of t)u!==0&&a.push([i.get(o),u]);return new se(a)}#n(){const t=new t_(()=>0),i=new Map;let r=!1,a=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)a=!0;else{o=!0;break}const u=o||r&&a;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Mh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class U_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new U_(t)}}class Av{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends Av{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class z_ extends Av{constructor(t,i,r,a){super(t,[i,r],a),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Qd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class j_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new N_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class N_ extends zn{sendData(t){this.writer.sendData(t)}}class B_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const a of t)i.extend(a);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Ov(){return s=>{const t=new zn(s.graph,new Un),i=new B_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fl=Symbol(`NO_PREFIX`);class nS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=ta(t),a=this.get(r);if(sc(a)){const[o,u]=a;if(ta(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Jl;p.set(Ne(o),a),p.set(Ne(t),[t,i]),this.set(r,p)}}else a===void 0?this.set(r,[t,i]):a.addValue(t,i)&&this.delete(r);return this.size===0}}class Jl extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),a=this.get(r);if(a){const[,o]=a,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[a,o]of r.getInner()){const[u,d]=a;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(sc(i))yield i;else{if(i===void 0)return;if(i instanceof Jl)for(const r of i.values())yield r;else for(const r of i.values())if(sc(r))yield r;else for(const a of r.values())yield a}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,a]=i;if(a===0)return;const o=(this.#e.get(t)||0)+a;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(sc(u)){this.#n(t,u,r,a);return}if(u instanceof Jl){const d=ta(r);if(d!==Fl){const p=new nS;p.set(Fl,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,a)&&this.#t.delete(t)}else u.addValue(r,a)&&this.#t.delete(t)}#n(t,i,r,a){const[o,u]=i;if(o===r){const g=u+a;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=ta(r),p=ta(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+a;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fl&&d===Fl){const g=new Jl;g.set(Ne(o),i),g.set(Ne(r),[r,a]),this.#t.set(t,g)}else{const g=new nS;if(p===d){const m=new Jl;m.set(Ne(o),i),m.set(Ne(r),[r,a]),g.set(p,m)}else g.set(p,i),g.set(d,[r,a]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,a]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of a)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,a]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of a)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function ta(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fl}function sc(s){return Array.isArray(s)}class L_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,a){super(t,i,r),this.#n=a}run(){const t=new Set;for(const r of this.inputMessages())for(const[a,o]of r.getInner()){const[u,d]=a;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const a=this.#t.get(r),o=this.#e.get(r),u=this.#n(a),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Rv(s){return t=>{const i=new zn(t.graph,new Un),r=new L_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class I_ extends Ni{#t;#e;constructor(t,i,r,a=o=>o){super(t,i,r),this.#t=a,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[a,o]of r.getInner()){const u=Ne(this.#t(a)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,a])}const i=[];for(const[r,[a,o]]of t.entries()){const u=this.#e.get(r)??0;a===0?this.#e.delete(r):this.#e.set(r,a),u<=0&&a>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&a<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function H_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new I_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class q_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const K_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Rr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Rr(s.slice(u),t.slice(u),i)}const a=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-a>1){const u=Math.round(.5*(a+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[a]+Rr(s.slice(1),null,i)}function Dv(s){if(s.length!==Mv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Mv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xl(s){const t=Mv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function sS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xl(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function iS(s,t){Dv(s);const[i,...r]=s.split(``);let a=!0;for(let o=r.length-1;a&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],a=!1)}if(a){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function V_(s,t){Dv(s);const[i,...r]=s.split(``);let a=!0;for(let o=r.length-1;a&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],a=!1)}if(a){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function $_(s,t,i=K_){if(s!=null&&sS(s,i),t!=null&&sS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xl(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Rr(``,g,i);if(p{const o=s(i,a);return o!==0?o:od(t,r)}}class Fd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,a=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??a);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=s_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#r(t),a=r===0?null:aS(this.#t[r-1]),o=r===this.#t.length?null:aS(this.#t[r]),u=$_(a,o),d=rS(t,u);if(this.#t.splice(r,0,d),rthis.#e(lS(i),lS(r)))}}class Uv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:a,newMultiplicity:o}=this.#n(t,r);return a<=0&&o>0?this.#e.insert([t,i]):a>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Fd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,a=r+i;return a===0?this.#t.delete(t):this.#t.set(t,a),{oldMultiplicity:r,newMultiplicity:a}}}function dc(s,t){if(s){const[[i,r],a]=s;t.push([[i,[r,a]],1])}}function pc(s,t){if(s){const[[i,r],a]=s;t.push([[i,[r,a]],-1])}}class G_ extends Ni{#t=new Map;#e;#n;#s;#r;constructor(t,i,r,a,o){super(t,i,r),this.#e=o.groupKeyFn,this.#r=o.limit??1/0,this.#s=o.offset??0,this.#n=kv(a),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#h.bind(this))}createTopK(t,i,r){return new Fd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#y(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#r,this.#n);i=new Uv(r),this.#t.set(t,i)}return i}#a(t,i){i.isEmpty&&this.#t.delete(t)}#h({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#r=i);const r=[];let a=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#r});u.moveIns.forEach(d=>dc(d,r)),u.moveOuts.forEach(d=>pc(d,r)),u.changes&&(a=!0)}a&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,a]of i.getInner()){const[o,u]=r;this.#f(o,u,a,t)}t.length>0&&this.output.sendData(new se(t))}#f(t,i,r,a){const o=this.#e(t,i),u=this.#y(o),d=u.processElement(t,i,r);dc(d.moveIn,a),pc(d.moveOut,a),this.#a(o,u)}}function Y_(s,t){return i=>{const r=new zn(i.graph,new Un),a=new G_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(a),r}}class Q_ extends z_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,a,o=`inner`){super(t,i,r,a),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[a,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(a),d=i.getConsolidatedMultiplicity(a);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([a,[g,null]],m)}if(i.size>0)for(const a of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(a),u=i.getConsolidatedMultiplicity(a);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(a))m!==0&&r.add([a,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[a,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(a),d=t.getConsolidatedMultiplicity(a);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([a,[null,g]],m)}if(t.size>0)for(const a of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(a),u=t.getConsolidatedMultiplicity(a);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(a))m!==0&&r.add([a,[null,g]],p?-m:+m)}}}function zv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),a=new Q_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(a),r}}class F_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new F_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class J_ extends Ni{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function ud(s){return t=>{const i=new zn(t.graph,new Un),r=new J_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class X_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return this.#t(t),t}}function Z_(s){return t=>{const i=new zn(t.graph,new Un),r=new X_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class W_ extends Ni{#t;constructor(t,i,r,a,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,kv(a));this.#t=new Uv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Fd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],a=this.#t.move({offset:t,limit:i});a.moveIns.forEach(o=>dc(o,r)),a.moveOuts.forEach(o=>pc(o,r)),a.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,a]of i.getInner()){const[o,u]=r;this.processElement(o,u,a,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,a){const o=this.#t.processElement(t,i,r);dc(o.moveIn,a),pc(o.moveOut,a)}}function P_(s,t){const i=t||{};return r=>{const a=new zn(r.graph,new Un),o=new W_(r.graph.getNextOperatorId(),r.connectReader(),a.writer,s,i);return r.graph.addOperator(o),a}}function oS(s){return`pipe`in s}function cS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,a])=>!oS(a)));return Object.fromEntries(Object.entries(t).filter(([r,a])=>oS(a))),r=>{const a=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=ia(p),m={};m[a]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Rv(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[a];g[a]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[a],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function tT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,a]of t)i+=r*a;return i}}}function eT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,a]of t)i+=r*a;return i}}}function nT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[a,o]of t)i+=a.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function sT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[a,o]of i)(!r||a&&ai);return{preMap:i=>t(i),reduce:i=>{let r;for(const[a,o]of i)(!r||a&&a>r)&&(r=a);return r}}}const rT={sum:tT,count:eT,avg:nT,min:sT,max:iT};function lT(s,t){const i=t.limit??1/0,r=t.offset??0,a=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Y_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:a,setWindowFn:o,groupKeyFn:u}),Ov())}function aT(s,t,i){const r=i?.limit??1/0,a=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:a,setSizeCallback:o,setWindowFn:u}),Ov())}function oT(s,t){return aT(P_,s,t)}const Uh=`__virtual_synced__`,zh=`__virtual_has_local__`;function uS(s){let t=!1,i=!0,r=!1;for(const[a,o]of Object.entries(s)){if(a===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:cT,count:uT,avg:fT,min:hT,max:dT}=rT;function pT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[a,o]of Object.entries(t)){if(o.type===`agg`||Ir(o))continue;const u=r.findIndex(d=>gc(o,d));if(u===-1)throw new Ex(a);i.set(a,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function fS(s,t,i,r,a,o,u){const d={[Uh]:{preMap:([,w])=>uS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[zh]:{preMap:([,w])=>uS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Jo(A);else if(Ir(A)){const{transformed:z,extracted:L}=fd(A,T);for(const[I,K]of Object.entries(L))w[I]=Jo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(cS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[nt,J]of Object.entries(r))J.type===`agg`&&(z[nt]=D[nt]);hS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${ia(L)}`:`single_group`,K={...D,$selected:z},X=D[Uh],tt=D[zh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=G0(D),z=yc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Mr(L(K))}))}if(a&&a.length>0)for(const D of a)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Mr(D(z))}));return s}const p=pT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}hS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=G0(w),T=yc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(a&&a.length>0)for(const w of a)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Mr(w(T))}));return s}function gc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>gc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>gc(i,t.args[r]));default:return!1}}function Jo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},a=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return cT(i);case`count`:return uT(a);case`avg`:return fT(i);case`min`:return hT(r);case`max`:return dT(r);default:throw new Cx(s.name)}}function yc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[a,o]of Object.entries(t))if(o.type===`agg`&&gT(r,o))return new Me([i,a]);throw new xx(r.name)}case`func`:{const r=s,a=r.args.map(o=>yc(o,t));return new Je(r.name,a)}case`ref`:return s;case`val`:return s;default:throw new _x(s.type)}}function hS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,a]of Object.entries(i))s[r]=a({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Ir(s){return Lr(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Ir(t)):!1:!1}function fd(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(a=>{const o=fd(a,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function gT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>gc(i,t.args[r]))}function yT(s,t,i,r,a,o,u,d,p,g){const m=i.map(E=>{const T=yc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:hd(E,a)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(nt=>nt.expression.type===`ref`)?i.map(nt=>{const J=nt.expression,lt=sa(s,J,a);return he(lt?new Me(lt.path):nt.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(nt,J)=>{if(i.length===1){const lt=nt&&N(nt),at=J&&N(J);return v(lt,at)}if(I){const lt=at=>at&&I.map(Nt=>Nt(at));return v(lt(nt),lt(J))}return 0},valueExtractorForRawRow:nt=>{if(i.length===1)return N(nt);if(I)return I.map(J=>J(nt))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??a.id;o[tt]=w,b=nt=>{o[tt].dataNeeded=()=>{const J=nt();return Math.max(0,w.limit-J)}}}}return g?t.pipe(lT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(oT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function hd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function mT(s,t={}){const i=r=>{const a=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&a.push({type:`insert`,key:o,value:u});return a};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?ea(t.where):void 0,a=vT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(a===void 0)return;const o=[];for(const u of a){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,a=Yx(r,s);if(a.canOptimize){const o=[];for(const u of a.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=ea(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const a=ea(t.where);return t.optimizedOnly?void 0:i(a)}}function ea(s){const t=Ev(s);return i=>{try{const r=t(i);return Mr(r)}catch{return!1}}}function ST(s,t){const i=ea(t.whereExpression);return r=>{const a=[];for(const o of r)if(o.type===`insert`)i(o.value)&&a.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?a.push(o):u&&!d?a.push({...o,type:`insert`}):!u&&d&&a.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&a.push(o);(a.length>0||r.length===0)&&s(a)}}function vT(s,t,i,r,a){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=hd(p,s);Lc(y[0],y,s,v);const b=Sa(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(a)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Pl(m.compareOptions),v=dS(p.value,m.expression),b=dS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function dS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const a of i.path)r=r?.[a];return r}else return t.type===`val`?t.value:Ev(t)(s)}class pS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,a=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=od(t,u);if(g<0)a=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const a=this.map.get(t),o=this.indexOf(t,a);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ic=`__tanstack_db_direct`;class wT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:a,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?tS(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let nt=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(nt=!0);const J=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(nt&&!J))if(A===void 0&&z!==void 0){const lt=N.get(D);if(lt){const at=lt.value,Nt=tS(at,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Nt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||J)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=a,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new pS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new pS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,a=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||a.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,a=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===a&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:a,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:a,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),a=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:a,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:a}=this;if(!i.has(t))return r.has(t)?r.get(t):a.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:a}=this;return i.has(t)?!1:r.has(t)?!0:a.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const a of t.keys())i.has(a)||(yield a);for(const a of r.keys())!t.has(a)&&!i.has(a)&&(yield a)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,a]of this.entries())t(a,r,i++)}map(t){const i=[];let r=0;for(const[a,o]of this.entries())i.push(t(o,a,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),a=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ic]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,a,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(a=>this.syncedData.has(a)&&!this.optimisticUpserts.has(a)).length,r=Array.from(this.optimisticUpserts.keys()).filter(a=>!this.syncedData.has(a)).length;return t-i+r}collectOptimisticChanges(t,i,r,a){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?a.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?a.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&a.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function jv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const a=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,a),a}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function gS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const a=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?a:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:a}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return rc(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function rc(s){return s&&typeof s==`object`&&s.__refProxy===!0}function dd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function yS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function bT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function pd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function gd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(a=>ie(a)))}function ET(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(a=>ie(a)))}function CT(s,t){return new Je(`in`,[ie(s),ie(t)])}class xT{constructor(t){this.query=t}}class _T{constructor(t){this.query=t}}class Nv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,a=>{i(a),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,a)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),a(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(a){queueMicrotask(()=>{throw a})}})}clearListeners(){this.listeners.clear()}}function TT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:a}=s[0];return(a.direction===`asc`?yS:pd)(r,new Be(t[0]))}const i=[];for(let r=0;rgd(m,y)))}}return i.length===1?i[0]:i.reduce((r,a)=>ET(r,a))}class AT extends Nv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&Wx(r.whereExpression,this.collection);const a=o=>{i(o),this.trackSentKeys(o)};this.callback=a,this.filteredCallback=r.whereExpression?ST(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const a=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(a),a instanceof Promise&&(this.pendingTruncateRefetches.add(a),a.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(a),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=gd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},a=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(a),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(a);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:a,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?ea(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const nt=this.collection.get(tt);return nt===void 0?!1:v?.(nt)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],nt=this.collection.currentStateAsChanges({where:dd(tt,new Be(g))});if(nt){const J=nt.map(at=>at.key).filter(at=>!this.sentKeys.has(at)&&b(at));T.push(...J);const lt=m.take(i-T.length,g,b);T.push(...lt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const nt of T){const J=this.collection.get(nt);E.push({type:`insert`,key:nt,value:J}),w=z?z(J):J,tt.add(nt)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=TT(t,r);if(tt){const{expression:nt}=t[0],J=r[0];let lt;if(J instanceof Date){const at=new Date(J.getTime()+1);lt=gd(bT(nt,new Be(J)),pd(nt,new Be(at)))}else lt=dd(nt,new Be(J));I={whereFrom:tt,whereCurrent:lt,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:a??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const a of t){let o=a;if(this.sentKeys.has(a.key)){if(a.type===`insert`)continue;a.type===`delete`&&this.sentKeys.delete(a.key)}else{if(a.type===`update`)o={...a,type:`insert`,previousValue:void 0};else if(a.type===`delete`&&!i)continue;this.sentKeys.add(a.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class OT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const a=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(a)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...a}=i;let o=a.whereExpression;if(r){const d=jv(),p=r(d);o=ie(p)}const u=new AT(this.collection,t,{...a,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new UC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const RT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),DT=s=>{clearTimeout(s)},MT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>RT(s),jh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):DT,Bv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const a=Date.now()+i;this.tasks.set(t,{executeAt:a,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(a){console.error(`Error in CleanupQueue task:`,a)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};Bv.instance=null;let Nh=Bv;class kT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new MC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new ma(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new DC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||Nh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){Nh.getInstance().cancel(this),this.idleCallbackId!==null&&(jh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&jh(this.idleCallbackId),this.idleCallbackId=MT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),Nh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(a=>{try{a()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(jh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Jd=Symbol(`liveQueryInternal`);class UT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=zT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new Th;if(r.committed)throw new Ah;let a;`key`in i?a=i.key:a=this.config.getKey(i.value),this.state.pendingLocalChanges.has(a)&&this.state.pendingLocalOrigins.add(a);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(a),p=r.deletedKeys.has(a),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(a);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Jd];throw new BC(a,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:a};r.operations.push(u),o===`delete`?(r.deletedKeys.add(a),r.rowMetadataWrites.set(a,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(a,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(a,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(a,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new WC;if(i.committed)throw new PC;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Th;if(i.committed)throw new Ah;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new Th;if(t.committed)throw new Ah;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[a,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(a):i.set(a,o.value);return Array.from(i.entries()).filter(([a])=>t?a.startsWith(t):!0).map(([a,o])=>({key:a,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new kC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new Z0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new Z0(this.id,t)})}this.preloadPromise=null}}function zT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const mS=1;function lc(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(a=>Zs(a)??null).sort((a,o)=>lc(xi(a),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([a,o])=>({key:Zs(a)??null,value:Zs(o)??null})).sort((a,o)=>lc(xi(a.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[a])=>lc(r,a));for(const[r,a]of i){const o=Zs(a);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,a)=>lc(r,a)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function NT(s,t,i,r,a){const o=jT(r),u=Zs(t)??null,d=Zs(a),g=Zs({signatureVersion:mS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:mS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function yd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>yd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=yd(r);return t}function BT(s){return JSON.parse(JSON.stringify(s))}class LT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,a=jv(),o=t(a),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=NT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const a=this.indexMetadata.get(i);return this.indexMetadata.delete(i),a&&this.events.emitIndexRemoved(a),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:BT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:yd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var IT={};const HT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),qT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),KT=new Set([`set`,`delete`,`clear`,`add`]),VT=new Set([`entries`,`keys`,`values`,`forEach`]);function Xd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function $T(s,t,i,r){if(HT.has(s))return function(...a){const o=a[0];if(typeof o!=`function`)return t.apply(i.copy_,a);const u=(g,m)=>{if(Xd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...a.slice(1)])}const p=t.apply(i.copy_,[d,...a.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function GT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const a=i[r];let o=a;if(Xd(a)){const u={tracker:s,prop:String(r)},{proxy:d}=t(a,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function SS(s,t,i){return function(...r){const a=s.apply(t.copy_,r);return i(t),a}}function YT(s,t,i,r,a,o,u){if(VT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(a.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(a),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of a.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of a.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:a,prop:E,updateMap:D=>{a.copy_ instanceof Map&&a.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:a,prop:E,updateMap:D=>{a.copy_ instanceof Map&&a.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:a,prop:E,updateSet:D=>{a.copy_ instanceof Set&&(a.copy_.delete(E),a.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:a,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&IT.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const a=[];return t.set(s,a),s.forEach((o,u)=>{a[u]=gs(o,t)}),a}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const a=Object.getPrototypeOf(s).constructor,o=new a(s.length);t.set(s,o);for(let u=0;u{a.set(u,gs(o,t))}),a}if(s instanceof Set){const a=new Set;return t.set(s,a),s.forEach(o=>{a.add(gs(o,t))}),a}if(ei(s))return s;const i={};t.set(s,i);for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&(i[a]=gs(s[a],t));const r=Object.getOwnPropertySymbols(s);for(const a of r)i[a]=gs(s[a],t);return i}let vS=0;function QT(){return vS+=1,vS}function Zd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Zd(y,v);return i.set(y,b),b}}const a=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:QT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),a.has(y))return Tt(`proxyCache found match`),a.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(qT.has(D))return SS(E,o,u);const A=$T(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return GT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(KT.has(D))return SS(E,o,u);const A=YT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Xd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return a.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return a.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function FT(s){const t=s.map(i=>Zd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function JT(s,t){const{proxy:i,getChanges:r}=Zd(s);return t(i),r()}function XT(s,t){const{proxies:i,getChanges:r}=FT(s);return t(i),r()}function ZT(){let s,t,i=!0;return{promise:new Promise((a,o)=>{s=u=>{i=!1,a(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function WT(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class PT{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:a}){if(typeof t>`u`){a();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,a),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:a,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(a=>a!==i),r.jobs.size===0&&this.contexts.delete(t))}}const mc=new PT,Sc=[];let la=[],tA=0;function eA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Zl(s){const t=new rA(s);return Sc.push(t),t}function ac(){if(la.length>0)return la.slice(-1)[0]}function nA(s){mc.clear(s.id),la.push(s)}function sA(s){try{mc.flush(s.id)}finally{la=la.filter(t=>t.id!==s.id)}}function iA(s){const t=Sc.findIndex(i=>i.id===s.id);t!==-1&&Sc.splice(t,1)}let rA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new QC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=ZT(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=tA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&iA(this)}mutate(t){if(this.state!==`pending`)throw new JC;nA(this);try{t()}finally{sA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(a=>a.globalKey===i.globalKey);if(r>=0){const a=this.mutations[r],o=eA(a,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new XC;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(a=>r.add(a.globalKey));for(const a of Sc)a.state===`pending`&&a.mutations.some(o=>r.has(o.globalKey))&&a.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new ZC;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class lA{constructor(t,i){this.insert=(r,a)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=ac();if(!u&&!this.config.onInsert)throw new $C;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new NC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:a?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:a?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Zl({metadata:{[ic]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,a)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=ac();if(!u&&!this.config.onDelete)throw new YC;if(Array.isArray(r)&&r.length===0)throw new KC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new VC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:a?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:a?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Zl({autoCommit:!0,metadata:{[ic]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new RC}validateData(t,i,r){if(!this.config.schema)return t;const a=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=a[`~standard`].validate(d);if(p instanceof Promise)throw new F0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new Q0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=a[`~standard`].validate(t);if(o instanceof Promise)throw new F0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new Q0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new zC(i):new jC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new LC;const a=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=ac();if(!o&&!this.config.onUpdate)throw new GC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new IC;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new HC(w);return E});let y;u?y=XT(m,p):y=[JT(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new qC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:a.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Zl({mutationFn:async()=>{}});return w.commit().catch(()=>{}),a.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),a.transactions.set(o.id,o),a.scheduleTransactionCleanup(o),a.recomputeOptimisticState(!0),o;const b=Zl({metadata:{[ic]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),a.transactions.set(b.id,b),a.scheduleTransactionCleanup(b),a.recomputeOptimisticState(!0),b}}class aA extends Nv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Wd(s){const t=new Pd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Pd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new AC;if(!t.sync)throw new OC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new OT,this._events=new aA,this._indexes=new LT,this._lifecycle=new kT(t,this.id),this._mutations=new lA(t,this.id),this._state=new wT(t),this._sync=new UT(t,this.id),this.comparisonOpts=oA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,a]of this.entries())t(a,r,i++)}map(t){const i=[];let r=0;for(const[a,o]of this.entries())i.push(t(o,a,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return mT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function oA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function cA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function uA(s){const{mutationFn:t,onMutate:i,...r}=s;return a=>{const o=Zl({...r,mutationFn:async u=>await t(a,u)});return o.mutate(()=>{const u=i(a);if(cA(u))throw new FC}),o}}function fA(s){const t=hA(s);let i=s,r,a=0;const o=10;for(;aHv(u)),a=qv(r),o=Lv(s);for(const[u,d]of a.singleSource)dA(s,u)&&!o.has(u)&&t.set(u,d);return t}function dA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Lv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const a=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(a),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function md(s){const t={...s,from:s.from.type===`queryRef`?new Sn(md(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(md(i.from.query),i.from.alias):i.from}))};return pA(t)}function pA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=vd(s.where),p=vc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!Y0(d)),r=vd(t).map(d=>Hv(d)),a=qv(r),o=yA(s,a),u=s.where.filter(d=>Y0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Iv(s){return{...s,from:Sd(s.from),join:s.join?.map(t=>({...t,from:Sd(t.from)}))}}function Sd(s){if(s.type===`collectionRef`)return s;const t=Iv(s.query);if(gA(t)){const i=Sd(t.from);return i.type===`collectionRef`?new Br(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function gA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function vd(s){const t=[];for(const i of s){const r=Kd(i);t.push(...tp(r))}return t}function tp(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...tp(i));return t}else return[s]}function Hv(s){const t=new Set;let i=!1;function r(a){switch(a.type){case`ref`:if(a.path&&a.path.length>0){const o=a.path[0];o&&(t.add(o),a.path.length===1&&(i=!0))}break;case`func`:a.args&&a.args.forEach(r);break;case`val`:break;case`agg`:a.args&&a.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function qv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,vc(u));const a=i.length>0?vc(i):void 0;return{singleSource:r,multiSource:a}}function yA(s,t){const i=new Set,r=Lv(s),a=new Map;for(const[y,v]of t.singleSource)r.has(y)||a.set(y,v);const o=wS(s.from,a,i),u=s.join?s.join.map(y=>({...y,from:wS(y.from,a,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(_C(v)):d.push(v);const g=d.length>1?[vc(d.flatMap(y=>tp(Kd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Dr(s){return{from:s.from.type===`collectionRef`?new Br(s.from.collection,s.from.alias):new Sn(Dr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Br(t.from.collection,t.from.alias):new Sn(Dr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function wS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Br(s.collection,s.alias):new Sn(Dr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Br(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!EA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);if(xA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);const a=s.query.where||[],o={...Dr(s.query),where:[...a,r]};return i.add(s.alias),new Sn(o,s.alias)}function mA(s,t,i){return s.select?Kv(s.select)||CA(s.select,t,i):!1}function SA(s){return s.groupBy&&s.groupBy.length>0}function vA(s){return s.having&&s.having.length>0}function wA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function bA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function EA(s,t,i){return!(mA(s,t,i)||SA(s)||vA(s)||wA(s)||bA(s))}function Kv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Kv(i))return!0}return!1}function ep(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...ep(i));break}return t}function CA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const a=ep(t);for(const o of a){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function xA(s,t,i){const r=ep(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const a=s.select;if(!a)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=a[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function vc(s){if(s.length===0)throw new Ax;return s.length===1?s[0]:new Je(`and`,s)}function _A(s,t,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=TA(A,z,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function TA(s,t,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=OA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new X0(r);if(!X)throw new X0(I);const{activeSource:tt,lazySource:nt}=DA(t.type,K,X),J=Object.keys(i),{mainExpr:lt,joinedExpr:at}=AA(t.left,t.right,J,z),Nt=he(lt),ht=he(at);let M=s.pipe(ce(([Z,rt])=>[Or(Nt(rt)),[Z,rt]])),q=L.pipe(ce(([Z,rt])=>{const ft={[z]:rt};return[Or(ht(ft)),[Z,ft]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new gx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,rt=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ft=lt.type===`func`||at.type===`func`;if(!rt&&!ft){const _=tt===`main`?z:a;y.add(_);const H=tt===`main`?M:q,F=sa(w,tt===`main`?at:lt,nt),ct=F.collection,st=F.path[0];st&&Lc(st,F.path,ct);const yt=H.pipe(Z_(Dt=>{const wt=N[_]||_,an=g[wt];if(!an)throw new Ox(wt,_,nt.id,Object.keys(g));if(an.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[pt]])=>pt),et=new Me(F.path);an.requestSnapshot({where:CT(et,Es),optimizedOnly:!0})||an.requestSnapshot()}));tt===`main`?M=yt:q=yt}}return M.pipe(zv(q,t.type),RA(t.type))}function AA(s,t,i,r){const a=i.filter(d=>d!==r),o=wd(s),u=wd(t);if(o&&a.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&a.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new mx:o===u?new yx(o):a.includes(o)?u!==r?new vx(r):new wx:new Sx(o)}function wd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=wd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function OA(s,t,i,r,a,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new wv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,a,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new bx(s.type)}}function RA(s){return function(t){return t.pipe(ys(i=>{const[r,[a,o]]=i,u=a?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[a,o]]=i,u=a?.[0],d=a?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function DA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeUA(a,r)))}function jA(s){return s.type===`agg`}function NA(s){return s&&typeof s==`object`&&!Lr(s)}function Vv(s,t,i){for(const[r,a]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=a&&typeof a==`object`&&`type`in a&&a.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?a:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=a;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(NA(o)){Vv([...s,r],o,i);continue}if(jA(o)||Ir(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Lr(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const kr=Symbol(`includesRouting`);function wc(s,t,i,r,a,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;Ed(s);const{optimizedQuery:b,sourceWhereClauses:w}=fA(s);let E=b;g.set(E,s),xd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=LA(E.from,T,i,r,a,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,rt])=>[KA(rt,ht),[Z,rt]])).pipe(zv(m,`inner`)).pipe(ys(([Z,[rt]])=>rt!=null),ce(([Z,[rt,ft]])=>{const[_,H]=rt,Y={...H,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,rt={[z]:Z};return q&&(Object.assign(rt,q),rt.__parentContext=q),[ht,rt]}));if(E.join&&E.join.length>0&&(X=_A(X,E.join,A,I,z,T,p,g,i,r,a,o,u,d,s,wc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=Kd(ht),q=he(M);X=X.pipe(ys(([Z,rt])=>Mr(q(rt))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Mr(ht(q))));const tt=[],nt=[];if(E.select){const ht=HA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let rt;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));rt=X.pipe(ce(([Y,F])=>{const ct={};for(const st of H){ct[st.alias]||(ct[st.alias]={});const yt=st.compiled(F);let Dt=ct[st.alias];for(let wt=0;wt[Z(Y),null]));rt=rt.pipe(Rv(H=>H.map(([Y,F])=>[Y,F>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=wc(ft,T,i,r,a,o,u,d,p,g,rt,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:he(F)})),Y=Z;nt.push({fieldName:q.fieldName,getRouting:F=>{const ct={};for(const st of H){ct[st.alias]||(ct[st.alias]={});const yt=st.compiled(F);let Dt=ct[st.alias];for(let wt=0;wt({correlationKey:Z(H),parentContext:null})});qA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new rx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new lx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=zA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),nt.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:rt}of nt)q[Z]=rt(M);return M.$selected[kr]=q,[ht,M]})));const J=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=fS(X,E.groupBy,E.having,E.select,E.fnHaving,I,J):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Ir(M))&&(X=fS(X,[],E.having,E.select,E.fnHaving,I,J)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new ox;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(H_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=yT(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ft,[_,H]])=>{const Y=_.$selected,F=bS(Cd(Y),_);if(m){const ct=_[z]?.__correlationKey,st=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ft,[F,H,ct,st]]}return[ft,[F,H]]})),rt={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,rt),rt}else if(E.limit!==void 0||E.offset!==void 0)throw new cx;const at=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=bS(Cd(q),M);if(m){const rt=M[z]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,rt,ft]]}return[ht,[Z,void 0]]})),Nt={collectionId:I,pipeline:at,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Nt),Nt}function BA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Ed(s,t=new Set){const i=BA(s);for(const a of i)if(t.has(a))throw new ux(a,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&Ed(s.from.query,r),s.join)for(const a of s.join)a.from.type===`queryRef`&&Ed(a.from.query,r)}function LA(s,t,i,r,a,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new wv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=wc(b,t,i,r,a,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Cd(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new fx(s.type)}}function IA(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Cd(s){return IA(s)?s.value:s}function bS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function xd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),xd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const a of s.args){const o=np(a,t);r.push(o)}return new Je(s.name,r)}}function sp(s,t){return s.map(r=>{const a=np(r.expression,t);return{...r,expression:a}})}const Yv=new WeakMap;function VA(s){return s.utils?.[Jd]?.getBuilder?.()}function $A(s,t){Yv.set(s,t)}function GA(s){return Yv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Qo(i,d)}if(Array.isArray(t))throw new Qo(i,`array`);if(r.length!==1)throw r.length===0?new Qo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Qo(i,`string`):new tx(i);const a=r[0],o=t[a];let u;if(o instanceof Pd)u=new Br(o,a);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new ex(i);u=new Sn(d,a)}else throw new nx(a);return[a,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[a,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),a],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new sx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),a=t(r),o=rc(a)?ie(a):a;if(!Lr(o))throw new J0(ES(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?gS(i):Ei(i),a=t(r),o=rc(a)?ie(a):a;if(!Lr(o))throw new J0(ES(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let a=t(r);rc(a)&&a.__path.length===1&&(a={[`__SPREAD_SENTINEL__${a.__path[0]}__0`]:!0});const o=Fv(a,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),a=this.query.select||this.query.fnSelect?gS(r):Ei(r),o=t(a),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),a=t(r),o=Array.isArray(a)?a.map(d=>ie(d)):[ie(a)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ix;return this.query}}function ES(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function YA(s){return s===void 0?ie(null):s instanceof vv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function Qv(s){return s!==null&&typeof s==`object`&&!Lr(s)&&!s.__refProxy}function Fv(s,t=[]){if(!Qv(s))return YA(s);const i={};for(const[r,a]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=a;continue}if(a instanceof Wt){i[r]=Bh(a,r,t,`collection`);continue}if(a instanceof xT){if(!(a.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Bh(a.query,r,t,`array`);continue}if(a instanceof _T){if(!(a.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Bh(a.query,r,t,`concat`);continue}i[r]=Fv(a,t)}return i}function ip(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...ip(i));break}return t}function QA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return ip(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Bh(s,t,i,r){const a=s._getQuery(),o=[a.from.alias];if(a.join)for(const A of a.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(a.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...a.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)QA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of ip(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...a,where:y.length>0?y:void 0},E=w.select,T=E===void 0||Qv(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=xC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function CS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const a=s.path[0],o=t.path[0];if(a&&o&&i.includes(a)&&r.includes(o))return{parentRef:s,childRef:t};if(a&&o&&i.includes(o)&&r.includes(a))return{parentRef:t,childRef:s}}}function FA(s){const t=s(new Wt);return Jv(t)}function Jv(s){return s._getQuery()}function JA(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&a(o.select)}function a(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):rp(d)&&a(d))}return r(s),t}function Xv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Xv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function XA(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&a(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?a(d.query):rp(d)&&r(d))}function a(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return a(s),t}function rp(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function ZA(s){const t=typeof s.query==`function`?FA(s.query):Jv(s.query);if(t.select&&!rp(t.select))throw new ax;return t}function WA(s,t,i){const r=[];for(const a of t){const o=i(a.value);a.type===`insert`?r.push([[o,a.value],1]):a.type===`update`?(r.push([[o,a.previousValue],-1]),r.push([[o,a.value],1])):r.push([[o,a.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*PA(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function tO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function eO(s,t,i,r){let a=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);a===void 0||r(a,u.value)<0?(a=u.value,o=!0):d&&(o=!0)}return{biggest:a,shouldResetLoadKey:o}}function nO(s,t){const{orderBy:i,limit:r,offset:a}=s,o=r!==void 0&&a!==void 0?r+a:r,u=i?sp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function sO(s,t,i,r,a){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=ia({minValues:g??null,offset:d,limit:a});if(i===m)return;const y=sp(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const xS=Symbol.for(`@tanstack/db.collection-config-builder`);class iO{constructor(t,i,r,a){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=a,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=np(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},a=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,a,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,a)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],a=tO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=WA(o,a,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const a=p=>{this.sendChangesToPipeline(p)},o=nO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(a,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,a){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),a(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=PA(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=sp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const a=r();return a>0&&this.loadNextItems(a,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const a=i;a[xS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,a[xS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const a=sO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);a&&(this.lastLoadRequestKey=a.loadRequestKey,i.requestLimitedSnapshot({orderBy:a.normalizedOrderBy,limit:t,minValues:a.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=eO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(a=>{i=a});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let rO=0;class lO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++rO}`,this.query=ZA({query:t.query}),this.collections=JA(this.query);const i=XA(this.query);this.collectionByAlias={};for(const[r,a]of i.entries()){const o=this.collections[r];if(o)for(const u of a)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Zv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Xv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Jd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Dx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,a=>{a.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,a=this.currentSyncState;if(this.isInErrorState)return;if(a.subscribedToAllCollections){let o=!1;for(;a.graph.pendingWork();)a.graph.run(),a.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),a.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ac()?.id,a=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;mc.schedule({contextId:r,jobId:a,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const a=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(a)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=mc.onClear(u=>{this.clearPendingGraphRun(u)});const a=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(a);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new j_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=wc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new Rx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:a}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(ud(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(dO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=fO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),a()),p=new Map,_d(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const a={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(ud(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=a.pendingChildChanges.get(w);E||(E=new Map,a.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(a.nestedSetups=Wv(r.childCompilationResult.includes,i),a.nestedRoutingIndex=new Map,a.nestedRoutingReverseIndex=new Map),a})}applyChanges(t,i,r){const{write:a,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)a({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))a({value:p,type:`update`});else if(u>0)a({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:a}=r;if(a===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(a===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,a=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&a&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const a=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=GA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new iO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(a.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Zv(s){return(t,i)=>{const r=s.get(t),a=s.get(i);return r&&a?ra?1:0:0}}function _S(s){return s.materialization!==`collection`}function TS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(a=>a?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(a=>String(a??``)).join(``)}function Wv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(ud(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const a={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(a.nestedSetups=Wv(i.childCompilationResult.includes,t)),a})}function aO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function oO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),a.push(o)}for(const o of a)r.buffer.delete(o)}return t}function cO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,a]of i)if(a.inserts>0){const o=a.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(a.deletes>0&&a.inserts===0){const o=a.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function uO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Pv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Pv(t.nestedSetups))return!0;return!1}function Hr(s,t){return t==null?s:JSON.stringify([s,t])}function AS(s,t,i,r,a){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Zv(u):void 0,m={collection:Wd({id:`__child-collection:${s}-${t}-${ia(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return a&&(m.includesStates=aO(a)),m}function _d(s,t,i,r,a){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[kr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Hr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=AS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=TS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=_S(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=AS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&hO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}cO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=oO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&_d(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&_d(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=_S(o)?new Set([...u||[],...p]):null;if(a&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=a.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=TS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[kr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Hr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(uO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[kr]}function fO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Pv(t.nestedSetups))return!0;return!1}function hO(s,t,i,r,a){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=a)}}function dO(s,[[t,i],r]){const[a,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:a,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=a,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function OS(s){return new lO(s).getConfig()}function Lh(s){if(typeof s==`function`){const i=OS({query:s});return RS(i)}else{const t=s,i=OS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),RS(i)}}function RS(s){const t=Wd(s),i=VA(s);return i&&$A(t,i),t}function tw(s){return s!=null&&`operation`in s.headers}function ew(s){return s!=null&&`control`in s.headers}var pO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!tw(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const a={...s.value??{}};a[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(a,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(ew(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const a=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===a);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:a})})}};function gO(s,t,i){return{sync:({begin:r,write:a,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{a({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const DS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function yO(s,t,i){return{insert:({key:r,value:a,headers:o})=>{const u=i[`~standard`].validate(a);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=a[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:a,headers:{...o,operation:`insert`}}},update:({key:r,value:a,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(a);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=a[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:a,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:a,headers:o})=>{if(a!==void 0){const d=i[`~standard`].validate(a);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(a?String(a[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:a,headers:{...o,operation:`delete`}}},upsert:({key:r,value:a,headers:o})=>{const u=i[`~standard`].validate(a);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=a[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:a,headers:{...o,operation:`upsert`}}}}}function nw(s){for(const r of Object.keys(s))if(DS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(DS).join(`, `)})`);const t=new Map;for(const[r,a]of Object.entries(s)){const o=t.get(a.type);if(o)throw new Error(`Duplicate event type "${a.type}" - used by both "${o}" and "${r}" collections`);t.set(a.type,r)}const i={};for(const[r,a]of Object.entries(s))i[r]={...a,...yO(a.type,a.primaryKey,a.schema)};return i}function sw(s){const{streamOptions:t,state:i,actions:r}=s,a=new Hn(t),o=new pO,u={};for(const[b,w]of Object.entries(i)){const E=Wd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:gO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await a.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)tw(N)?o.dispatchChange(N):ew(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:a,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:a}),w={};for(const[E,T]of Object.entries(b))w[E]=uA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const lp=600,mO=lp/2*1e3,SO=3600*24,vO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Ih=nw({rooms:{schema:vO,type:`stream`,primaryKey:`roomId`}}),wO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},MS=nw({scores:{schema:wO,type:`stream`,primaryKey:`playerName`}});function bO(s,t){return sw({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Ih,actions:({db:i,stream:r})=>({addRoom:{onMutate:a=>{i.collections.rooms.insert(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Ih.rooms.insert({value:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:a=>{i.collections.rooms.delete(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Ih.rooms.delete({key:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const iw=W.createContext(null);function rw(){const s=W.useContext(iw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function EO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Bd(),[r,a]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{a({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:SO}),o=await bO(g,i),await o.preload(),d()))return;a({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),a({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):Q.jsx(iw.Provider,{value:{registryDB:r.registryDB},children:s})}const Hh=1;function CO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),a=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(a.current===null||a.current.length!==t.length||a.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Pd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Lh({query:s,startSync:!0,gcTime:Hh});else if(E&&typeof E==`object`)r.current=Lh({startSync:!0,gcTime:Hh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);a.current=[...t]}else r.current=Lh({startSync:!0,gcTime:Hh,...s}),a.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Ft={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},qh=[{label:`30x25`,cols:30,rows:25}];function Kh(s,t){return`${s}__${t.cols}x${t.rows}`}function xO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function _O({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=rw(),[a,o]=W.useState(xO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=CO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=a.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=qh[u],K=Kh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+lp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return Q.jsxs(`div`,{style:Ae.container,children:[Q.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),Q.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),Q.jsx(`div`,{style:{fontSize:7,color:Ft.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),Q.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),Q.jsx(`input`,{style:Ae.input,value:a,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&Q.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:Q.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),Q.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:Kh(b.trim(),qh[u]))}}}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:Kh(b.trim(),qh[u]))}},children:`JOIN`})]})]})}),A.length>0&&Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>Q.jsx(TO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),Q.jsxs(`span`,{style:{fontSize:7,color:Ft.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function TO({room:s,onJoin:t}){const[i,r]=W.useState(!1),a=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:a,title:`Click to copy room name`,children:Q.jsx(`span`,{style:{fontSize:8,color:i?Ft.accent:Ft.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),Q.jsx(`button`,{className:`lobby-btn`,style:{background:Ft.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Ft.accent,marginBottom:6},card:{background:Ft.card,border:`1px solid ${Ft.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Ft.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 10px`,color:Ft.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Ft.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Ft.accent,border:`1px solid ${Ft.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,Td=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},AO=(s,t)=>{const i=[];for(const[r,a]of s)i.push(t(a,r));return i},OO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Vh=s=>s[s.length-1],RO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...a)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class MO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...a)=>{this.off(t,r),i(...a)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,oc=Math.abs,ow=(s,t)=>ss>t?s:t,cw=s=>s!==0?s<0:1/s<0,kS=1,US=2,$h=4,Gh=8,aa=32,ms=64,ln=128,Hc=31,Ad=63,_i=127,kO=2147483647,bc=Number.MAX_SAFE_INTEGER,zS=Number.MIN_SAFE_INTEGER,UO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),zO=String.fromCharCode,jO=s=>s.toLowerCase(),NO=/^\s*/g,BO=s=>s.replace(NO,``),LO=/([A-Z])/g,jS=(s,t)=>BO(s.replace(LO,i=>`${t}${jO(i)}`)),IO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let a=0;aoa.encode(s),qO=oa?HO:IO;let na=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});na&&na.decode(new Uint8Array).length===1&&(na=null);const KO=(s,t)=>DO(t,()=>s).join(``);class wa{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Fr=()=>new wa,VO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(VO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Od=Se,At=(s,t)=>{for(;t>_i;)Se(s,ln|_i&t),t=kn(t/128);Se(s,_i&t)},op=(s,t)=>{const i=cw(t);for(i&&(t=-t),Se(s,(t>Ad?ln:0)|(i?ms:0)|Ad&t),t=kn(t/64);t>0;)Se(s,(t>_i?ln:0)|_i&t),t=kn(t/128)},Rd=new Uint8Array(3e4),GO=Rd.length/3,YO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let a=0;a{const i=s.cbuf.length,r=s.cpos,a=ow(i-r,t.length),o=t.length-a;s.cbuf.set(t.subarray(0,a),r),s.cpos+=a,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Qr(i*2,o)),s.cbuf.set(t.subarray(a)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),qc(s,t)},cp=(s,t)=>{$O(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},FO=(s,t)=>cp(s,4).setFloat32(0,t,!1),JO=(s,t)=>cp(s,8).setFloat64(0,t,!1),XO=(s,t)=>cp(s,8).setBigInt64(0,t,!1),NS=new DataView(new ArrayBuffer(4)),ZO=s=>(NS.setFloat32(0,s),NS.getFloat32(0)===s),ca=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:UO(t)&&oc(t)<=kO?(Se(s,125),op(s,t)):ZO(t)?(Se(s,124),FO(s,t)):(Se(s,123),JO(s,t));break;case`bigint`:Se(s,122),XO(s,t);break;case`object`:if(t===null)Se(s,126);else if(Ic(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const LS=s=>{s.count>0&&(op(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class cc{constructor(){this.encoder=new wa,this.s=0,this.count=0}write(t){this.s===t?this.count++:(LS(this),this.count=1,this.s=t)}toUint8Array(){return LS(this),wn(this.encoder)}}const IS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);op(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class Yh{constructor(){this.encoder=new wa,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(IS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return IS(this),wn(this.encoder)}}class WO{constructor(){this.sarr=[],this.s=``,this.lensE=new cc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wa;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),qc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},uw=Vn(`Unexpected end of array`),fw=Vn(`Integer out of Range`);class Kc{constructor(t){this.arr=t,this.pos=0}}const qr=s=>new Kc(s),Dd=s=>s.pos!==s.arr.length,PO=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>PO(s,bt(s)),Kr=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posbc)throw fw}throw uw},up=s=>{let t=s.arr[s.pos++],i=t&Ad,r=64;const a=(t&ms)>0?-1:1;if((t&ln)===0)return a*i;const o=s.arr.length;for(;s.posbc)throw fw}throw uw},tR=s=>{let t=bt(s);if(t===0)return``;{let i=String.fromCodePoint(Kr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Kr(s));else for(;t>0;){const r=t<1e4?t:1e4,a=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,a),t-=r}return decodeURIComponent(escape(i))}},eR=s=>na.decode(je(s)),Ai=na?eR:tR,fp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},nR=s=>fp(s,4).getFloat32(0,!1),sR=s=>fp(s,8).getFloat64(0,!1),iR=s=>fp(s,8).getBigInt64(0,!1),rR=[s=>{},s=>null,up,nR,sR,iR,s=>!1,s=>!0,Ai,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;rrR[127-Kr(s)](s);class HS extends Kc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Dd(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class uc extends Kc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=up(this);const t=cw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class Qh extends Kc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=up(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class lR{constructor(t){this.decoder=new uc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const aR=crypto.getRandomValues.bind(crypto),hw=()=>aR(new Uint32Array(1))[0],oR=`10000000-1000-4000-8000`+-1e11,cR=()=>oR.replace(/[018]/g,s=>(s^hw()&15>>s/4).toString(16)),Ec=Date.now,qS=s=>new Promise(s);Promise.all.bind(Promise);const KS=s=>s===void 0?null:s;class uR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let dw=new uR,fR=!0;try{typeof localStorage<`u`&&localStorage&&(dw=localStorage,fR=!1)}catch{}const hR=dw,fa=Symbol(`Equality`),pw=(s,t)=>s===t||!!s?.[fa]?.(t)||!1,dR=s=>typeof s==`object`,pR=Object.assign,gR=Object.keys,yR=(s,t)=>{for(const i in s)t(s[i],i)},Cc=s=>gR(s).length,mR=s=>{for(const t in s)return!1;return!0},ba=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},hp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),SR=(s,t)=>s===t||Cc(s)===Cc(t)&&ba(s,(i,r)=>(i!==void 0||hp(t,r))&&pw(t[r],i)),vR=Object.freeze,gw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&gw(s[t])}return vR(s)},dp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fa]!=null)return s[fa](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var yw={};const ha=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const bR=()=>{if(In===void 0)if(ha){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${jS(t,`-`)}`,i),In.set(`-${jS(t,`-`)}`,i)}})):In=Fe();return In},Md=s=>bR().has(s),xc=s=>KS(ha?yw[s.toUpperCase().replaceAll(`-`,`_`)]:hR.getItem(s)),mw=s=>Md(`--`+s)||xc(s)!==null,ER=mw(`production`),CR=ha&&wR(yw.FORCE_COLOR,[`true`,`1`,`2`]),xR=CR||!Md(`--no-colors`)&&!mw(`no-color`)&&(!ha||process.stdout.isTTY)&&(!ha||Md(`--color`)||xc(`COLORTERM`)!==null||(xc(`TERM`)||``).includes(`color`)),_R=s=>new Uint8Array(s),TR=s=>{const t=_R(s.byteLength);return t.set(s),t};class AR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new AR(s,t),VS=s=>s.next()>=.5,Fh=(s,t,i)=>kn(s.next()*(i+1-t)+t),Sw=(s,t,i)=>kn(s.next()*(i+1-t)+t),pp=(s,t,i)=>Sw(s,t,i),OR=s=>zO(pp(s,97,122)),RR=(s,t=0,i=20)=>{const r=pp(s,t,i);let a=``;for(let o=0;ot[pp(s,0,t.length-1)],DR=Symbol(`0schema`);class MR{constructor(){this._rerrs=[]}extend(t,i,r,a=null){this._rerrs.push({path:t,expected:i,has:r,message:a})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(KO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const kd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[fa]?pw(s,t):Ic(s)?ap(s,i=>lw(t,r=>kd(i,r))):dR(s)?ba(s,(i,r)=>kd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),kd(i,r)}equals(t){return this.constructor===t.constructor&&Ur(this.shape,t.shape)}[DR](){return!0}[fa](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Jr(this,Qc)}get optional(){return new bw(this)}cast(t){return $S(t,this),t}expect(t){return $S(t,this),t}}class gp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new gp(s,t);ue(gp);class yp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new yp(s);ue(yp);class Vc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(a=>a===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const $c=(...s)=>new Vc(s),vw=ue(Vc),kR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),ww=s=>{if(Vr.check(s))return[kR(s)];if(vw.check(s))return s.shape.map(t=>t+``);if(Dw.check(s))return[`[+-]?\\d+.?\\d*`];if(Mw.check(s))return[`.*`];if(_c.check(s))return s.shape.map(ww).flat(1);bn()};class UR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(ww).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(UR);const zR=Symbol(`optional`);class bw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[zR](){return!0}}const jR=ue(bw);class NR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(NR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):ba(this.shape,(r,a)=>{const o=this._isPartial&&!hp(t,a)||r.check(t[a],i);return!o&&i?.extend(a.toString(),r.toString(),typeof t[a],`Object property does not match`),o})}}const BR=s=>new Gc(s),LR=ue(Gc),IR=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Ew extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&ba(t,(r,a)=>{const o=this.shape.keys.check(a,i);return!o&&i?.extend(a+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const Cw=(s,t)=>new Ew(s,t),HR=ue(Ew);class xw extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&ba(this.shape,(r,a)=>{const o=r.check(t[a],i);return!o&&i?.extend(a.toString(),`Tuple`,typeof r),o})}}const qR=(...s)=>new xw(s);ue(xw);class _w extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new mp(t)}check(t,i){const r=Ic(t)&&ap(t,a=>this.shape.check(a));return!r&&i?.extend(null,`Array`,``),r}}const Tw=(...s)=>new _w(s),KR=ue(_w),VR=be(s=>Ic(s));class Aw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const $R=(s,t=null)=>new Aw(s,t);ue(Aw);const GR=$R(Ie);class YR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=qR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const QR=ue(YR),FR=be(s=>typeof s==`function`);class JR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,a=>a.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(JR,s=>s.shape.length>0);class mp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=lw(this.shape,a=>a.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Jr=(...s)=>s.findIndex(t=>_c.check(t))>=0?Jr(...s.map(t=>da(t)).map(t=>_c.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new mp(s),_c=ue(mp),Ow=()=>!0,Tc=be(Ow),XR=ue(yp,s=>s.shape===Ow),Sp=be(s=>typeof s==`bigint`),ZR=be(s=>s===Sp),Rw=be(s=>typeof s==`symbol`);be(s=>s===Rw);const zr=be(s=>typeof s==`number`),Dw=be(s=>s===zr),Vr=be(s=>typeof s==`string`),Mw=be(s=>s===Vr),Yc=be(s=>typeof s==`boolean`),WR=be(s=>s===Yc),kw=$c(void 0);ue(Vc,s=>s.shape.length===1&&s.shape[0]===void 0);$c(void 0);const Qc=$c(null),PR=ue(Vc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(gp,s=>s.shape===Uint8Array);const tD=Jr(zr,Vr,Qc,kw,Sp,Yc,Rw);(()=>{const s=Tw(Tc),t=Cw(Vr,Tc),i=Jr(zr,Vr,Qc,Yc,s,t);return s.shape=i,t.shape.values=i,i})();const da=s=>{if(GR.check(s))return s;if(IR.check(s)){const t={};for(const i in s)t[i]=da(s[i]);return BR(t)}else{if(VR.check(s))return Jr(...s.map(da));if(tD.check(s))return $c(s);if(FR.check(s))return ue(s)}bn()},$S=ER?()=>{}:(s,t)=>{const i=new MR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class eD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:da(t),h:i}),this}else(t){return this.if(Tc,t)}done(){return(t,i)=>{for(let r=0;rnew eD(s),Uw=nD(Tc).if(Dw,(s,t)=>Fh(t,zS,bc)).if(Mw,(s,t)=>RR(t)).if(WR,(s,t)=>VS(t)).if(ZR,(s,t)=>BigInt(Fh(t,zS,bc))).if(_c,(s,t)=>Cr(t,Jh(t,s.shape))).if(LR,(s,t)=>{const i={};for(const r in s.shape){let a=s.shape[r];if(jR.check(a)){if(VS(t))continue;a=a.shape}i[r]=Uw(a,t)}return i}).if(KR,(s,t)=>{const i=[],r=Sw(t,0,42);for(let a=0;aJh(t,s.shape)).if(PR,(s,t)=>null).if(QR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(XR,(s,t)=>Cr(t,Jh(t,[zr,Vr,Qc,kw,Sp,Yc,Tw(zr),Cw(Jr(`a`,`b`,`c`),zr)]))).if(HR,(s,t)=>{const i={},r=Fh(t,0,3);for(let a=0;aUw(da(t),s),Fc=typeof document<`u`?document:{};be(s=>s.nodeType===aD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===iD);be(s=>s.nodeType===rD);const sD=s=>AO(s,(t,i)=>`${i}:${t};`).join(``),iD=Fc.ELEMENT_NODE,rD=Fc.TEXT_NODE,lD=Fc.DOCUMENT_NODE,aD=Fc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===lD);const ws=Symbol,zw=ws(),jw=ws(),oD=ws(),cD=ws(),uD=ws(),Nw=ws(),fD=ws(),vp=ws(),hD=ws(),dD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let a=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(a=i,a.unshift(t.join(``)));o{console.log(...Bw(s)),Lw.forEach(t=>t.print(s))},mD=(...s)=>{console.warn(...Bw(s)),s.unshift(vp),Lw.forEach(t=>t.print(s))},Lw=Oi(),Iw=s=>({[Symbol.iterator](){return this},next:s}),SD=(s,t)=>Iw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Xh=(s,t)=>Iw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class wp{constructor(t,i){this.clock=t,this.len=i}}class Jc{constructor(){this.clients=new Map}}const Hw=(s,t,i)=>t.clients.forEach((r,a)=>{const o=s.doc.store.clients.get(a);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const a=kn((i+r)/2),o=s[a],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&vD(i,t.clock)!==null},bp=s=>{s.clients.forEach(t=>{t.sort((a,o)=>a.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new wp(a.clock,Qr(a.len,o.clock+o.len-a.clock)):(r{const t=new Jc;for(let i=0;i{if(!t.clients.has(a)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new wp(i,r))},Ep=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const a=r.length;At(s.restEncoder,a);for(let o=0;o{const t=new Jc,i=bt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,a,()=>[]);for(let d=0;d{const r=new Jc,a=bt(s.restDecoder);for(let o=0;o0){const o=new Xc;return At(o.restEncoder,0),Ep(o,r),o.toUint8Array()}return null},Kw=hw;class Xr extends aw{constructor({guid:t=cR(),collectionid:i=null,gc:r=!0,gcFilter:a=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=a,this.clientID=Kw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Yw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=qS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>qS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),a=r.constructor;if(i!==Oe&&a!==i)if(a===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Nr)}getText(t=``){return this.get(t,Gr)}getMap(t=``){return this.get(t,$r)}getXmlElement(t=``){return this.get(t,Yr)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Xr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const a=i.doc;t.deleted||r.subdocsAdded.add(a),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class ED{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class CD extends ED{readLeftID(){return Rt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Rt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Kr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ua(this.restDecoder)}readBuf(){return TR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class xD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Oc extends xD{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new Qh(je(t)),this.clientDecoder=new uc(je(t)),this.leftClockDecoder=new Qh(je(t)),this.rightClockDecoder=new Qh(je(t)),this.infoDecoder=new HS(je(t),Kr),this.stringDecoder=new lR(je(t)),this.parentInfoDecoder=new HS(je(t),Kr),this.typeRefDecoder=new uc(je(t)),this.lenDecoder=new uc(je(t))}readLeftID(){return new jr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new jr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ua(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ua(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Qr(r,t[0].id.clock);const a=$n(t,r);At(s.restEncoder,t.length-a),s.writeClient(i),At(s.restEncoder,r);const o=t[a];o.write(s,r-o.id.clock);for(let u=a+1;u{const r=new Map;i.forEach((a,o)=>{ve(t,o)>a&&r.set(o,a)}),Cp(t).forEach((a,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((a,o)=>o[0]-a[0]).forEach(([a,o])=>{OD(s,t.clients.get(a),a,o)})},RD=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let a=0;a{const r=[];let a=ni(i.keys()).sort((b,w)=>b-w);if(a.length===0)return null;const o=()=>{if(a.length===0)return null;let b=i.get(a[a.length-1]);for(;b.refs.length===b.i;)if(a.pop(),a.length>0)b=i.get(a[a.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Yw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),a=a.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Xc;return Vw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},MD=(s,t)=>Vw(s,t.doc.store,t.beforeState),kD=(s,t,i,r=new Oc(s))=>$t(t,a=>{a.local=!1;let o=!1;const u=a.doc,d=u.store,p=RD(r,u),g=DD(a,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=PS([m.update,g.update])}}else d.pendingStructs=g;const y=GS(r,a,d);if(d.pendingDs){const v=new Oc(qr(d.pendingDs));bt(v.restDecoder);const b=GS(v,a,d);y&&b?d.pendingDs=PS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,$w(a.doc,v)}},i,!1),$w=(s,t,i,r=Oc)=>{const a=qr(t);kD(a,s,i,new r(a))},YS=(s,t,i)=>$w(s,t,i,CD);class UD{constructor(){this.l=[]}}const QS=()=>new UD,FS=(s,t)=>s.l.push(t),JS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(a=>t!==a),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>dp(s.l,[t,i]);class jr{constructor(t,i){this.client=t,this.clock=i}}const Xo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new jr(s,t),zD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Ar=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!qw(t.ds,s.id),Ud=(s,t)=>{const i=vs(s.meta,Ud,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((a,o)=>{a{}),i.add(t))};class Yw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Cp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const a=i[i.length-1];t.set(r,a.id.clock+a.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Qw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},$n=(s,t)=>{let i=0,r=s.length-1,a=s[r],o=a.id.clock;if(o===t)return r;let u=kn(t/(o+a.length-1)*r);for(;i<=r;){if(a=s[u],o=a.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[$n(i,t.clock)]},Zh=jD,zd=(s,t,i)=>{const r=$n(t,i),a=t[r];return a.id.clock{const i=s.doc.store.clients.get(t.client);return i[zd(s,i,t.clock)]},XS=(s,t,i)=>{const r=t.clients.get(i.client),a=$n(r,i.clock),o=r[a];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(a+1,0,zc(s,o,i.clock-o.id.clock+1)),o},ND=(s,t,i)=>{const r=s.clients.get(t.id.client);r[$n(r,t.id.clock)]=i},Fw=(s,t,i,r,a)=>{if(r===0)return;const o=i+r;let u=zd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!OO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(bp(t.deleteSet),MD(s,t),Ep(s,t.deleteSet),!0),WS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},fc=(s,t)=>{let i=s[t],r=s[t-1],a=t;for(;a>0;i=r,r=s[--a-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-a;return o&&s.splice(t+1-o,o),o},LD=(s,t,i)=>{for(const[r,a]of s.clients.entries()){const o=t.clients.get(r);for(let u=a.length-1;u>=0;u--){const d=a[u],p=d.clock+d.len;for(let g=$n(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const a=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=ow(a.length-1,1+$n(a,u.clock+u.len-1));for(let p=d,g=a[p];p>0&&g.id.clock>=u.clock;g=a[p])p-=1+fc(a,p)}})},Jw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),d.push(()=>{Gw(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&iM(i)})}),dp(d,[])}finally{r.gc&&LD(o,a,r.gcFilter),ID(o,a),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=a.clients.get(y),w=Qr($n(b,v),1);for(let E=b.length-1;E>=w;)E-=1+fc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=a.clients.get(y),w=$n(b,v);w+11||w>0&&fc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(yD(vp,zw,`[yjs] `,jw,Nw,`Changed the client-id because another client seems to be using it.`),r.clientID=Kw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new TD;ZS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Xc;ZS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Jw(s,t+1)}}},$t=(s,t,i=null,r=!0)=>{const a=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new BD(s,i,r),a.push(s._transaction),a.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===a[0];s._transaction=null,d&&Jw(a,0)}}return u};function*HD(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:a}=i.id;return new de(Rt(r,a+t),null,Rt(r,a+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},PS=(s,t=Oc,i=Xc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(qr(m)));let a=r.map(m=>new qD(m,!0)),o=null;const u=new i,d=new KD(u);for(;a=a.filter(v=>v.curr!==null),a.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),a.length!==0;){const m=a[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Yl(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=VD(v,w)),o.struct.mergeWith(v)||(Yl(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())Yl(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Yl(d,o.struct,o.offset),o=null),$D(d);const p=r.map(m=>bD(m)),g=wD(p);return Ep(u,g),u.toUint8Array()},Xw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Fr(),s.written=0)},Yl=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Xw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},$D=s=>{Xw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(a!==null){const o=i._map.get(a);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Vh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Vh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Vh(o.content.getContent());else return;t.set(a,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(tv);const i=this.target,r=Oi(),a=Oi(),o=[];if(t={added:r,deleted:a,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,a.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const GD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,a=t._item.parent._start;for(;a!==t._item&&a!==null;)!a.deleted&&a.countable&&(r+=a.length),a=a.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{mD(`Invalid access: Add Yjs type to a document before reading data.`)},Zw=80;let xp=0;class YD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=xp++}}const QD=s=>{s.timestamp=xp++},Ww=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=xp++},FD=(s,t,i)=>{if(s.length>=Zw){const r=s.reduce((a,o)=>a.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>oc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(a-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(a-=r.length);return i!==null&&oc(i.index-a){for(let r=s.length-1;r>=0;r--){const a=s[r];if(i>0){let o=a.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(a.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}a.p=o,o.marker=!0}(t0&&t===a.index)&&(a.index=Qr(t,a.index+i))}},Pc=(s,t,i)=>{const r=s,a=t.changedParentTypes;for(;vs(a,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=QS(),this._dEH=QS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){FS(this._eH,t)}observeDeep(t){FS(this._dEH,t)}unobserve(t){JS(this._eH,t)}unobserveDeep(t){JS(this._dEH,t)}toJSON(){}}const Pw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const a=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)a.push(u[d]),r--;t=0}}o=o.right}return a},tb=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let a=0;a{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const a=r.content.getContent();for(let o=0;o{const i=[];return ga(s,(r,a)=>{i.push(t(r,a,s))}),i},JD=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const a=i[r++];return i.length<=r&&(i=null),{done:!1,value:a}}}},nb=(s,t)=>{s.doc??ke();const i=Wc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let a=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Di(g)),a.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Ea(new Uint8Array(y))),a.integrate(s,0);break;case Xr:a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Ca(y)),a.integrate(s,0);break;default:if(y instanceof Oe)a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new bs(y)),a.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},sb=()=>Vn(`Length exceeded!`),ib=(s,t,i,r)=>{if(i>t._length)throw sb();if(i===0)return t._searchMarker&&pa(t._searchMarker,i,r.length),Rc(s,t,null,r);const a=i,o=Wc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let a=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(a)for(;a.right;)a=a.right;return Rc(s,t,a,i)},rb=(s,t,i,r)=>{if(r===0)return;const a=i,o=r,u=Wc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw sb();t._searchMarker&&pa(t._searchMarker,a,-o+r)},Dc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},_p=(s,t,i,r)=>{const a=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new Ea(r);break;case Xr:d=new Ca(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),a,a&&a.lastId,null,null,t,i,d).integrate(s,0)},Tp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},lb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},ZD=(s,t)=>{const i={};return s._map.forEach((r,a)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Ar(o,t)&&(i[a]=o.content.getContent()[o.length-1])}),i},Zo=s=>(s.doc??ke(),SD(s._map.entries(),t=>!t[1].deleted));class WD extends Zc{}class Nr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Nr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Nr}clone(){const t=new Nr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Pc(this,t,new WD(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{XD(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{rb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return nb(this,t)}toArray(){return tb(this)}slice(t=0,i=this.length){return Pw(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return eb(this,t)}forEach(t){ga(this,t)}[Symbol.iterator](){return JD(this)}_write(t){t.writeTypeRef(CM)}}const PD=s=>new Nr;class tM extends Zc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class $r extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,a)=>{this.set(a,r)}),this._prelimContent=null}_copy(){return new $r}clone(){const t=new $r;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Pc(this,t,new tM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const a=i.content.getContent()[i.length-1];t[r]=a instanceof Oe?a.toJSON():a}}),t}get size(){return[...Zo(this)].length}keys(){return Xh(Zo(this),t=>t[0])}values(){return Xh(Zo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Xh(Zo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Tp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,a){Dc(t,a,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(xM)}}const eM=s=>new $r,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&SR(s,t);class jd{constructor(t,i,r,a){this.left=t,this.right=i,this.index=r,this.currentAttributes=a}forward(){this.right===null&&bn(),this.right.content.constructor===pe?this.right.deleted||Zr(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}}const ev=(s,t,i)=>{for(;t.right!==null&&i>0;)t.right.content.constructor===pe?t.right.deleted||Zr(t.currentAttributes,t.right.content):t.right.deleted||(i{const a=new Map,o=r?Wc(t,i):null;if(o){const u=new jd(o.p.left,o.p,o.index,a);return ev(s,u,i-o.index)}else{const u=new jd(null,t._start,0,a);return ev(s,u,i)}},ob=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const a=s.doc,o=a.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(a.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Zr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},cb=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},ub=(s,t,i,r)=>{const a=s.doc,o=a.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(a.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Wh=(s,t,i,r,a)=>{i.currentAttributes.forEach((v,b)=>{a[b]===void 0&&(a[b]=null)});const o=s.doc,u=o.clientID;cb(i,a);const d=ub(s,t,i,a),p=r.constructor===String?new Gn(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&pa(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),ob(s,t,i,d)},nv=(s,t,i,r,a)=>{const o=s.doc,u=o.clientID;cb(i,a);const d=ub(s,t,i,a);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=a[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Gn(p)),i.right.integrate(s,0),i.forward()}ob(s,t,i,d)},fb=(s,t,i,r,a)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;if(g.constructor===pe){const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(a.get(m)??null)===y&&v!==y&&(v===null?a.delete(m):a.set(m,v))),!p&&!t.deleted&&Zr(a,g)}}t=t.right}return d},nM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},sM=s=>{let t=0;return $t(s.doc,i=>{let r=s._start,a=s._start,o=Fe();const u=Td(o);for(;a;)a.deleted===!1&&(a.content.constructor===pe?Zr(u,a.content):(t+=fb(i,r,a,o,u),o=Td(u),r=a)),a=a.right}),t},iM=s=>{const t=new Set,i=s.doc;for(const[r,a]of s.afterState.entries()){const o=s.beforeState.get(r)||0;a!==o&&Fw(s,i.store.clients.get(r),o,a,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}$t(i,r=>{Hw(s,s.deleteSet,a=>{if(a instanceof vn||!a.parent._hasFormatting||t.has(a.parent))return;const o=a.parent;a.content.constructor===pe?t.add(o):nM(r,a)});for(const a of t)sM(a)})},sv=(s,t,i)=>{const r=i,a=Td(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case Gn:i{a===null?this.childListChanged=!0:this.keysChanged.add(a)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const a=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},a.size>0&&(b.attributes={},a.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},mR(p)||(b.attributes=pR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case Gn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=a.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=a.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Zr(a,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Gr extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Gr}clone(){const t=new Gr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new rM(this,t,i);Pc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Gn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const a=new jd(null,this._start,0,new Map);for(let o=0;o0)&&Wh(r,this,a,d,u.attributes||{})}else u.retain!==void 0?nv(r,this,a,u.retain,u.attributes||{}):u.delete!==void 0&&sv(r,a,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const a=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),a.push(b),d=``}}const m=()=>{for(;p!==null;){if(Ar(p,t)||i!==void 0&&Ar(p,i))switch(p.content.constructor){case Gn:{const y=o.get(`ychange`);t!==void 0&&!Ar(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Ar(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}a.push(y);break}case pe:Ar(p,t)&&(g(),Zr(o,p.content));break}p=p.right}g()};return t||i?$t(u,y=>{t&&Ud(y,t),i&&Ud(y,i),m()},`cleanup`):m(),a}insert(t,i,r){if(i.length<=0)return;const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Wh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!r);Wh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,a=>{sv(a,Wo(a,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!1);u.right!==null&&nv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Tp(this,t)}getAttributes(){return lb(this)}_write(t){t.writeTypeRef(_M)}}const lM=s=>new Gr;class Ph{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Yr||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Ph(this,t)}querySelector(t){t=t.toUpperCase();const r=new Ph(this,a=>a.nodeName&&a.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Ph(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Pc(this,t,new cM(this,i,t))}toString(){return eb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const a=t.createDocumentFragment();return r!==void 0&&r._createAssociation(a,this),ga(this,o=>{a.insertBefore(o.toDOM(t,i,r),null)}),a}insert(t,i){this.doc!==null?$t(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const a=t&&t instanceof Oe?t._item:t;Rc(r,this,a,i)});else{const r=this._prelimContent,a=t===null?0:r.findIndex(o=>o===t)+1;if(a===0&&t!==null)throw Vn(`Reference item not found`);r.splice(a,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{rb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return tb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return nb(this,t)}slice(t=0,i=this.length){return Pw(this,t,i)}forEach(t){ga(this,t)}_write(t){t.writeTypeRef(AM)}}const aM=s=>new Ri;class Yr extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,a)=>{this.setAttribute(a,r)}),this._prelimAttrs=null}_copy(){return new Yr(this.nodeName)}clone(){const t=new Yr(this.nodeName),i=this.getAttributes();return yR(i,(r,a)=>{t.setAttribute(a,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const a=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Tp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?ZD(this,t):lb(this)}toDOM(t=document,i={},r){const a=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&a.setAttribute(u,d)}return ga(this,u=>{a.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(a,this),a}_write(t){t.writeTypeRef(TM),t.writeKey(this.nodeName)}}const oM=s=>new Yr(s.readKey());class cM extends Zc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(a=>{a===null?this.childListChanged=!0:this.attributesChanged.add(a)})}}class Mc extends $r{constructor(t){super(),this.hookName=t}_copy(){return new Mc(this.hookName)}clone(){const t=new Mc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const a=i[this.hookName];let o;return a!==void 0?o=a.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(OM),t.writeKey(this.hookName)}}const uM=s=>new Mc(s.readKey());class kc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new kc}clone(){const t=new kc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const a=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(a,this),a}toString(){return this.toDelta().map(t=>{const i=[];for(const a in t.attributes){const o=[];for(const u in t.attributes[a])o.push({key:u,value:t.attributes[a][u]});o.sort((u,d)=>u.keya.nodeName`}r+=t.insert;for(let a=i.length-1;a>=0;a--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(RM)}}const fM=s=>new kc;class Ap{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const hM=0;class vn extends Ap{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Qw(t.doc.store,this)}write(t,i){t.writeInfo(hM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Ea{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Ea(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const dM=s=>new Ea(s.readBuf());class ya{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new ya(this.len)}splice(t){const i=new ya(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Ac(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const pM=s=>new ya(s.readLen()),hb=(s,t)=>new Xr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Ca{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Ca(hb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const gM=s=>new Ca(hb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const yM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const mM=s=>new pe(s.readKey(),s.readJSON());class Uc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Uc(this.arr)}splice(t){const i=new Uc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let a=i;a{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const bM=s=>new Gn(s.readString()),EM=[PD,eM,lM,oM,aM,uM,fM],CM=0,xM=1,_M=2,TM=3,AM=4,OM=5,RM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const DM=s=>new bs(EM[s.readTypeRef()](s)),zc=(s,t,i)=>{const{client:r,clock:a}=t.id,o=new de(Rt(r,a+i),t,Rt(r,a+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends Ap{constructor(t,i,r,a,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=a,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?US:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&kS)>0}set keep(t){this.keep!==t&&(this.info^=kS)}get countable(){return(this.info&US)>0}get deleted(){return(this.info&$h)>0}set deleted(t){this.deleted!==t&&(this.info^=$h)}markDeleted(){this.info|=$h}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===jr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=XS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===jr){const r=Zh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=XS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,a;if(r!==null)a=r.right;else if(this.parentSub!==null)for(a=this.parent._map.get(this.parentSub)||null;a!==null&&a.left!==null;)a=a.left;else a=this.parent._start;const o=new Set,u=new Set;for(;a!==null&&a!==this.right;){if(u.add(a),o.add(a),Xo(this.origin,a.origin)){if(a.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Ac(t.deleteSet,this.id.client,this.id.clock,this.length),WS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?ND(t,this,new vn(this.id,this.length)):this.content=new ya(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,a=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Hc|(r===null?0:ln)|(a===null?0:ms)|(o===null?0:aa);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),a!==null&&t.writeRightID(a),r===null&&a===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=zD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===jr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const db=(s,t)=>MM[t&Hc](s),MM=[()=>{bn()},pM,SM,dM,bM,yM,mM,DM,wM,gM,()=>{bn()}],kM=10;class Rn extends Ap{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(kM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const pb=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},gb=`__ $YJS$ __`;pb[gb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);pb[gb]=!0;const td=3e4;class UM extends MO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=Ec();this.getLocalState()!==null&&td/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((a,o)=>{o!==this.clientID&&td<=i-a.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&zM(this,r,`timeout`)},kn(td/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),a=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:a,lastUpdated:Ec()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Ur(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const zM=(s,t,i)=>{const r=[];for(let a=0;a0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},iv=(s,t,i=s.states)=>{const r=t.length,a=Fr();At(a,r);for(let o=0;o{const r=qr(t),a=Ec(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},NM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},BM=15e3;var LM=class hc extends aw{doc;awareness;baseUrl;docId;headers;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return NM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const a=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${a}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const a=r.headers.get(`location`);if(a){const u=new URL(a,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const a=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!a.ok){if(a.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${a.status}`)}const o=new Uint8Array(await a.arrayBuffer());o.length>0&&YS(this.doc,o,`server`);const u=a.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(a){if(this.isNotFoundError(a)){await this.discoverSnapshot(t);return}throw a}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Sv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:a=>{a instanceof Error&&a.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,a),this.emit(`error`,[a]),this.isAuthError(a)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let a=!1,o,u;const d=new Promise((p,g)=>{o=()=>{a||(a=!0,p())},u=m=>{a||(a=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,a,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,a())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:`sse`,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Fr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=qr(t);for(;Dd(i);){const r=je(i);YS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qr(t);for(;Dd(i);){const r=je(i);try{jM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(hc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},BM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:a,removed:o}=t;r.concat(a).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=iv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(hc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:a}=t,o=i.concat(r).concat(a),u=iv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(hc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const a=await r.stream({offset:`now`,live:`sse`,signal:i});a.closed.catch(()=>{}),a.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await a.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(a){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(a)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,a),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const yb=W.createContext(null);function IM(){const s=W.useContext(yb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function HM(s,t){return sw({streamOptions:{url:s,headers:t,contentType:`application/json`},state:MS,actions:({db:i,stream:r})=>({submitScore:{onMutate:a=>{i.collections.scores.insert(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(MS.scores.insert({value:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const rv=W.createContext(null);function qM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Bd(),[a,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await HM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),a?Q.jsx(rv.Provider,{value:{scoresDB:a},children:t}):Q.jsx(rv.Provider,{value:null,children:t})}const Qt=14,KM=30,VM=25,lv=120,$M=1500,Po=.5,GM=1,xr=8,av=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function YM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:KM,rows:VM}}const _r={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function Wl(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function ed(s,t){const i=Ci(s),r=new Map;return i.forEach((a,o)=>{o!==t&&r.set(o,a)}),r}function QM(s){const t=Wl(s),i=new Map;return t.forEach((r,a)=>{i.set(a,r)}),i}function FM(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function JM(s,t,i,r,a){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):a.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mYM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),nt=W.useRef(null),J=W.useRef({x:0,y:0,stunnedUntil:0}),lt=W.useMemo(()=>FM(m,a)*GM,[m,a]),at=W.useMemo(()=>Math.round(lt/g*100),[lt,g]),Nt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P=``;if(Nt.forEach((Mt,kt)=>{Mt>et&&(et=Mt,P=kt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===a)return{name:o,pct:pt};const gt=v.get(P);return gt?{name:gt.name,pct:pt}:null},[Nt,g,a,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);J.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Ci(t);pt.set(a,{x:et,y:P,name:o,color:u});const gt=Wl(t);return t.transact(()=>{gt.set(`${et},${P}`,{owner:a,claimedAt:Date.now()})}),()=>{pt.delete(a)}},[t,a,o,u,d,p]),W.useEffect(()=>{const et=Wl(t),P=()=>{const pt=QM(t);y(pt);const gt=new Map;pt.forEach(kt=>{gt.set(kt.owner,(gt.get(kt.owner)||0)+1)});const Mt=Po*g;gt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===a&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,a,o]),W.useEffect(()=>{const et=Ci(t),P=()=>{b(ed(t,a))};return et.observe(P),P(),()=>et.unobserve(P)},[t,a]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&pt.add(te)}}),N(Mt=>{const kt=pt.size;return Mt===kt?Mt:kt});const gt=Ci(t);gt.forEach((Mt,kt)=>{kt!==a&&!P.has(kt)&>.delete(kt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,a,o]),W.useEffect(()=>{const et=new Set,P=gt=>{if(gt.key in _r){gt.preventDefault();const Mt=!nt.current;et.add(gt.key),nt.current=_r[gt.key],Mt&&F.current?.(_r[gt.key])}},pt=gt=>{if(et.delete(gt.key),gt.key in _r){let Mt=!1;for(const kt of et)if(kt in _r){nt.current=_r[kt],Mt=!0;break}Mt||(nt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,pt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),rt=10,ft=W.useCallback((et,P)=>{const pt=Date.now();if(pt-Z.currentMath.abs(Cs)?F.current?.({dx:Qn>0?1:-1,dy:0}):F.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=pt)},[]),_=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY},ft(P.clientX,P.clientY)},[ft]),H=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,gt=P.clientY-q.current.y;Math.abs(pt){q.current=null},[]),F=W.useRef(void 0),ct=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const gt=P.getScreenCTM();if(!gt)return;const Mt=pt.matrixTransform(gt.inverse()),kt=Mt.x/Qt-.5,te=Mt.y/Qt-.5,Cn=J.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?F.current?.({dx:Ue>0?1:-1,dy:0}):F.current?.({dx:0,dy:xn>0?1:-1}))},[]),st=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const gt=J.current,Mt=Date.now();if(gt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+$M;gt.stunnedUntil=xs;const _a=Ci(t);_a.set(_n,{...Li,stunnedUntil:xs}),_a.set(a,{x:gt.x,y:gt.y,name:o,color:u,stunnedUntil:xs});return}gt.x=kt,gt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(a,{x:kt,y:te,name:o,color:u});const Qn=Wl(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:a,claimedAt:Cs})});const Re=new Set([a]);ed(t,a).forEach((_n,Li)=>Re.add(Li));const xa=JM(a,Qn,d,p,Re);xa.length>0&&t.transact(()=>{for(const _n of xa)Qn.set(`${_n.x},${_n.y}`,{owner:a,claimedAt:Cs})})};F.current=et;const P=setInterval(()=>{const pt=nt.current;pt&&et(pt)},lv);return()=>clearInterval(P)},[t,a,o,u,d,p]);const yt=d*Qt,Dt=p*Qt,wt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const an=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx(`line`,{x1:P*Qt,y1:0,x2:P*Qt,y2:Dt,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx(`line`,{x1:0,y1:P*Qt,x2:yt,y2:P*Qt,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,yt,Dt]),Es=W.useMemo(()=>{const et=new Map;return et.set(a,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[a,u,v]);return Q.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Q.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + `}),Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:yt,marginBottom:8,fontSize:xr},children:[Q.jsx(`button`,{onClick:st,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:xr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Q.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:wt,title:`Click to copy room name`,children:[Q.jsx(`span`,{style:{color:Vt.accent},children:o}),Q.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Q.jsx(`span`,{style:{color:D?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),Q.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(et=>!et),children:[T,` PLAYERS`,z&&Q.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:a,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Nt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Q.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Q.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:et.color,display:`inline-block`}}),et.name]}),Q.jsxs(`span`,{style:{color:Vt.accent},children:[pt,`%`]})]},et.id)})})]})]}),Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:yt,marginBottom:8,fontSize:xr},children:[Q.jsxs(`div`,{children:[Q.jsxs(`span`,{style:{fontSize:av,color:Vt.accent},children:[at,`%`]}),` `,Q.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Q.jsxs(`div`,{style:{textAlign:`right`},children:[Q.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Po*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Po*100),`%`]}),ht&&Q.jsxs(`div`,{children:[Q.jsx(`span`,{style:{color:Vt.dim},children:ht.name}),` `,Q.jsxs(`span`,{style:{fontSize:av,color:Vt.accent},children:[ht.pct,`%`]})]})]})]}),Q.jsxs(`svg`,{ref:M,viewBox:`0 0 ${yt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ct,style:{width:`100%`,maxWidth:yt,height:`auto`,background:Vt.grid,border:`1px solid ${Vt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[an,Array.from(m.entries()).map(([et,P])=>{const[pt,gt]=et.split(`,`).map(Number),Mt=Es.get(P.owner)||Vt.accent;return Q.jsx(`rect`,{x:pt*Qt,y:gt*Qt,width:Qt,height:Qt,fill:Mt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=J.current.stunnedUntil>0&&Date.now(){const et=Wl(t);t.transact(()=>{Array.from(et.keys()).forEach(pt=>et.delete(pt))}),K(null)},style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Q.jsx(`button`,{onClick:st,style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}const ov=[`#00E5FF`,`#FF3D71`,`#6eeb83`,`#ffbc42`,`#ee6352`,`#9ac2c9`,`#8acb88`,`#1be7ff`,`#C77DFF`,`#72EFDD`,`#F72585`,`#4ECDC4`];function ZM(s){return ov[s%ov.length]}function WM(s){let t=0;for(let i=0;i{const D=`player-${Math.random().toString(36).slice(2,10)}`,A=WM(r);return{playerId:D,playerColor:ZM(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Xr,A=new UM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new LM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+lp*1e3})}catch{}},mO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs(`div`,{style:nd.center,children:[Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Q.jsx(`button`,{onClick:a,style:nd.btn,children:`BACK`})]}):m?Q.jsxs(`div`,{style:nd.center,children:[Q.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Q.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Q.jsx(yb.Provider,{value:N,children:Q.jsx(qM,{roomId:s,children:Q.jsx(XM,{onLeave:a})})})}const nd={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},cv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],uv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function t2(){const s=cv[Math.floor(Math.random()*cv.length)],t=uv[Math.floor(Math.random()*uv.length)];return`${s} ${t}`}function e2(){return localStorage.getItem(`territory-player-name`)||t2()}function n2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function s2(){const s=n2(),{yjsEndpoint:t,yjsHeaders:i}=Bd(),[r,a]=W.useState(e2),o=u=>{a(u),localStorage.setItem(`territory-player-name`,u)};return s?Q.jsx(PM,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Q.jsx(_O,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function i2(){return Q.jsx(Q1,{children:Q.jsx(EO,{children:Q.jsx(s2,{})})})}G1.createRoot(document.getElementById(`root`)).render(Q.jsx(i2,{})); diff --git a/website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.jpg b/website/public/img/blog/yjs-durable-streams-on-electric-cloud/header.jpg new file mode 100644 index 0000000000000000000000000000000000000000..559d93611f08f794a28e1fae0d046f22c2057bb5 GIT binary patch literal 292161 zcmeFYdstH0_dk9B0W~jKSXkh-G0`$nRJDx#tSnPX;NniMLNG&36uG}FjX6GtOO zOs1AM^fPzQ2Ed&+~nLf6oFAoAd0mIcuGB_FC(; zUi;_J&k55X!MXJ901z1oI068m55Pc60En&y(!BuC3IO__HUPweR{n205#;dSeZT+! zUiyFf7t;Z~|L(6F^FKoT@8AFR4KD`(xNeW0i>oWP0`y;P5Eudo|7Sne#YG7EKO+jk z|1%==i4gKXZO9!F?7#c`=TH9K{A+=KE%2`e{Oo;}eFMWqivchQ0s-qmpin&>@BqsH2TIU0gD$bb2EdlaB*Sf)2v>GRgT7thg-&zI zqqnQvQuY)W7%p3mv{>`Yolo&>$(l*9!iu*M_b=z;-)6(gT ztn9rx`*Qc^6&@}+Qe1MBbE1-0^+$EhN&e|Zkys*?$(#PX*xGjKa{HC5w{G82c6Hyq zcVE>%@Obda(9_`w_2l!Z>6sUrm-Fx5Yd=F{S(Dw2!#HrA?)j zxi>MNPo*!}UIRkPHgl_-EFJB_*j61j?)GEaztT9dU`ta(lPhEEIz)RnDThFWq8?r2 ztmmDD_{p3`Y1dOqjiSrV^`{GNR*_=MxehJhQWMOigbt`nsV$~(+;N2niP*+Z*C&V| z7vx^OB)Xl2JSq4xOccKx#%2>!P?O?Kz0L7oM^*bb)Czctq7d(a+hrX}kiJxJ^*60F zX(ivIQdPMlO;F|1Eyfz7vZZN@l&jbC@`IhMQQq5Y^Qd{*V(>AL6K&J6&#mscO7mGZ)!o z1PI>{qqC*duvhdrAe1~rhx8xqak0+gLfyB$p_o65e8<9z^a>G;974P00O-?3>tCYv zrzMM6j)>0;rV^_kydhNVo5T;ABbqH&HOje6Wk4%u4VKVrZmpFa$?axTRw#jWTW?je zRn=&j!SFF)dN+;H=B1zHM9^YSBw}t<&1w}U^#eQiN#0_< zrQ(t(TUdlpQjlO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x&Lx$f0$r*q)n+O-)Ws$;iq`FGQ2~MhkloJ5xX` zhq&y0lDvW+u%2h9i;?2o{Ab!KfB^UTG6sigH6xI1U`NJJEJEm$`W@_J#!6cz?FzkFHY~y1M;gUDxMLf%jExy zEdlJZ1{9a>i+jZ2;3RWRAOZ1LgZA{n?&n&~= zZh;Umg*Xz^FtN1@V0Ns?(JFVM0eXdM`}F4#3E86D**FL{f4h%Vtg2D8$yiCsRp7Tw zv27fvJMQ#(fF`5~dld^0YqccZoKFH}eV@Q3P~0NaqL00}T(*QB76ClH2Q1o!41W=Ix| zFhlO6av^WSTK@ZN0-0(HbtJFv*sV zek%o~x)My>V#V_(x1A9-`05H7h5ZdfC87KCU0c}T`hi{9xEriv>5O$xLs7uG2U9vPKo?0E=~RS zyLacKjk(uWBaKd9^?Bz(EI*HovlejT5zU{v*r9!QAk6ttMDc(ee#|i3#oucIR3?Cc zO}KpT;gJd1;;d1Mi!YEN!s`l2;^ngPMx3m(XenwjDLKXYvl}^O{-8JaS5B}WJf&~( zmj2U!z62Ss=qQHv9QT0%n-LF&0N*a>NYhRM^f|X*6Mu@Ov9pRrNkJ3UMa;g0{>HIS2-}8V+Wem&;eb4gE&(6sjDi|Xr TU&fvgfnSt literal 0 HcmV?d00001 diff --git a/website/src/components/SnapshotSyncDiagram.vue b/website/src/components/SnapshotSyncDiagram.vue new file mode 100644 index 0000000000..08ec020719 --- /dev/null +++ b/website/src/components/SnapshotSyncDiagram.vue @@ -0,0 +1,365 @@ + + + From 9c3049f50baf28eb80814144e7bfbb8d17acb8fc Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Tue, 31 Mar 2026 18:02:27 +0100 Subject: [PATCH 26/36] docs: fix prettier formatting in SnapshotSyncDiagram Co-Authored-By: Claude Opus 4.6 (1M context) --- website/src/components/SnapshotSyncDiagram.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/src/components/SnapshotSyncDiagram.vue b/website/src/components/SnapshotSyncDiagram.vue index 08ec020719..03c7f5c581 100644 --- a/website/src/components/SnapshotSyncDiagram.vue +++ b/website/src/components/SnapshotSyncDiagram.vue @@ -2,7 +2,9 @@

- +
0
1
From eab02b957d73267b1708e857e326db90658f41a2 Mon Sep 17 00:00:00 2001 From: Garry Hill Date: Mon, 30 Mar 2026 09:41:40 +0100 Subject: [PATCH 27/36] fix(sync-service): Improve shutdown times (#4066) Some investigation shows that yes, shutting down a DynamicSupervisor with lots of children is **slow**. Calling `Process.kill(pid, :shutdown)` on a simple `DynamicSupervisor` with 200,000 child processes (`Agent`s) takes ~10 **minutes** to complete on my machine. This is despite the fact that `DynamicSupervisor`s terminate their children in parallel - sending `:EXIT` messages to all child processes without waiting for any to terminate. From the [erlang docs](https://www.erlang.org/doc/system/sup_princ.html#simplified-one_for_one-supervisors): > Because a simple_one_for_one supervisor can have many children, it > shuts them all down asynchronously. This means that the children will do > their cleanup in parallel and therefore the order in which they are > stopped is not defined. `DynamicSupervisor` inherited its shutdown behaviour from this supervisor strategy. Using a `PartitionSupervisor` helps and roughly reduces the time to shutdown by ~O(number of partitions) but this does not scale well with the number of running child processes. For instance with 200,000 children over 8 partitions the shutdown time is reduced to ~30s but if you increase the number of children to 500,000 there is a lower bound of ~7s below which you can never go, no matter how many partitions. The problem is that the `PartitionSupervisor` terminates its children sequentially. So as you increase the number of partitions, you're just increasing the number of children that are terminated sequentially, even if each child `DynamicSupervisor` terminates its children in parallel. This PR solves that by replacing the top-level `PartitionSupervisor` with another `DynamicSupervisor`. On shutdown all partition supervisors are terminated in parallel and the children of those partition supervisors are also terminated in parallel, removing the bottleneck. Here are some numbers from my benchmark showing the time required to shutdown a supervisor (tree) with 200,000 running processes. Our larger servers have 16 cores, so we're running a `PartitionSupervisor` with 16 partitions. ``` ========================================= Partitioned (PartitionSupervisor with 16 partitions) ========================================= 200000 processes memory: 72.7734375KiB start: 2.6s shutdown: 12.4s max queue len: 12480 ``` So 12 seconds even with a very simple process with no `terminate/2` callback. We could just increase the number of partitions... ``` ========================================= Partitioned (PartitionSupervisor with 50 partitions) ========================================= 200000 processes memory: 276.609375KiB start: 2.7s shutdown: 5.4s max queue len: 3936 ``` Which is better but we've nearly tripled the number of supervisors but only just over halved the shutdown time, so you start to see the tradeoff. Now with the new 2-tier `DynamicSupervisor`: ``` ========================================= DynamicPartitioned (DynamicSupervisor of 50 DynamicSupervisors) ========================================= 200000 processes memory: 180.84375KiB start: 2.8s shutdown: 0.5s max queue len: 3763 ``` So 10x improvement on the previous config and 25x on the current setup. The number of partitions can be set using a new env var `ELECTRIC_CONSUMER_PARTITIONS`. If that's not set then the partitions scale by `max_shapes` if that's known. If not we just use the number of cores. This is the shutdown time for our production stack with the fallback partition config, so nearly a 6x improvement. I've opted for a conservative default (could have gone with some multiple of the number of cores) but went with the lower-memory option. ``` ========================================= DynamicPartitioned (DynamicSupervisor of 16 DynamicSupervisors) ========================================= 200000 processes memory: 58.09375KiB start: 2.8s shutdown: 2.1s max queue len: 12555 ``` This also scales to 500,000 shapes, where it starts 125 partitions by default and shuts down in 1.5s (the original version took 70s): ``` 500000 processes memory: 435.21875KiB shutdown: 1.5s ``` This is the benchmarking script: https://gist.github.com/magnetised/af2379e9b2028d4e82f442e22d7d20d5 --- .changeset/chatty-planets-invite.md | 5 + .changeset/strong-spoons-cry.md | 5 + packages/sync-service/config/runtime.exs | 1 + .../sync-service/lib/electric/application.ex | 1 + packages/sync-service/lib/electric/config.ex | 1 + .../lib/electric/core_supervisor.ex | 12 +- .../shapes/dynamic_consumer_supervisor.ex | 138 ++++++++++++++---- .../lib/electric/stack_supervisor.ex | 3 +- .../test/support/component_setup.ex | 2 +- website/docs/api/config.md | 11 ++ 10 files changed, 143 insertions(+), 36 deletions(-) create mode 100644 .changeset/chatty-planets-invite.md create mode 100644 .changeset/strong-spoons-cry.md diff --git a/.changeset/chatty-planets-invite.md b/.changeset/chatty-planets-invite.md new file mode 100644 index 0000000000..54dc37ab04 --- /dev/null +++ b/.changeset/chatty-planets-invite.md @@ -0,0 +1,5 @@ +--- +'@electric-sql/docs': patch +--- + +Document new ELECTRIC_CONSUMER_PARTITIONS environment variable diff --git a/.changeset/strong-spoons-cry.md b/.changeset/strong-spoons-cry.md new file mode 100644 index 0000000000..21c2d01b59 --- /dev/null +++ b/.changeset/strong-spoons-cry.md @@ -0,0 +1,5 @@ +--- +'@core/sync-service': patch +--- + +Improve shutdown times by changing the consumer supervision strategy diff --git a/packages/sync-service/config/runtime.exs b/packages/sync-service/config/runtime.exs index 2b4b718102..892b55cafd 100644 --- a/packages/sync-service/config/runtime.exs +++ b/packages/sync-service/config/runtime.exs @@ -207,6 +207,7 @@ config :electric, max_shapes: env!("ELECTRIC_MAX_SHAPES", :integer, nil) || env!("ELECTRIC_EXPERIMENTAL_MAX_SHAPES", :integer, nil), + consumer_partitions: env!("ELECTRIC_CONSUMER_PARTITIONS", :integer, nil), max_concurrent_requests: max_concurrent_requests, # Used in telemetry instance_id: instance_id, diff --git a/packages/sync-service/lib/electric/application.ex b/packages/sync-service/lib/electric/application.ex index c4a885e00a..2d22006f25 100644 --- a/packages/sync-service/lib/electric/application.ex +++ b/packages/sync-service/lib/electric/application.ex @@ -137,6 +137,7 @@ defmodule Electric.Application do max_shapes: get_env(opts, :max_shapes), tweaks: [ publication_alter_debounce_ms: get_env(opts, :publication_alter_debounce_ms), + consumer_partitions: get_env(opts, :consumer_partitions), registry_partitions: get_env(opts, :process_registry_partitions), publication_refresh_period: get_env(opts, :publication_refresh_period), schema_reconciler_period: get_env(opts, :schema_reconciler_period), diff --git a/packages/sync-service/lib/electric/config.ex b/packages/sync-service/lib/electric/config.ex index 5988ce3a7d..83764bb332 100644 --- a/packages/sync-service/lib/electric/config.ex +++ b/packages/sync-service/lib/electric/config.ex @@ -68,6 +68,7 @@ defmodule Electric.Config do stack_ready_timeout: 5_000, send_cache_headers?: true, max_shapes: nil, + consumer_partitions: nil, # This value should be tuned for the hardware it's running on. max_concurrent_requests: %{initial: 300, existing: 10_000}, ## Storage diff --git a/packages/sync-service/lib/electric/core_supervisor.ex b/packages/sync-service/lib/electric/core_supervisor.ex index 00b828af91..a80d88b9c0 100644 --- a/packages/sync-service/lib/electric/core_supervisor.ex +++ b/packages/sync-service/lib/electric/core_supervisor.ex @@ -44,8 +44,15 @@ defmodule Electric.CoreSupervisor do inspector = Keyword.fetch!(opts, :inspector) persistent_kv = Keyword.fetch!(opts, :persistent_kv) tweaks = Keyword.fetch!(opts, :tweaks) + max_shapes = Keyword.fetch!(opts, :max_shapes) - consumer_supervisor_spec = {Electric.Shapes.DynamicConsumerSupervisor, [stack_id: stack_id]} + consumer_supervisor_spec = + {Electric.Shapes.DynamicConsumerSupervisor, + [ + stack_id: stack_id, + max_shapes: max_shapes, + partitions: Keyword.get(tweaks, :consumer_partitions) + ]} shape_cache_spec = {Electric.ShapeCache, shape_cache_opts} @@ -69,8 +76,7 @@ defmodule Electric.CoreSupervisor do period: Keyword.get(tweaks, :schema_reconciler_period, 60_000)} expiry_manager_spec = - {Electric.ShapeCache.ExpiryManager, - max_shapes: Keyword.fetch!(opts, :max_shapes), stack_id: stack_id} + {Electric.ShapeCache.ExpiryManager, max_shapes: max_shapes, stack_id: stack_id} child_spec = Supervisor.child_spec( diff --git a/packages/sync-service/lib/electric/shapes/dynamic_consumer_supervisor.ex b/packages/sync-service/lib/electric/shapes/dynamic_consumer_supervisor.ex index 031ee57274..b05fe3f788 100644 --- a/packages/sync-service/lib/electric/shapes/dynamic_consumer_supervisor.ex +++ b/packages/sync-service/lib/electric/shapes/dynamic_consumer_supervisor.ex @@ -1,28 +1,51 @@ defmodule Electric.Shapes.DynamicConsumerSupervisor do @moduledoc """ - Responsible for managing shape consumer processes + Responsible for managing shape consumer processes. + + Uses a set of `DynamicSupervisor`s supervised by a parent `DynamicSupervisor` + to take advantage of the fact that `DynamicSupervisor` terminates its + children in parallel rather than one at a time. + + This improves shutdown time because all consumer processes are effectively + terminated simultaneously. """ use DynamicSupervisor require Logger - @doc """ - Returns a child spec for the PartitionSupervisor that starts a pool of - DynamicConsumerSupervisor procecesses to shard child processes across. + import Electric, only: [is_stack_id: 1] - The number of dynamic supervisors is equal to the number of CPU cores. - """ - def child_spec(opts) do - stack_id = Keyword.fetch!(opts, :stack_id) - {name, opts} = Keyword.pop(opts, :name, name(stack_id)) + defmodule PartitionDynamicSupervisor do + @moduledoc false + + use DynamicSupervisor + + def name(stack_id, partition) when is_binary(stack_id) do + Electric.ProcessRegistry.name(stack_id, __MODULE__, partition) + end - # We're overriding Electric.Shapes.DynamicConsumerSupervisor's child_spec() function here - # to make the usage of PartitionSupervisor transparent to the callers. As a consequence, we - # need to call `super()` to obtain the original DynamicSupervisor child_spec() to pass as an option to - # PartitionSupervisor. - PartitionSupervisor.child_spec(child_spec: super(opts), name: name) + def start_link({stack_id, partition}) do + DynamicSupervisor.start_link(__MODULE__, [stack_id: stack_id], + name: name(stack_id, partition) + ) + end + + @impl true + def init(stack_id: stack_id) do + Process.set_label({:consumer_supervisor_partition, stack_id}) + Logger.metadata(stack_id: stack_id) + Electric.Telemetry.Sentry.set_tags_context(stack_id: stack_id) + + DynamicSupervisor.init(strategy: :one_for_one) + end end + # The max number of processes to start per-partition. Found empirically to + # give a reasonable tradeoff between memory usage and shutdown speed. + @target_per_partition 4_000 + + @partition_count_key :partition_count + def name(name) when is_atom(name) do name end @@ -35,44 +58,97 @@ defmodule Electric.Shapes.DynamicConsumerSupervisor do Electric.ProcessRegistry.name(stack_id, __MODULE__) end - # This function will be invoked for each dynamic supervisor process in PartitionSupervisor's - # pool, so we keep these processes unnamed. def start_link(opts) do stack_id = Keyword.fetch!(opts, :stack_id) - DynamicSupervisor.start_link(__MODULE__, stack_id: stack_id) + {name, opts} = Keyword.pop(opts, :name, name(stack_id)) + max_processes = Keyword.get(opts, :max_shapes) || 0 + # use a fixed value for the partition count if its configured, if not then + # calculate based on the max_shapes setting (using @target_per_partition) + # or fallback to the number of schedulers + partitions = Keyword.get(opts, :partitions) || partition_count(max_processes) + + Logger.info("Starting DynamicConsumerSupervisor with #{partitions} partitions") + + with {:ok, supervisor_pid} <- + DynamicSupervisor.start_link(__MODULE__, %{stack_id: stack_id, partitions: partitions}, + name: name + ) do + case start_partition_supervisors(supervisor_pid, stack_id, partitions) do + {:ok, _pids} -> + {:ok, supervisor_pid} + + {:error, _} = error -> + DynamicSupervisor.stop(supervisor_pid, :shutdown) + error + end + end end - def start_shape_consumer(supervisor_ref, config) do - start_child(supervisor_ref, {Electric.Shapes.Consumer, config}) + defp start_partition_supervisors(supervisor_pid, stack_id, partitions) do + Electric.Utils.reduce_while_ok(0..(partitions - 1), [], fn partition, pids -> + with {:ok, pid} <- + DynamicSupervisor.start_child( + supervisor_pid, + Supervisor.child_spec( + {PartitionDynamicSupervisor, {stack_id, partition}}, + id: {:partition, partition} + ) + ) do + {:ok, [pid | pids]} + end + end) end - def start_snapshotter(supervisor_ref, config) do - start_child(supervisor_ref, {Electric.Shapes.Consumer.Snapshotter, config}) + def start_shape_consumer(stack_id, config) when is_stack_id(stack_id) do + start_child(stack_id, {Electric.Shapes.Consumer, config}) end - def start_materializer(supervisor_ref, config) do - start_child(supervisor_ref, {Electric.Shapes.Consumer.Materializer, config}) + def start_snapshotter(stack_id, config) when is_stack_id(stack_id) do + start_child(stack_id, {Electric.Shapes.Consumer.Snapshotter, config}) end - defp start_child(supervisor_ref, {child_module, child_opts} = child_spec) do - %{shape_handle: shape_handle} = child_opts + def start_materializer(stack_id, config) when is_stack_id(stack_id) do + start_child(stack_id, {Electric.Shapes.Consumer.Materializer, config}) + end - routing_key = :erlang.phash2(shape_handle) + defp start_child(stack_id, {child_module, child_opts} = child_spec) do + %{shape_handle: shape_handle} = child_opts Logger.debug(fn -> "Starting #{inspect(child_module)} for #{shape_handle}" end) - DynamicSupervisor.start_child( - {:via, PartitionSupervisor, {name(supervisor_ref), routing_key}}, - child_spec - ) + DynamicSupervisor.start_child(partition_for(stack_id, shape_handle), child_spec) end @impl true - def init(stack_id: stack_id) do + def init(%{stack_id: stack_id, partitions: partitions}) do Process.set_label({:dynamic_consumer_supervisor, stack_id}) Logger.metadata(stack_id: stack_id) Electric.Telemetry.Sentry.set_tags_context(stack_id: stack_id) + table = :ets.new(table(stack_id), [:named_table, :public, read_concurrency: true]) + true = :ets.insert(table, [{@partition_count_key, partitions}]) + DynamicSupervisor.init(strategy: :one_for_one) end + + defp table(stack_id), do: :"Electric.Shapes.DynamicConsumerSupervisor:#{stack_id}" + + defp partition_for(stack_id, shape_handle) do + partitions = :ets.lookup_element(table(stack_id), @partition_count_key, 2) + partition = :erlang.phash2(shape_handle, partitions) + PartitionDynamicSupervisor.name(stack_id, partition) + end + + # we don't always have a value for `max_processes`, in which case just + # default to the number of schedulers + defp partition_count(0) do + System.schedulers_online() + end + + defp partition_count(max_processes) when max_processes > 0 do + max( + System.schedulers_online(), + div(max_processes + @target_per_partition - 1, @target_per_partition) + ) + end end diff --git a/packages/sync-service/lib/electric/stack_supervisor.ex b/packages/sync-service/lib/electric/stack_supervisor.ex index b01d912bb5..d7e297b7d9 100644 --- a/packages/sync-service/lib/electric/stack_supervisor.ex +++ b/packages/sync-service/lib/electric/stack_supervisor.ex @@ -146,7 +146,8 @@ defmodule Electric.StackSupervisor do type: {:or, [:pos_integer, nil]}, default: nil ], - process_spawn_opts: [type: :map, default: %{}] + process_spawn_opts: [type: :map, default: %{}], + consumer_partitions: [type: {:or, [:pos_integer, nil]}, default: nil] ] ], lock_breaker_guard: [ diff --git a/packages/sync-service/test/support/component_setup.ex b/packages/sync-service/test/support/component_setup.ex index 55dd2ef312..62c6ef7377 100644 --- a/packages/sync-service/test/support/component_setup.ex +++ b/packages/sync-service/test/support/component_setup.ex @@ -294,7 +294,7 @@ defmodule Support.ComponentSetup do defp start_consumer_supervisor(ctx) do consumer_supervisor = :"consumer_supervisor_#{full_test_name(ctx)}" - {Electric.Shapes.DynamicConsumerSupervisor, [stack_id: ctx.stack_id]} + {Electric.Shapes.DynamicConsumerSupervisor, [stack_id: ctx.stack_id, partitions: 1]} |> Supervisor.child_spec(id: consumer_supervisor, restart: :temporary) |> start_supervised!() diff --git a/website/docs/api/config.md b/website/docs/api/config.md index 2333c33096..74fc527d5b 100644 --- a/website/docs/api/config.md +++ b/website/docs/api/config.md @@ -411,6 +411,17 @@ This replaces the previous `ELECTRIC_EXPERIMENTAL_MAX_SHAPES` environment variab +### ELECTRIC_CONSUMER_PARTITIONS + + + +Consumer processes are partitioned across some number of supervisors to improve launch and shutdown time. If `ELECTRIC_MAX_SHAPES` is set the number of partitions will scale to fit this maximum but if not, it defaults to the number of CPU cores. If you want to improve shutdown performance without setting an upper limit on the number of shapes, then set this to roughly your expected number of shapes / 4000. + + + ## Feature Flags Feature flags enable experimental or advanced features that are not yet enabled by default in production. From 952b75fe2ff9478086acec7551276e8815e1bf62 Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Mon, 30 Mar 2026 11:03:11 +0200 Subject: [PATCH 28/36] fix: preserve char(n) space padding in snapshot/subset queries (#4044) ## Summary - Fixed `char(n)` (bpchar) column values being trimmed of trailing spaces in snapshot and subset queries - The `::text` cast in `pg_cast_column_to_text/1` was stripping space padding from `char(n)` columns, causing inconsistency with values from PG replication which correctly preserve padding - Uses `pg_typeof()` at runtime to detect bpchar columns and `concat()` to preserve padding without trimming ## Test plan - [x] Added test with `CHAR(8)` PK and `CHAR(10)` column verifying space padding is preserved - [x] Test includes NULL `char(n)` column to verify NULL handling is correct - [x] All existing querying tests pass (15/15) - [x] All shapes tests pass (501/501) - [x] All plug/router tests pass (131/131) Fixes #4039 --------- Co-authored-by: Claude Opus 4.6 Co-authored-by: erik-the-implementer --- .changeset/fix-char-padding.md | 5 + .../lib/electric/shapes/querying.ex | 10 +- .../test/electric/shapes/querying_test.exs | 125 ++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-char-padding.md diff --git a/.changeset/fix-char-padding.md b/.changeset/fix-char-padding.md new file mode 100644 index 0000000000..6a64b9350f --- /dev/null +++ b/.changeset/fix-char-padding.md @@ -0,0 +1,5 @@ +--- +"@core/sync-service": patch +--- + +Fixed char(n) column values being trimmed of trailing spaces in snapshot and subset queries, causing inconsistency with values from PG replication. diff --git a/packages/sync-service/lib/electric/shapes/querying.ex b/packages/sync-service/lib/electric/shapes/querying.ex index 2810815031..32fda4a243 100644 --- a/packages/sync-service/lib/electric/shapes/querying.ex +++ b/packages/sync-service/lib/electric/shapes/querying.ex @@ -274,7 +274,15 @@ defmodule Electric.Shapes.Querying do |> pg_coalesce_json_string() end - defp pg_cast_column_to_text(column), do: ~s["#{Utils.escape_quotes(column)}"::text] + defp pg_cast_column_to_text(column) do + escaped = Utils.escape_quotes(column) + col = ~s["#{escaped}"] + # In PostgreSQL, casting bpchar (char(n)) to text strips trailing spaces. + # Use concat() for bpchar columns to preserve the space padding, since + # concat() converts its argument to text without trimming. + ~s[CASE WHEN #{col} IS NULL THEN NULL::text WHEN pg_typeof(#{col}) = 'character'::regtype THEN concat(#{col}, '') ELSE #{col}::text END] + end + defp pg_escape_string_for_json(str), do: ~s[to_json(#{str})::text] defp pg_coalesce_json_string(str), do: ~s[coalesce(#{str} , 'null')] diff --git a/packages/sync-service/test/electric/shapes/querying_test.exs b/packages/sync-service/test/electric/shapes/querying_test.exs index 02b50dae03..ffda11baca 100644 --- a/packages/sync-service/test/electric/shapes/querying_test.exs +++ b/packages/sync-service/test/electric/shapes/querying_test.exs @@ -436,9 +436,134 @@ defmodule Electric.Shapes.QueryingTest do Querying.stream_initial_data(conn, "dummy-stack-id", "dummy-shape-handle", shape) ) end + + test "preserves space padding for char(n) columns in pk-less table", %{db_conn: conn} do + Postgrex.query!( + conn, + """ + CREATE TABLE padded_no_pk ( + code CHAR(6), + name TEXT + ) + """, + [] + ) + + Postgrex.query!( + conn, + "INSERT INTO padded_no_pk VALUES ('ab', 'first'), ('cd', 'second'), (NULL, 'third')", + [] + ) + + shape = Shape.new!("padded_no_pk", inspector: {DirectInspector, conn}) + + assert [ + %{ + key: ~S["public"."padded_no_pk"/"ab "/"first"], + value: %{code: "ab ", name: "first"} + }, + %{ + key: ~S["public"."padded_no_pk"/"cd "/"second"], + value: %{code: "cd ", name: "second"} + }, + %{ + key: ~S["public"."padded_no_pk"/_/"third"], + value: %{code: nil, name: "third"} + } + ] = + decode_stream( + Querying.stream_initial_data(conn, "dummy-stack-id", "dummy-shape-handle", shape) + ) + end + + test "preserves space padding for char(n) columns", %{db_conn: conn} do + Postgrex.query!( + conn, + """ + CREATE TABLE padded ( + id CHAR(8) PRIMARY KEY, + name CHAR(10), + label TEXT + ) + """, + [] + ) + + Postgrex.query!( + conn, + "INSERT INTO padded VALUES ('ab', 'hello', 'world'), ('cd', NULL, 'test')", + [] + ) + + shape = Shape.new!("padded", inspector: {DirectInspector, conn}) + + assert [ + %{ + key: ~S["public"."padded"/"ab "], + value: %{ + id: "ab ", + name: "hello ", + label: "world" + }, + headers: %{operation: "insert", relation: ["public", "padded"]} + }, + %{ + key: ~S["public"."padded"/"cd "], + value: %{ + id: "cd ", + name: nil, + label: "test" + }, + headers: %{operation: "insert", relation: ["public", "padded"]} + } + ] = + decode_stream( + Querying.stream_initial_data(conn, "dummy-stack-id", "dummy-shape-handle", shape) + ) + end end describe "query_move_in/5 with SubqueryMoves.move_in_where_clause/3" do + test "preserves space padding for char(n) join columns", %{db_conn: conn} do + for statement <- [ + "CREATE TABLE parent (id CHAR(8) PRIMARY KEY, value INTEGER)", + "CREATE TABLE child (id SERIAL PRIMARY KEY, value INTEGER, parent_id CHAR(8) REFERENCES parent(id))", + "INSERT INTO parent VALUES ('ab', 1), ('cd', 2), ('ef', 3)", + "INSERT INTO child (value, parent_id) VALUES (4, 'ab'), (5, 'cd'), (6, 'ef')" + ], + do: Postgrex.query!(conn, statement) + + shape = + Shape.new!("child", + where: "parent_id IN (SELECT id FROM parent)", + inspector: {DirectInspector, conn} + ) + |> fill_handles() + + move_in_values = ["ab ", "cd "] + + assert {where, params} = + SubqueryMoves.move_in_where_clause( + shape, + hd(shape.shape_dependencies_handles), + move_in_values + ) + + assert [ + %{value: %{parent_id: "ab "}}, + %{value: %{parent_id: "cd "}} + ] = + Querying.query_move_in( + conn, + "dummy-stack-id", + "dummy-shape-handle", + shape, + {where, params} + ) + |> Enum.map(fn [_key, _tags, json] -> json end) + |> decode_stream() + end + test "builds the correct query which executes", %{db_conn: conn} do for statement <- [ "CREATE TABLE parent (id SERIAL PRIMARY KEY, value INTEGER)", From d524a14c89005cf68f8b3dc7e9f8a39e93e90dde Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Mon, 30 Mar 2026 11:03:47 +0200 Subject: [PATCH 29/36] fix: Resolve pending shapes in FlushTracker when consumer process receives commit fragment with no relevant changes (#4064) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fix #4063 When a `{Storage, :flushed, offset}` message arrives at a Consumer process while it's in the middle of processing a multi-fragment transaction, the flush notification could be lost. This caused the FlushTracker in ShapeLogCollector to get stuck waiting for a flush that was already completed. ### Changes **Consumer (`consumer.ex`, `consumer/state.ex`):** - Defer flush notifications that arrive during a pending transaction by storing the max flushed offset in `pending_flush_offset` - Process deferred flush notifications when the pending transaction completes (commit, skip, or no relevant changes) **FlushTracker (`flush_tracker.ex`):** - Simplify to commit-only tracking: remove non-commit fragment handling since Consumer now defers flush notifications during pending transactions - Remove `shapes_with_changes` parameter from `handle_txn_fragment/3` — all affected shapes are tracked uniformly at commit time **ShapeLogCollector (`shape_log_collector.ex`):** - Only call `FlushTracker.handle_txn_fragment/3` on commit fragments - Remove `shapes_with_changes` computation that is no longer needed ## Test plan - [x] New regression test for stuck flush tracker scenario - [x] Stricter assertions in EventRouterTest for txn fragment reslicing - [x] Updated Consumer tests for deferred flush notification behavior - [x] Existing test suite passes --- .changeset/brave-doors-kneel.md | 5 + .../replication/shape_log_collector.ex | 38 +--- .../shape_log_collector/flush_tracker.ex | 43 +--- .../lib/electric/shapes/consumer.ex | 49 ++++- .../lib/electric/shapes/consumer/state.ex | 10 +- .../flush_tracker_test.exs | 207 +----------------- .../test/electric/shapes/consumer_test.exs | 132 +++++++++-- .../electric/shapes/event_router_test.exs | 137 +++++++++++- 8 files changed, 330 insertions(+), 291 deletions(-) create mode 100644 .changeset/brave-doors-kneel.md diff --git a/.changeset/brave-doors-kneel.md b/.changeset/brave-doors-kneel.md new file mode 100644 index 0000000000..d47fb70c0b --- /dev/null +++ b/.changeset/brave-doors-kneel.md @@ -0,0 +1,5 @@ +--- +'@core/sync-service': patch +--- + +Fix stuck flush tracker when storage flush notification arrives mid-transaction in Consumer diff --git a/packages/sync-service/lib/electric/replication/shape_log_collector.ex b/packages/sync-service/lib/electric/replication/shape_log_collector.ex index c4597e22cf..6bbb4b6b87 100644 --- a/packages/sync-service/lib/electric/replication/shape_log_collector.ex +++ b/packages/sync-service/lib/electric/replication/shape_log_collector.ex @@ -465,17 +465,14 @@ defmodule Electric.Replication.ShapeLogCollector do OpenTelemetry.add_span_attributes("txn.is_dropped": true) - {:ok, - %{ - state - | flush_tracker: - FlushTracker.handle_txn_fragment( - state.flush_tracker, - txn_fragment, - [], - MapSet.new() - ) - }} + flush_tracker = + if txn_fragment.commit do + FlushTracker.handle_txn_fragment(state.flush_tracker, txn_fragment, []) + else + state.flush_tracker + end + + {:ok, %{state | flush_tracker: flush_tracker}} end defp handle_txn_fragment( @@ -578,22 +575,9 @@ defmodule Electric.Replication.ShapeLogCollector do flush_tracker = case event do - %TransactionFragment{} -> - shapes_with_changes = - for {id, frag} <- events_by_handle, - frag.change_count > 0, - not MapSet.member?(undeliverable_set, id), - do: id, - into: MapSet.new() - - if event.commit, do: LsnTracker.broadcast_last_seen_lsn(state.stack_id, lsn) - - FlushTracker.handle_txn_fragment( - flush_tracker, - event, - delivered_shapes, - shapes_with_changes - ) + %TransactionFragment{commit: commit} when not is_nil(commit) -> + LsnTracker.broadcast_last_seen_lsn(state.stack_id, lsn) + FlushTracker.handle_txn_fragment(flush_tracker, event, delivered_shapes) _ -> flush_tracker diff --git a/packages/sync-service/lib/electric/replication/shape_log_collector/flush_tracker.ex b/packages/sync-service/lib/electric/replication/shape_log_collector/flush_tracker.ex index 8ea1144a38..f377a3f162 100644 --- a/packages/sync-service/lib/electric/replication/shape_log_collector/flush_tracker.ex +++ b/packages/sync-service/lib/electric/replication/shape_log_collector/flush_tracker.ex @@ -95,41 +95,15 @@ defmodule Electric.Replication.ShapeLogCollector.FlushTracker do last_flushed == %{} and :gb_trees.is_empty(tree) end - @spec handle_txn_fragment( - t(), - TransactionFragment.t(), - Enumerable.t(shape_id()), - MapSet.t(shape_id()) - ) :: t() - - # Non-commit fragment: track affected shapes but don't update last_seen_offset - # or notify. This ensures shapes are registered early so flush notifications - # from Consumers aren't lost when storage flushes before the commit arrives. - def handle_txn_fragment( - %__MODULE__{} = state, - %TransactionFragment{commit: nil, last_log_offset: last_log_offset}, - affected_shapes, - _shapes_with_changes - ) do - track_shapes(state, last_log_offset, affected_shapes) - end + @spec handle_txn_fragment(t(), TransactionFragment.t(), Enumerable.t(shape_id())) :: t() - # Commit fragment: track shapes that have actual changes in this fragment - # or are already being tracked (need last_sent updated to commit offset). - # Skip shapes that only have a commit marker and already flushed from - # earlier non-commit fragments — there's nothing new to flush for them. + # Commit fragment: track all shapes affected by all fragments of the transaction and update last_seen_offset. def handle_txn_fragment( %__MODULE__{} = state, %TransactionFragment{commit: %Commit{}, last_log_offset: last_log_offset}, - affected_shapes, - shapes_with_changes + affected_shapes ) do - shapes_to_track = - Enum.filter(affected_shapes, fn shape -> - shape in shapes_with_changes or is_map_key(state.last_flushed, shape) - end) - - state = track_shapes(state, last_log_offset, shapes_to_track) + state = track_shapes(state, last_log_offset, affected_shapes) state = %{state | last_seen_offset: last_log_offset} @@ -211,14 +185,7 @@ defmodule Electric.Replication.ShapeLogCollector.FlushTracker do min_incomplete_flush_tree: min_incomplete_flush_tree } - # Only update global offset if we've seen at least one commit. - # Before any commit, last_seen_offset is before_all and there's - # nothing meaningful to report. - if state.last_seen_offset == LogOffset.before_all() do - state - else - update_global_offset(state) - end + update_global_offset(state) end # If the shape is not in the mapping, then we're processing a flush notification for a shape that was removed diff --git a/packages/sync-service/lib/electric/shapes/consumer.ex b/packages/sync-service/lib/electric/shapes/consumer.ex index abe734a678..2917bd57c0 100644 --- a/packages/sync-service/lib/electric/shapes/consumer.ex +++ b/packages/sync-service/lib/electric/shapes/consumer.ex @@ -270,10 +270,20 @@ defmodule Electric.Shapes.Consumer do end end - def handle_info({ShapeCache.Storage, :flushed, offset_in}, state) do - {state, offset_txn} = State.align_offset_to_txn_boundary(state, offset_in) + def handle_info({ShapeCache.Storage, :flushed, flushed_offset}, state) do + state = + if is_write_unit_txn(state.write_unit) or is_nil(state.pending_txn) do + # We're not currently in the middle of processing a transaction. This flushed offset is either + # from a previously processed transaction or a non-commit fragment of the most recently + # seen transaction. Notify ShapeLogCollector about it immediately. + confirm_flushed_and_notify(state, flushed_offset) + else + # Storage has signaled latest flushed offset in the middle of processing a multi-fragment + # transaction. Save it for later, to be handled when the commit fragment arrives. + updated_offset = more_recent_offset(state.pending_flush_offset, flushed_offset) + %{state | pending_flush_offset: updated_offset} + end - ShapeLogCollector.notify_flushed(state.stack_id, state.shape_handle, offset_txn) {:noreply, state, state.hibernate_after} end @@ -567,7 +577,7 @@ defmodule Electric.Shapes.Consumer do # With write_unit=txn all fragments are buffered until the Commit change is seen. At that # point, a transaction struct is produced from the buffered fragments and is written to # storage. - state.write_unit == State.write_unit_txn() -> + is_write_unit_txn(state.write_unit) -> {txns, transaction_builder} = TransactionBuilder.build(txn_fragment, state.transaction_builder) @@ -597,6 +607,7 @@ defmodule Electric.Shapes.Consumer do defp skip_txn_fragment(state, %TransactionFragment{} = txn_fragment) do %{state | pending_txn: nil} |> consider_flushed(txn_fragment.last_log_offset) + |> clear_pending_flush_offset() end # This function does similar things to do_handle_txn/2 but with the following simplifications: @@ -747,9 +758,10 @@ defmodule Electric.Shapes.Consumer do "No relevant changes written in transaction xid=#{txn.xid}" end) - state = %{state | pending_txn: nil} - consider_flushed(state, txn_fragment.last_log_offset) + %{state | pending_txn: nil} + |> consider_flushed(txn_fragment.last_log_offset) end + |> clear_pending_flush_offset() end def process_buffered_txn_fragments(%State{buffer: buffer} = state) do @@ -1006,6 +1018,31 @@ defmodule Electric.Shapes.Consumer do end end + defp confirm_flushed_and_notify(state, flushed_offset) do + {state, txn_offset} = State.align_offset_to_txn_boundary(state, flushed_offset) + ShapeLogCollector.notify_flushed(state.stack_id, state.shape_handle, txn_offset) + state + end + + # After a pending transaction completes and txn_offset_mapping is populated, + # process the deferred flushed offset (if any). + # + # Even if the most recent transaction is skipped or no changes from it end up satisfying the + # shape's `where` condition, Storage may have signaled a flush offset from the previous transaction + # while we were still processing fragments of the current one. Therefore this function must + # be called any time `state.pending_txn` is reset to nil in a multi-fragment transaction + # processing setting. + defp clear_pending_flush_offset(%{pending_flush_offset: nil} = state), do: state + + defp clear_pending_flush_offset(%{pending_flush_offset: flushed_offset} = state) do + %{state | pending_flush_offset: nil} + |> confirm_flushed_and_notify(flushed_offset) + end + + defp more_recent_offset(nil, offset), do: offset + defp more_recent_offset(offset, nil), do: offset + defp more_recent_offset(offset1, offset2), do: LogOffset.max(offset1, offset2) + defp subscribe(state, action) do case ShapeLogCollector.add_shape(state.stack_id, state.shape_handle, state.shape, action) do :ok -> diff --git a/packages/sync-service/lib/electric/shapes/consumer/state.ex b/packages/sync-service/lib/electric/shapes/consumer/state.ex index b32204d2a9..52c70eaff9 100644 --- a/packages/sync-service/lib/electric/shapes/consumer/state.ex +++ b/packages/sync-service/lib/electric/shapes/consumer/state.ex @@ -42,7 +42,11 @@ defmodule Electric.Shapes.Consumer.State do # Tracks in-progress transaction, initialized when a txn fragment with has_begin?=true is seen. # It is used to check whether the entire txn is visible in the snapshot and to mark it # as flushed in order to handle its remaining fragments appropriately. - pending_txn: nil + pending_txn: nil, + # When a {Storage, :flushed, offset} message arrives during a pending + # transaction, we defer the notification and store the max flushed offset + # here. Multiple deferred notifications are collapsed into a single most recent offset. + pending_flush_offset: nil ] @type pg_snapshot() :: SnapshotQuery.pg_snapshot() @@ -393,6 +397,6 @@ defmodule Electric.Shapes.Consumer.State do ] end - def write_unit_txn, do: @write_unit_txn - def write_unit_txn_fragment, do: @write_unit_txn_fragment + defguard is_write_unit_txn(write_unit) when write_unit == @write_unit_txn + defguard is_write_unit_txn_fragment(write_unit) when write_unit == @write_unit_txn_fragment end diff --git a/packages/sync-service/test/electric/replication/shape_log_collector/flush_tracker_test.exs b/packages/sync-service/test/electric/replication/shape_log_collector/flush_tracker_test.exs index 6fabe24447..5b2f45655e 100644 --- a/packages/sync-service/test/electric/replication/shape_log_collector/flush_tracker_test.exs +++ b/packages/sync-service/test/electric/replication/shape_log_collector/flush_tracker_test.exs @@ -27,23 +27,7 @@ defmodule Electric.Replication.ShapeLogCollector.FlushTrackerTest do refute_receive {:flush_confirmed, _} end - test "non-commit fragment tracks shapes but does not notify or update last_seen", %{ - tracker: tracker - } do - fragment = %TransactionFragment{ - xid: 1, - lsn: 1, - last_log_offset: LogOffset.new(1, 0), - commit: nil - } - - tracker = handle_txn(tracker, fragment, ["shape1"]) - refute_receive {:flush_confirmed, _} - # Shape is tracked in last_flushed - refute FlushTracker.empty?(tracker) - end - - test "non-commit fragment with no affected shapes is a no-op", %{tracker: tracker} do + test "non-commit fragment raises FunctionClauseError", %{tracker: tracker} do fragment = %TransactionFragment{ xid: 1, lsn: 1, @@ -51,192 +35,20 @@ defmodule Electric.Replication.ShapeLogCollector.FlushTrackerTest do commit: nil } - tracker = handle_txn(tracker, fragment, []) - refute_receive {:flush_confirmed, _} - assert FlushTracker.empty?(tracker) - end - - test "shape tracked by non-commit fragment can be flushed before commit arrives", %{ - tracker: tracker - } do - # Non-commit fragment registers shape - fragment = %TransactionFragment{ - xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 4), - commit: nil - } - - tracker = handle_txn(tracker, fragment, ["shape1"]) - - # Flush notification catches up the shape in last_flushed - tracker = FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 4)) - - # No notification yet — no commit seen - refute_receive {:flush_confirmed, _} - assert FlushTracker.empty?(tracker) - - # Commit arrives with shape1 in affected_shapes (via EventRouter's shapes_in_txn) - # but shape1 has no new changes — only a commit marker. It was already flushed, - # so it should not be re-registered. - tracker = - FlushTracker.handle_txn_fragment( - tracker, - batch(xid: 1, lsn: 5, last_offset: 10), - ["shape1"], - MapSet.new() - ) - - # Shape was skipped, tracker is empty, global offset notified - assert_receive {:flush_confirmed, 5} - assert FlushTracker.empty?(tracker) - end - - test "shape tracked by non-commit and still pending is updated by commit", %{ - tracker: tracker - } do - # Non-commit fragment registers shape - fragment = %TransactionFragment{ - xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 2), - commit: nil - } - - tracker = handle_txn(tracker, fragment, ["shape1"]) - - # Commit arrives — shape is still in last_flushed, so last_sent is updated - # (shapes_with_changes doesn't matter here since shape is already tracked) - tracker = - FlushTracker.handle_txn_fragment( - tracker, - batch(xid: 1, lsn: 5, last_offset: 10), - ["shape1"], - MapSet.new() - ) - - refute FlushTracker.empty?(tracker) - - # Flush at the commit's offset catches up the shape - tracker = - FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 10)) - - assert_receive {:flush_confirmed, 5} - assert FlushTracker.empty?(tracker) - end - - test "shape only in commit (not in non-commit fragments) is tracked normally", %{ - tracker: tracker - } do - # Non-commit fragment for shape1 - fragment = %TransactionFragment{ - xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 2), - commit: nil - } - - tracker = handle_txn(tracker, fragment, ["shape1"]) - - # Commit has both shapes — shape2 has actual changes in the commit fragment - tracker = - FlushTracker.handle_txn_fragment( - tracker, - batch(xid: 1, lsn: 5, last_offset: 10), - ["shape1", "shape2"], - MapSet.new(["shape2"]) - ) - - refute FlushTracker.empty?(tracker) - - # Both shapes need to be flushed - tracker = - FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 10)) - - tracker = - FlushTracker.handle_flush_notification(tracker, "shape2", LogOffset.new(5, 10)) - - assert_receive {:flush_confirmed, 5} - assert FlushTracker.empty?(tracker) + assert_raise FunctionClauseError, fn -> handle_txn(tracker, fragment, ["shape1"]) end end - test "already-flushed shape with new changes in commit is re-tracked", %{ + test "non-commit fragment with no affected shapes raises FunctionClauseError", %{ tracker: tracker } do - # Non-commit fragment registers shape fragment = %TransactionFragment{ xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 4), - commit: nil - } - - tracker = handle_txn(tracker, fragment, ["shape1"]) - - # Flush notification catches up the shape in last_flushed - tracker = FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 4)) - assert FlushTracker.empty?(tracker) - - # Commit arrives — shape1 has NEW changes in the commit fragment - tracker = - FlushTracker.handle_txn_fragment( - tracker, - batch(xid: 1, lsn: 5, last_offset: 10), - ["shape1"], - MapSet.new(["shape1"]) - ) - - # Shape must be re-tracked to ensure commit-fragment writes are flushed - refute FlushTracker.empty?(tracker) - - tracker = - FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 10)) - - assert_receive {:flush_confirmed, 5} - assert FlushTracker.empty?(tracker) - end - - test "multiple non-commit fragments update last_sent progressively", %{ - tracker: tracker - } do - frag1 = %TransactionFragment{ - xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 2), - commit: nil - } - - frag2 = %TransactionFragment{ - xid: 1, - lsn: 5, - last_log_offset: LogOffset.new(5, 5), + lsn: 1, + last_log_offset: LogOffset.new(1, 0), commit: nil } - tracker = - tracker - |> handle_txn(frag1, ["shape1"]) - |> handle_txn(frag2, ["shape1"]) - - # Flushing to the latest non-commit offset catches up the shape - tracker = - FlushTracker.handle_flush_notification(tracker, "shape1", LogOffset.new(5, 5)) - - # No notification — no commit seen - refute_receive {:flush_confirmed, _} - assert FlushTracker.empty?(tracker) - - # Commit with no new changes — shape was flushed, skipped - tracker = - FlushTracker.handle_txn_fragment( - tracker, - batch(xid: 1, lsn: 5, last_offset: 10), - ["shape1"], - MapSet.new() - ) - - assert_receive {:flush_confirmed, 5} - assert FlushTracker.empty?(tracker) + assert_raise FunctionClauseError, fn -> handle_txn(tracker, fragment, []) end end end @@ -460,12 +272,7 @@ defmodule Electric.Replication.ShapeLogCollector.FlushTrackerTest do # Helper: calls handle_txn_fragment with shapes_with_changes defaulting to # all affected shapes (the common case for single-fragment transactions). defp handle_txn(tracker, fragment, affected_shapes) do - FlushTracker.handle_txn_fragment( - tracker, - fragment, - affected_shapes, - MapSet.new(affected_shapes) - ) + FlushTracker.handle_txn_fragment(tracker, fragment, affected_shapes) end defp batch(opts) do diff --git a/packages/sync-service/test/electric/shapes/consumer_test.exs b/packages/sync-service/test/electric/shapes/consumer_test.exs index 6d0fe38cbe..a0abc0b37e 100644 --- a/packages/sync-service/test/electric/shapes/consumer_test.exs +++ b/packages/sync-service/test/electric/shapes/consumer_test.exs @@ -1677,10 +1677,11 @@ defmodule Electric.Shapes.ConsumerTest do test "flush notification for multi-fragment txn is not lost when storage flushes before commit fragment", %{stack_id: stack_id} = ctx do # Regression test for https://github.com/electric-sql/electric/issues/3985 + # Updated for deferred flush notification fix (#4063). # # When a multi-fragment transaction's non-commit fragments are flushed to disk # before the commit fragment is processed by ShapeLogCollector, the flush - # notification was lost because FlushTracker hadn't registered the shape yet. + # notification was lost because FlushTracker wasn't tracking the shape's offsets. # This caused the shape to be stuck in the FlushTracker, blocking # the global flush offset from advancing. {shape_handle, _} = ShapeCache.get_or_create_shape_handle(@shape1, stack_id) @@ -1738,19 +1739,12 @@ defmodule Electric.Shapes.ConsumerTest do assert :ok = ShapeLogCollector.handle_event(fragment1, stack_id) assert :ok = ShapeLogCollector.handle_event(fragment2, stack_id) - flushed_log_offset = fragment2.last_log_offset - - # Matching on a traced call inline to avoid any timing issues that - # Trace.collect_traced_calls() is susceptible to in this case. - assert_receive {:trace, _, :call, - {ShapeLogCollector, :notify_flushed, - [^stack_id, ^shape_handle, ^flushed_log_offset]}}, - @receive_timeout + # With deferred flush notifications, notify_flushed is NOT called + # after non-commit fragments. The flush is deferred until the commit. + assert [] == Support.Trace.collect_traced_calls() # Now send the commit fragment. The commit fragment itself has NO matching # changes for the shape — all changes were in earlier fragments. - # After this, FlushTracker registers the shape but the data was already - # flushed, so no new :flushed message will arrive. commit_fragment = txn_fragment( xid, @@ -1768,8 +1762,120 @@ defmodule Electric.Shapes.ConsumerTest do assert :ok = ShapeLogCollector.handle_event(commit_fragment, ctx.stack_id) assert_receive {^ref, :new_changes, _}, @receive_timeout - # Assert that the flush boundary has advanced which wasn't the case before due to the - # aforementioned bug, + # The deferred flush notification is sent after the commit, aligned + # to the commit fragment's last_log_offset. + commit_offset = commit_fragment.last_log_offset + + assert_receive {:trace, _, :call, + {ShapeLogCollector, :notify_flushed, + [^stack_id, ^shape_handle, ^commit_offset]}}, + @receive_timeout + + # Flush boundary advances. + tx_offset = commit_fragment.last_log_offset.tx_offset + assert_receive {:flush_boundary_updated, ^tx_offset}, @receive_timeout + end + + @tag allow_subqueries: false, with_pure_file_storage_opts: [flush_period: 10_000] + test "flush notification offset is aligned when storage flushes before commit arrives at consumer", + %{stack_id: stack_id} do + # Regression test for https://github.com/electric-sql/electric/issues/4063 + # + # When a non-commit fragment has enough data to trigger a buffer-size + # flush (>= 64KB), the :flushed message is placed in the consumer's + # mailbox during processing. The consumer process ends up handling the :flushed message + # before receiving the commit fragment. But since the offset it sends to FlushTracker + # predates the commit fragment's offset, the FlushTracker keeps the shape in the + # "pending" state and there's no follow-up notification from the consumer that would + # unblock it. + # + # A high flush_period prevents timer-based flushes so the only flush + # comes from the buffer-size trigger, making the test deterministic. + + {shape_handle, _} = ShapeCache.get_or_create_shape_handle(@shape1, stack_id) + :started = ShapeCache.await_snapshot_start(shape_handle, stack_id) + + ref = Shapes.Consumer.register_for_changes(stack_id, shape_handle) + register_as_replication_client(stack_id) + + xid = 11 + lsn = Lsn.from_integer(10) + relevant_change_offset = LogOffset.new(lsn, 0) + + # The fragment has a large shape-relevant record (>64KB) that triggers a + # buffer-size flush during write, PLUS a non-matching record at a higher + # offset. This means the source fragment's last_log_offset is higher than + # the shape's last written offset — just like in production where + # transactions touch multiple tables. + padding = String.duplicate("x", 70_000) + + non_commit_fragment = + txn_fragment( + xid, + lsn, + [ + %Changes.NewRecord{ + relation: {"public", "test_table"}, + record: %{"id" => "1", "value" => padding}, + log_offset: relevant_change_offset + }, + # This change does NOT match shape1 (test_table) but raises the + # fragment's last_log_offset above the shape's written offset. + %Changes.NewRecord{ + relation: {"public", "other_table"}, + record: %{"id" => "2"}, + log_offset: LogOffset.new(lsn, 50) + } + ], + has_begin?: true + ) + + # Commit fragment has only a change for a different table. The consumer + # writes nothing for it but still finalises the pending transaction, + # populating txn_offset_mapping. + commit_fragment = + txn_fragment( + xid, + lsn, + [ + %Changes.NewRecord{ + relation: {"public", "other_table"}, + record: %{"id" => "99"}, + log_offset: LogOffset.new(lsn, 100) + } + ], + has_commit?: true + ) + + # Send non-commit fragment. The large record triggers a buffer flush, + # placing {Storage, :flushed, offset} in the consumer's mailbox. + Support.Trace.trace_shape_log_collector_calls( + pid: Shapes.Consumer.whereis(stack_id, shape_handle), + functions: [:notify_flushed] + ) + + assert :ok = ShapeLogCollector.handle_event(non_commit_fragment, stack_id) + + # With deferred flush notifications, the consumer does NOT call notify_flushed + # after the non-commit fragment. The :flushed message is saved for later. + assert [] == Support.Trace.collect_traced_calls() + + # Send the commit fragment to finalize the transaction. + assert :ok = ShapeLogCollector.handle_event(commit_fragment, stack_id) + + # Consumer has processed the relevant change... + assert_receive {^ref, :new_changes, ^relevant_change_offset}, @receive_timeout + + # The deferred flush notification is sent after the commit with the + # aligned offset (the commit fragment's last_log_offset). + commit_last_log_offset = commit_fragment.last_log_offset + + assert [ + {ShapeLogCollector, :notify_flushed, + [^stack_id, ^shape_handle, ^commit_last_log_offset]} + ] = Support.Trace.collect_traced_calls() + + # Flush boundary advances correctly. tx_offset = commit_fragment.last_log_offset.tx_offset assert_receive {:flush_boundary_updated, ^tx_offset}, @receive_timeout end diff --git a/packages/sync-service/test/electric/shapes/event_router_test.exs b/packages/sync-service/test/electric/shapes/event_router_test.exs index eae7c2b59f..e670348b47 100644 --- a/packages/sync-service/test/electric/shapes/event_router_test.exs +++ b/packages/sync-service/test/electric/shapes/event_router_test.exs @@ -8,6 +8,7 @@ defmodule Electric.Shapes.EventRouterTest do alias Electric.Replication.Changes.TruncatedRelation alias Electric.Replication.Changes.UpdatedRecord alias Electric.Replication.Changes.TransactionFragment + alias Electric.Replication.LogOffset alias Electric.Shapes.EventRouter alias Electric.Shapes.Shape alias Support.StubInspector @@ -96,6 +97,8 @@ defmodule Electric.Shapes.EventRouterTest do {result, _router} = EventRouter.event_by_shape_handle(router, batch) + assert ["s1", "s2"] == result |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{ has_begin?: true, @@ -275,6 +278,8 @@ defmodule Electric.Shapes.EventRouterTest do {result, _router} = EventRouter.event_by_shape_handle(router, batch) + assert ["s1", "s2", "s3", "s4"] == result |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{ has_begin?: true, @@ -318,6 +323,8 @@ defmodule Electric.Shapes.EventRouterTest do {result, _router} = EventRouter.event_by_shape_handle(router, batch) + assert ["s1", "s2"] == result |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{affected_relations: s1_relations}, "s2" => %TransactionFragment{affected_relations: s2_relations} @@ -374,9 +381,8 @@ defmodule Electric.Shapes.EventRouterTest do {result2, _router} = EventRouter.event_by_shape_handle(router, batch2) - assert %{ - "s1" => %TransactionFragment{has_begin?: true, changes: [^insert]} - } = result2 + assert ["s1"] == Map.keys(result2) + assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert]}} = result2 end test "Begin seen once per shape even across multiple batches" do @@ -423,13 +429,14 @@ defmodule Electric.Shapes.EventRouterTest do batch1 = %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1]} {result1, router} = EventRouter.event_by_shape_handle(router, batch1) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1]}} = result1 insert2 = %NewRecord{relation: {"public", "t1"}, record: %{"id" => "2"}} batch2 = %TransactionFragment{xid: 100, has_begin?: false, changes: [insert2]} {result2, _router} = EventRouter.event_by_shape_handle(router, batch2) - + assert ["s2"] == Map.keys(result2) assert %{"s2" => %TransactionFragment{has_begin?: true, changes: [^insert2]}} = result2 end @@ -445,6 +452,7 @@ defmodule Electric.Shapes.EventRouterTest do {result1, router} = EventRouter.event_by_shape_handle(router, batch1) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1]}} = result1 insert2 = %NewRecord{relation: {"public", "t1"}, record: %{"id" => "2"}} @@ -459,6 +467,8 @@ defmodule Electric.Shapes.EventRouterTest do {result2, _router} = EventRouter.event_by_shape_handle(router, batch2) + assert ["s1", "s2"] == result2 |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{has_begin?: false, commit: ^commit_op, changes: []}, "s2" => %TransactionFragment{ @@ -496,6 +506,100 @@ defmodule Electric.Shapes.EventRouterTest do assert result2 == %{"s1" => batch2} end + test "commit-only fragment for shape when commit has changes only for a different table" do + router = + EventRouter.new() + |> EventRouter.add_shape("s1", Shape.new!("t1", inspector: @inspector)) + |> EventRouter.add_shape("s2", Shape.new!("t2", inspector: @inspector)) + + insert_t1 = %NewRecord{ + relation: {"public", "t1"}, + record: %{"id" => "1"}, + log_offset: LogOffset.new(10, 0) + } + + insert_t2_first = %NewRecord{ + relation: {"public", "t2"}, + record: %{"id" => "2"}, + log_offset: LogOffset.new(10, 2) + } + + batch1 = %TransactionFragment{ + xid: 100, + has_begin?: true, + last_log_offset: LogOffset.new(10, 2), + changes: [insert_t1, insert_t2_first], + change_count: 2 + } + + {result1, router} = EventRouter.event_by_shape_handle(router, batch1) + + # Shape s1 only gets the t1 change but last_log_offset is copied from the txn fragment + batch1_last_offset = LogOffset.new(10, 2) + + assert ["s1", "s2"] == Map.keys(result1) + + assert %{ + "s1" => %TransactionFragment{ + has_begin?: true, + commit: nil, + changes: [^insert_t1], + change_count: 1, + last_log_offset: ^batch1_last_offset + }, + "s2" => %TransactionFragment{ + has_begin?: true, + commit: nil, + changes: [^insert_t2_first], + change_count: 1, + last_log_offset: ^batch1_last_offset + } + } = result1 + + # Commit fragment has only a t2 change + insert_t2_last = %NewRecord{ + relation: {"public", "t2"}, + record: %{"id" => "99"}, + log_offset: LogOffset.new(10, 4) + } + + commit_op = %Commit{commit_timestamp: ~U[2024-01-01 00:00:00Z]} + + batch2 = %TransactionFragment{ + xid: 100, + has_begin?: false, + commit: commit_op, + last_log_offset: LogOffset.new(10, 4), + changes: [insert_t2_last], + change_count: 1 + } + + {result2, _router} = EventRouter.event_by_shape_handle(router, batch2) + + # s1 gets a commit-only fragment: change_count=0, + # and last_log_offset from the commit fragment + batch2_last_offset = LogOffset.new(10, 4) + + assert ["s1", "s2"] == Map.keys(result2) + + assert %{ + "s1" => %TransactionFragment{ + has_begin?: false, + commit: ^commit_op, + changes: [], + change_count: 0, + last_log_offset: ^batch2_last_offset + }, + "s2" => %TransactionFragment{ + has_begin?: false, + commit: ^commit_op, + changes: [^insert_t2_last], + change_count: 1, + last_log_offset: ^batch2_last_offset + } + } = result2 + end + test "transaction state is reset after Commit" do router = EventRouter.new() @@ -594,6 +698,7 @@ defmodule Electric.Shapes.EventRouterTest do batch1 = %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1]} {result1, router} = EventRouter.event_by_shape_handle(router, batch1) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1]}} = result1 insert2 = %NewRecord{relation: {"public", "t1"}, record: %{"id" => "2"}} @@ -602,6 +707,8 @@ defmodule Electric.Shapes.EventRouterTest do {result2, router} = EventRouter.event_by_shape_handle(router, batch2) + assert ["s2", "s3"] == result2 |> Map.keys() |> Enum.sort() + assert %{ "s2" => %TransactionFragment{has_begin?: true, changes: [^insert2]}, "s3" => %TransactionFragment{has_begin?: true, changes: [^insert3]} @@ -619,6 +726,8 @@ defmodule Electric.Shapes.EventRouterTest do {result3, _router} = EventRouter.event_by_shape_handle(router, batch3) + assert ["s1", "s2", "s3"] == result3 |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{ has_begin?: false, @@ -646,6 +755,7 @@ defmodule Electric.Shapes.EventRouterTest do %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1a, insert2a]} ) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1a]}} = result1 # Shape s2 added mid-transaction - should not receive any events from this transaction @@ -674,6 +784,8 @@ defmodule Electric.Shapes.EventRouterTest do ) # s1 gets its changes + commit, s2 gets nothing (added mid-transaction) + assert ["s1"] == Map.keys(result2) + assert %{ "s1" => %TransactionFragment{ has_begin?: false, @@ -698,6 +810,8 @@ defmodule Electric.Shapes.EventRouterTest do } ) + assert ["s1", "s2"] == result3 |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{ has_begin?: true, @@ -726,6 +840,7 @@ defmodule Electric.Shapes.EventRouterTest do %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1a, insert2a]} ) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1a]}} = result1 # Shapes s2 and s3 added mid-transaction - neither should receive any events from this @@ -753,6 +868,8 @@ defmodule Electric.Shapes.EventRouterTest do ) # s1 gets its changes + commit, s2 and s3 get nothing (added mid-transaction) + assert ["s1"] == Map.keys(result2) + assert %{ "s1" => %TransactionFragment{ has_begin?: false, @@ -778,6 +895,8 @@ defmodule Electric.Shapes.EventRouterTest do } ) + assert ["s1", "s2", "s3"] == result3 |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{ has_begin?: true, @@ -812,6 +931,8 @@ defmodule Electric.Shapes.EventRouterTest do %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1a, insert2a]} ) + assert ["s1", "s2"] == result1 |> Map.keys() |> Enum.sort() + assert %{ "s1" => %TransactionFragment{has_begin?: true, changes: [^insert1a]}, "s2" => %TransactionFragment{has_begin?: true, changes: [^insert2a]} @@ -836,6 +957,8 @@ defmodule Electric.Shapes.EventRouterTest do ) # s1 gets nothing (removed), s2 gets its changes + commit + assert ["s2"] == Map.keys(result2) + assert %{ "s2" => %TransactionFragment{ has_begin?: false, @@ -859,6 +982,7 @@ defmodule Electric.Shapes.EventRouterTest do %TransactionFragment{xid: 100, has_begin?: true, changes: [insert1a, insert2a]} ) + assert ["s1"] == Map.keys(result1) assert %{"s1" => %TransactionFragment{has_begin?: true, changes: [^insert1a]}} = result1 # s2 added mid-transaction @@ -879,6 +1003,7 @@ defmodule Electric.Shapes.EventRouterTest do ) # s2 skipped because added mid-transaction + assert ["s1"] == Map.keys(result2) assert %{"s1" => %TransactionFragment{has_begin?: false, changes: [^insert1b]}} = result2 # s2 removed before transaction ends @@ -900,6 +1025,8 @@ defmodule Electric.Shapes.EventRouterTest do ) # s2 removed, so only s1 gets events + assert ["s1"] == Map.keys(result3) + assert %{ "s1" => %TransactionFragment{ has_begin?: false, @@ -924,6 +1051,8 @@ defmodule Electric.Shapes.EventRouterTest do } ) + assert ["s1"] == Map.keys(result4) + assert %{ "s1" => %TransactionFragment{ has_begin?: true, From d0422590142e9a8dbcbbc80e724454c3bfa40b33 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 30 Mar 2026 14:17:31 +0200 Subject: [PATCH 30/36] feat(typescript-client): add move-in event support (#4043) Co-authored-by: Claude Opus 4.6 (1M context) --- .changeset/move-in-event-support.md | 5 +++++ packages/typescript-client/src/types.ts | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .changeset/move-in-event-support.md diff --git a/.changeset/move-in-event-support.md b/.changeset/move-in-event-support.md new file mode 100644 index 0000000000..ba81f8735d --- /dev/null +++ b/.changeset/move-in-event-support.md @@ -0,0 +1,5 @@ +--- +'@electric-sql/client': patch +--- + +Add move-in event support to the TypeScript client. Rename `MoveOutPattern` to `MovePattern` (with a deprecated alias for backwards compatibility), extend `EventMessage` to accept both `move-out` and `move-in` events, and add `active_conditions` field to `ChangeMessage` headers. diff --git a/packages/typescript-client/src/types.ts b/packages/typescript-client/src/types.ts index 414fb1c563..a4cff5bee5 100644 --- a/packages/typescript-client/src/types.ts +++ b/packages/typescript-client/src/types.ts @@ -60,13 +60,16 @@ export type Operation = `insert` | `update` | `delete` export type MoveTag = string /** - * A move-out pattern is a position and a value. The position is the index of the column - * that is being moved out. The value is the value of the column that is being moved out. + * A move pattern is a position and a value. The position is the index of the column + * involved in the move. The value is the value of that column. * * Tag width and value order is fixed for a given shape, so the client can determine * which tags match this pattern. */ -export type MoveOutPattern = { pos: number; value: string } +export type MovePattern = { pos: number; value: string } + +/** @deprecated Use {@link MovePattern} instead */ +export type MoveOutPattern = MovePattern /** * Serialized expression types for structured subset queries. @@ -125,7 +128,7 @@ export type ControlMessage = { } export type EventMessage = { - headers: Header & { event: `move-out`; patterns: MoveOutPattern[] } + headers: Header & { event: `move-out` | `move-in`; patterns: MovePattern[] } } export type ChangeMessage = Row> = { @@ -138,6 +141,7 @@ export type ChangeMessage = Row> = { /** Tags will always be present for changes if the shape has a subquery in its where clause, and are omitted otherwise.*/ tags?: MoveTag[] removed_tags?: MoveTag[] + active_conditions?: boolean[] } } From a000e2049293ee18fea0a5c33598806f9a4a4fa1 Mon Sep 17 00:00:00 2001 From: Garry Hill Date: Mon, 30 Mar 2026 16:26:57 +0100 Subject: [PATCH 31/36] fix(elixir-client): Add required headers to mock responses (#4072) `electric-cursor` is now required and validated by the client so ensure it's always there, even if the value is nonsense. --- .changeset/mighty-experts-relate.md | 5 +++ .../elixir-client/lib/electric/client/mock.ex | 6 +++- .../test/electric/client/mock_test.exs | 33 +++++++++++++++---- 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 .changeset/mighty-experts-relate.md diff --git a/.changeset/mighty-experts-relate.md b/.changeset/mighty-experts-relate.md new file mode 100644 index 0000000000..5e52f080b3 --- /dev/null +++ b/.changeset/mighty-experts-relate.md @@ -0,0 +1,5 @@ +--- +'@core/elixir-client': patch +--- + +Include required headers in client mock responses diff --git a/packages/elixir-client/lib/electric/client/mock.ex b/packages/elixir-client/lib/electric/client/mock.ex index 453fbdc183..5cbd0f9ccd 100644 --- a/packages/elixir-client/lib/electric/client/mock.ex +++ b/packages/elixir-client/lib/electric/client/mock.ex @@ -198,9 +198,11 @@ defmodule Electric.Client.Mock do end defp build_response(opts) do + opts = Keyword.put_new(opts, :next_cursor, System.unique_integer([:positive, :monotonic])) + %Fetch.Response{ status: Keyword.get(opts, :status, 200), - headers: headers(opts[:headers] || []), + headers: headers(opts), body: jsonify(opts[:body] || []), schema: Keyword.get(opts, :schema, nil), shape_handle: Keyword.get(opts, :shape_handle, nil), @@ -213,12 +215,14 @@ defmodule Electric.Client.Mock do {:shape_handle, Client.shape_handle()} | {:last_offset, Client.Offset.t()} | {:schema, Client.schema()} + | {:next_cursor, Client.cursor()} ]) :: %{String.t() => [String.t()]} def headers(args) do %{} |> put_optional_header("electric-handle", args[:shape_handle]) |> put_optional_header("electric-offset", args[:last_offset]) |> put_optional_header("electric-schema", args[:schema], &Jason.encode!/1) + |> put_optional_header("electric-cursor", args[:next_cursor]) end defp put_optional_header(headers, header, value, encoder \\ & &1) diff --git a/packages/elixir-client/test/electric/client/mock_test.exs b/packages/elixir-client/test/electric/client/mock_test.exs index ff41037813..3c5f859a82 100644 --- a/packages/elixir-client/test/electric/client/mock_test.exs +++ b/packages/elixir-client/test/electric/client/mock_test.exs @@ -20,8 +20,9 @@ defmodule Electric.Client.MockTest do start_supervised( {Task, fn -> - events = Client.stream(client, ctx.shape) |> Enum.take(5) - send(parent, {:events, events}) + client + |> Client.stream(ctx.shape) + |> Enum.each(fn evt -> send(parent, {:event, evt}) end) end} ) @@ -51,10 +52,16 @@ defmodule Electric.Client.MockTest do ] ) - events = - receive do - {:events, events} -> events - end + event_stream = + Stream.repeatedly(fn -> + receive do + {:event, event} -> event + after + 1_000 -> raise "client stream has crashed" + end + end) + + events = Enum.take(event_stream, 5) assert [ %ChangeMessage{value: %{"id" => 1111}}, @@ -63,5 +70,19 @@ defmodule Electric.Client.MockTest do %ChangeMessage{value: %{"id" => 4444}}, up_to_date(1234) ] = events + + {:ok, _request} = + Client.Mock.response(client, + status: 200, + schema: %{id: %{type: "int8"}}, + last_offset: Offset.new(0, 1), + shape_handle: "my-shape", + body: [ + Client.Mock.change(value: %{id: "5555"}), + Client.Mock.up_to_date(lsn: 1235) + ] + ) + + assert [_, up_to_date(1235)] = Enum.take(event_stream, 2) end end From d3fd29a64b68928b2659c33778888ad4b33ea64e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:12:10 +0200 Subject: [PATCH 32/36] chore: publish new package versions (#4048) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @electric-sql/experimental@6.0.14 ### Patch Changes - Updated dependencies [deb7c32] - @electric-sql/client@1.5.14 ## @electric-sql/react@1.0.43 ### Patch Changes - Updated dependencies [deb7c32] - @electric-sql/client@1.5.14 ## @electric-sql/client@1.5.14 ### Patch Changes - deb7c32: Add move-in event support to the TypeScript client. Rename `MoveOutPattern` to `MovePattern` (with a deprecated alias for backwards compatibility), extend `EventMessage` to accept both `move-out` and `move-in` events, and add `active_conditions` field to `ChangeMessage` headers. ## @electric-sql/y-electric@0.1.40 ### Patch Changes - Updated dependencies [deb7c32] - @electric-sql/client@1.5.14 ## expo-db-electric-starter@1.0.15 ### Patch Changes - Updated dependencies [deb7c32] - @electric-sql/client@1.5.14 ## @core/electric-telemetry@0.1.10 ### Patch Changes - 0aa8c00: Extend top processes by memory metric to collect processes until the specified mem usage threshold is covered. `ELECTRIC_TELEMETRY_TOP_PROCESS_COUNT` has been renamed to `ELECTRIC_TELEMETRY_TOP_PROCESS_LIMIT` with a new format: `count:` or `mem_percent:`. The old env var is still accepted as a fallback. - 0aa8c00: Group request handler processes together to see their aggregated memory usage. ## @core/elixir-client@0.9.4 ### Patch Changes - cb2c45e: Include required headers in client mock responses ## @core/sync-service@1.4.16 ### Patch Changes - 6c5068a: Fix stuck flush tracker when storage flush notification arrives mid-transaction in Consumer - 93e5d40: Fix typo in source event name - 64a89a0: Fixed char(n) column values being trimmed of trailing spaces in snapshot and subset queries, causing inconsistency with values from PG replication. - 8919ca3: Reclassify `branch_does_not_exist` error as retryable. PlanetScale returns this error transiently during cluster maintenance, and classifying it as non-retryable caused sources to be permanently shut down requiring manual restart. - d89be52: Improve shutdown times by changing the consumer supervision strategy - 0af96e9: Make in-memory shape db instances isolated - 461576d: Add known errors for pg authorization failures ## @electric-sql/docs@0.0.8 ### Patch Changes - d89be52: Document new ELECTRIC_CONSUMER_PARTITIONS environment variable Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/brave-doors-kneel.md | 5 ----- .changeset/chatty-planets-invite.md | 5 ----- .changeset/dry-bikes-fix.md | 5 ----- .changeset/fix-char-padding.md | 5 ----- .changeset/mighty-experts-relate.md | 5 ----- .changeset/move-in-event-support.md | 5 ----- .changeset/perfect-ads-reply.md | 7 ------- .changeset/reclassify-branch-does-not-exist.md | 7 ------- .changeset/sour-houses-flow.md | 5 ----- .changeset/strong-spoons-cry.md | 5 ----- .changeset/yellow-dolls-drum.md | 5 ----- .changeset/young-bikes-switch.md | 5 ----- examples/tanstack-db-expo-starter/CHANGELOG.md | 7 +++++++ examples/tanstack-db-expo-starter/package.json | 4 ++-- packages/electric-telemetry/CHANGELOG.md | 10 ++++++++++ packages/electric-telemetry/package.json | 2 +- packages/elixir-client/CHANGELOG.md | 6 ++++++ packages/elixir-client/package.json | 2 +- packages/experimental/CHANGELOG.md | 7 +++++++ packages/experimental/package.json | 2 +- packages/react-hooks/CHANGELOG.md | 7 +++++++ packages/react-hooks/package.json | 2 +- packages/sync-service/CHANGELOG.md | 14 ++++++++++++++ packages/sync-service/package.json | 2 +- packages/typescript-client/CHANGELOG.md | 6 ++++++ packages/typescript-client/package.json | 2 +- packages/y-electric/CHANGELOG.md | 7 +++++++ packages/y-electric/package.json | 2 +- pnpm-lock.yaml | 3 ++- website/CHANGELOG.md | 6 ++++++ website/package.json | 2 +- 31 files changed, 82 insertions(+), 75 deletions(-) delete mode 100644 .changeset/brave-doors-kneel.md delete mode 100644 .changeset/chatty-planets-invite.md delete mode 100644 .changeset/dry-bikes-fix.md delete mode 100644 .changeset/fix-char-padding.md delete mode 100644 .changeset/mighty-experts-relate.md delete mode 100644 .changeset/move-in-event-support.md delete mode 100644 .changeset/perfect-ads-reply.md delete mode 100644 .changeset/reclassify-branch-does-not-exist.md delete mode 100644 .changeset/sour-houses-flow.md delete mode 100644 .changeset/strong-spoons-cry.md delete mode 100644 .changeset/yellow-dolls-drum.md delete mode 100644 .changeset/young-bikes-switch.md diff --git a/.changeset/brave-doors-kneel.md b/.changeset/brave-doors-kneel.md deleted file mode 100644 index d47fb70c0b..0000000000 --- a/.changeset/brave-doors-kneel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Fix stuck flush tracker when storage flush notification arrives mid-transaction in Consumer diff --git a/.changeset/chatty-planets-invite.md b/.changeset/chatty-planets-invite.md deleted file mode 100644 index 54dc37ab04..0000000000 --- a/.changeset/chatty-planets-invite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@electric-sql/docs': patch ---- - -Document new ELECTRIC_CONSUMER_PARTITIONS environment variable diff --git a/.changeset/dry-bikes-fix.md b/.changeset/dry-bikes-fix.md deleted file mode 100644 index 7fc36535fb..0000000000 --- a/.changeset/dry-bikes-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Fix typo in source event name diff --git a/.changeset/fix-char-padding.md b/.changeset/fix-char-padding.md deleted file mode 100644 index 6a64b9350f..0000000000 --- a/.changeset/fix-char-padding.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Fixed char(n) column values being trimmed of trailing spaces in snapshot and subset queries, causing inconsistency with values from PG replication. diff --git a/.changeset/mighty-experts-relate.md b/.changeset/mighty-experts-relate.md deleted file mode 100644 index 5e52f080b3..0000000000 --- a/.changeset/mighty-experts-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/elixir-client': patch ---- - -Include required headers in client mock responses diff --git a/.changeset/move-in-event-support.md b/.changeset/move-in-event-support.md deleted file mode 100644 index ba81f8735d..0000000000 --- a/.changeset/move-in-event-support.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@electric-sql/client': patch ---- - -Add move-in event support to the TypeScript client. Rename `MoveOutPattern` to `MovePattern` (with a deprecated alias for backwards compatibility), extend `EventMessage` to accept both `move-out` and `move-in` events, and add `active_conditions` field to `ChangeMessage` headers. diff --git a/.changeset/perfect-ads-reply.md b/.changeset/perfect-ads-reply.md deleted file mode 100644 index c0e2c2c934..0000000000 --- a/.changeset/perfect-ads-reply.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@core/electric-telemetry': patch ---- - -Extend top processes by memory metric to collect processes until the specified mem usage threshold is covered. - -`ELECTRIC_TELEMETRY_TOP_PROCESS_COUNT` has been renamed to `ELECTRIC_TELEMETRY_TOP_PROCESS_LIMIT` with a new format: `count:` or `mem_percent:`. The old env var is still accepted as a fallback. diff --git a/.changeset/reclassify-branch-does-not-exist.md b/.changeset/reclassify-branch-does-not-exist.md deleted file mode 100644 index b0c97b826c..0000000000 --- a/.changeset/reclassify-branch-does-not-exist.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Reclassify `branch_does_not_exist` error as retryable. PlanetScale returns this -error transiently during cluster maintenance, and classifying it as non-retryable -caused sources to be permanently shut down requiring manual restart. diff --git a/.changeset/sour-houses-flow.md b/.changeset/sour-houses-flow.md deleted file mode 100644 index 8f391375da..0000000000 --- a/.changeset/sour-houses-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/electric-telemetry': patch ---- - -Group request handler processes together to see their aggregated memory usage. diff --git a/.changeset/strong-spoons-cry.md b/.changeset/strong-spoons-cry.md deleted file mode 100644 index 21c2d01b59..0000000000 --- a/.changeset/strong-spoons-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Improve shutdown times by changing the consumer supervision strategy diff --git a/.changeset/yellow-dolls-drum.md b/.changeset/yellow-dolls-drum.md deleted file mode 100644 index 6115531b35..0000000000 --- a/.changeset/yellow-dolls-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Make in-memory shape db instances isolated diff --git a/.changeset/young-bikes-switch.md b/.changeset/young-bikes-switch.md deleted file mode 100644 index 9b1125af48..0000000000 --- a/.changeset/young-bikes-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@core/sync-service': patch ---- - -Add known errors for pg authorization failures diff --git a/examples/tanstack-db-expo-starter/CHANGELOG.md b/examples/tanstack-db-expo-starter/CHANGELOG.md index 1dff233701..79af109309 100644 --- a/examples/tanstack-db-expo-starter/CHANGELOG.md +++ b/examples/tanstack-db-expo-starter/CHANGELOG.md @@ -1,5 +1,12 @@ # expo-db-electric-starter +## 1.0.15 + +### Patch Changes + +- Updated dependencies [deb7c32] + - @electric-sql/client@1.5.14 + ## 1.0.14 ### Patch Changes diff --git a/examples/tanstack-db-expo-starter/package.json b/examples/tanstack-db-expo-starter/package.json index 6e6396348c..77860e508e 100644 --- a/examples/tanstack-db-expo-starter/package.json +++ b/examples/tanstack-db-expo-starter/package.json @@ -1,6 +1,6 @@ { "name": "expo-db-electric-starter", - "version": "1.0.14", + "version": "1.0.15", "main": "index.ts", "scripts": { "start": "docker compose up -d && expo start", @@ -13,7 +13,7 @@ "api": "tsx api/index.ts" }, "dependencies": { - "@electric-sql/client": "1.5.13", + "@electric-sql/client": "1.5.14", "@expo/metro-runtime": "~5.0.4", "@tanstack/electric-db-collection": "^0.0.15", "@tanstack/react-db": "^0.0.27", diff --git a/packages/electric-telemetry/CHANGELOG.md b/packages/electric-telemetry/CHANGELOG.md index 895f13521f..6bcdefde6b 100644 --- a/packages/electric-telemetry/CHANGELOG.md +++ b/packages/electric-telemetry/CHANGELOG.md @@ -1,5 +1,15 @@ # @core/electric-telemetry +## 0.1.10 + +### Patch Changes + +- 0aa8c00: Extend top processes by memory metric to collect processes until the specified mem usage threshold is covered. + + `ELECTRIC_TELEMETRY_TOP_PROCESS_COUNT` has been renamed to `ELECTRIC_TELEMETRY_TOP_PROCESS_LIMIT` with a new format: `count:` or `mem_percent:`. The old env var is still accepted as a fallback. + +- 0aa8c00: Group request handler processes together to see their aggregated memory usage. + ## 0.1.9 ### Patch Changes diff --git a/packages/electric-telemetry/package.json b/packages/electric-telemetry/package.json index cf4cd9d983..3a434b0b44 100644 --- a/packages/electric-telemetry/package.json +++ b/packages/electric-telemetry/package.json @@ -1,5 +1,5 @@ { "name": "@core/electric-telemetry", "private": true, - "version": "0.1.9" + "version": "0.1.10" } diff --git a/packages/elixir-client/CHANGELOG.md b/packages/elixir-client/CHANGELOG.md index f2449fdb49..bdd31e5837 100644 --- a/packages/elixir-client/CHANGELOG.md +++ b/packages/elixir-client/CHANGELOG.md @@ -1,5 +1,11 @@ # @core/elixir-client +## 0.9.4 + +### Patch Changes + +- cb2c45e: Include required headers in client mock responses + ## 0.9.3 ### Patch Changes diff --git a/packages/elixir-client/package.json b/packages/elixir-client/package.json index e42b2fef2b..aa5e1d9ef3 100644 --- a/packages/elixir-client/package.json +++ b/packages/elixir-client/package.json @@ -1,7 +1,7 @@ { "name": "@core/elixir-client", "private": true, - "version": "0.9.3", + "version": "0.9.4", "scripts": { "publish:hex": "../../scripts/publish_hex.sh electric_client" } diff --git a/packages/experimental/CHANGELOG.md b/packages/experimental/CHANGELOG.md index eb5736ab62..6dee49d25f 100644 --- a/packages/experimental/CHANGELOG.md +++ b/packages/experimental/CHANGELOG.md @@ -1,5 +1,12 @@ # @electric-sql/experimental +## 6.0.14 + +### Patch Changes + +- Updated dependencies [deb7c32] + - @electric-sql/client@1.5.14 + ## 6.0.13 ### Patch Changes diff --git a/packages/experimental/package.json b/packages/experimental/package.json index 859b43c22a..20efc0dbdb 100644 --- a/packages/experimental/package.json +++ b/packages/experimental/package.json @@ -1,7 +1,7 @@ { "name": "@electric-sql/experimental", "description": "Experimental TypeScript features for ElectricSQL.", - "version": "6.0.13", + "version": "6.0.14", "author": "ElectricSQL team and contributors.", "bugs": { "url": "https://github.com/electric-sql/electric/issues" diff --git a/packages/react-hooks/CHANGELOG.md b/packages/react-hooks/CHANGELOG.md index 47391ab553..aa1ad840b6 100644 --- a/packages/react-hooks/CHANGELOG.md +++ b/packages/react-hooks/CHANGELOG.md @@ -1,5 +1,12 @@ # @electric-sql/react +## 1.0.43 + +### Patch Changes + +- Updated dependencies [deb7c32] + - @electric-sql/client@1.5.14 + ## 1.0.42 ### Patch Changes diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 92f0d08dbb..5c403a95d8 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -1,7 +1,7 @@ { "name": "@electric-sql/react", "description": "React hooks for ElectricSQL", - "version": "1.0.42", + "version": "1.0.43", "author": "ElectricSQL team and contributors.", "bugs": { "url": "https://github.com/electric-sql/electric/issues" diff --git a/packages/sync-service/CHANGELOG.md b/packages/sync-service/CHANGELOG.md index 08bf7d8603..1b0915186a 100644 --- a/packages/sync-service/CHANGELOG.md +++ b/packages/sync-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @core/sync-service +## 1.4.16 + +### Patch Changes + +- 6c5068a: Fix stuck flush tracker when storage flush notification arrives mid-transaction in Consumer +- 93e5d40: Fix typo in source event name +- 64a89a0: Fixed char(n) column values being trimmed of trailing spaces in snapshot and subset queries, causing inconsistency with values from PG replication. +- 8919ca3: Reclassify `branch_does_not_exist` error as retryable. PlanetScale returns this + error transiently during cluster maintenance, and classifying it as non-retryable + caused sources to be permanently shut down requiring manual restart. +- d89be52: Improve shutdown times by changing the consumer supervision strategy +- 0af96e9: Make in-memory shape db instances isolated +- 461576d: Add known errors for pg authorization failures + ## 1.4.15 ### Patch Changes diff --git a/packages/sync-service/package.json b/packages/sync-service/package.json index 270c86748a..64241f935f 100644 --- a/packages/sync-service/package.json +++ b/packages/sync-service/package.json @@ -1,7 +1,7 @@ { "name": "@core/sync-service", "private": true, - "version": "1.4.15", + "version": "1.4.16", "scripts": { "publish:hex": "../../scripts/publish_hex.sh electric", "changeset": "pushd ../..; pnpm changeset; popd" diff --git a/packages/typescript-client/CHANGELOG.md b/packages/typescript-client/CHANGELOG.md index 83b4e9ab57..5d37ab3b47 100644 --- a/packages/typescript-client/CHANGELOG.md +++ b/packages/typescript-client/CHANGELOG.md @@ -1,5 +1,11 @@ # @electric-sql/client +## 1.5.14 + +### Patch Changes + +- deb7c32: Add move-in event support to the TypeScript client. Rename `MoveOutPattern` to `MovePattern` (with a deprecated alias for backwards compatibility), extend `EventMessage` to accept both `move-out` and `move-in` events, and add `active_conditions` field to `ChangeMessage` headers. + ## 1.5.13 ### Patch Changes diff --git a/packages/typescript-client/package.json b/packages/typescript-client/package.json index 5670263d50..fa506d9e21 100644 --- a/packages/typescript-client/package.json +++ b/packages/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "@electric-sql/client", "description": "Postgres everywhere - your data, in sync, wherever you need it.", - "version": "1.5.13", + "version": "1.5.14", "author": "ElectricSQL team and contributors.", "bugs": { "url": "https://github.com/electric-sql/electric/issues" diff --git a/packages/y-electric/CHANGELOG.md b/packages/y-electric/CHANGELOG.md index a95c3c0a1d..d8204682f7 100644 --- a/packages/y-electric/CHANGELOG.md +++ b/packages/y-electric/CHANGELOG.md @@ -1,5 +1,12 @@ # @electric-sql/y-electric +## 0.1.40 + +### Patch Changes + +- Updated dependencies [deb7c32] + - @electric-sql/client@1.5.14 + ## 0.1.39 ### Patch Changes diff --git a/packages/y-electric/package.json b/packages/y-electric/package.json index 7c73cfe292..d22f69dc88 100644 --- a/packages/y-electric/package.json +++ b/packages/y-electric/package.json @@ -1,6 +1,6 @@ { "name": "@electric-sql/y-electric", - "version": "0.1.39", + "version": "0.1.40", "description": "YJS network provider for ElectricSQL", "author": "ElectricSQL team and contributors.", "bugs": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a64de27ac..311e5caa60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1011,7 +1011,7 @@ importers: examples/tanstack-db-expo-starter: dependencies: '@electric-sql/client': - specifier: 1.5.13 + specifier: 1.5.14 version: link:../../packages/typescript-client '@expo/metro-runtime': specifier: ~5.0.4 @@ -7691,6 +7691,7 @@ packages: '@xmldom/xmldom@0.8.10': resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} engines: {node: '>=10.0.0'} + deprecated: this version has critical issues, please update to the latest version '@zxing/text-encoding@0.9.0': resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md index 7d70b9da30..26e852a82c 100644 --- a/website/CHANGELOG.md +++ b/website/CHANGELOG.md @@ -1,5 +1,11 @@ # @electric-sql/docs +## 0.0.8 + +### Patch Changes + +- d89be52: Document new ELECTRIC_CONSUMER_PARTITIONS environment variable + ## 0.0.7 ### Patch Changes diff --git a/website/package.json b/website/package.json index 304ca56e68..ccf22db74b 100644 --- a/website/package.json +++ b/website/package.json @@ -1,7 +1,7 @@ { "name": "@electric-sql/docs", "private": true, - "version": "0.0.7", + "version": "0.0.8", "scripts": { "test": "vitest run", "test:watch": "vitest", From 048f1e793a5f33f4c86ab2901828ae3006cbdaf1 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Tue, 31 Mar 2026 21:23:08 +0100 Subject: [PATCH 33/36] docs: update demo text, add StreamDB reference, remove scores sentence Co-Authored-By: Claude Opus 4.6 (1M context) --- ...26-03-31-yjs-durable-streams-on-electric-cloud.md | 2 +- website/demos/territory-wars.md | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md b/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md index 3f0008f714..c0e1f8503c 100644 --- a/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md +++ b/website/blog/posts/2026-03-31-yjs-durable-streams-on-electric-cloud.md @@ -37,7 +37,7 @@ For the full details, see the [Yjs Durable Streams Protocol](https://github.com/ ## Demo -Try [Territory Wars](/demos/territory-wars) — a multiplayer territory capture game running `y-durable-streams` live on Electric Cloud. Game state is stored in a Yjs Y.Map CRDT, and player presence uses awareness streams. +Try [Territory Wars](/demos/territory-wars) — a multiplayer territory capture game running `y-durable-streams` live on Electric Cloud. The game board is a Yjs Y.Map where each cell is a last-writer-wins register. Players move to claim cells and enclose territory. Player presence is tracked via awareness streams. Game state is managed via [StreamDB](/blog/2026/03/26/stream-db). ## Get started diff --git a/website/demos/territory-wars.md b/website/demos/territory-wars.md index c2c12ba3cc..b43c7072fe 100644 --- a/website/demos/territory-wars.md +++ b/website/demos/territory-wars.md @@ -9,10 +9,14 @@ demo: true order: 5 --- -# {{ $frontmatter.title }} +# Territory Wars -{{ $frontmatter.description }} - - +Multiplayer territory capture game built with [Yjs](https://yjs.dev) CRDTs on [Durable Streams](/primitives/durable-streams). + +## How it works + +The game board is a Yjs Y.Map where each cell is a last-writer-wins register. Players move to claim cells and enclose territory. Player presence is tracked via awareness streams. Game state is managed via [StreamDB](/blog/2026/03/26/stream-db). Built with [`y-durable-streams`](https://www.npmjs.com/package/@durable-streams/y-durable-streams) on [Durable Streams](/primitives/durable-streams). + + From 10d0fc395035326dafc3b67e56bf05f0236d2173 Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Wed, 1 Apr 2026 13:56:25 +0100 Subject: [PATCH 34/36] chore: update territory wars demo bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix bot color collisions (purple reserved for humans) - Win threshold 20% → 30% - Bot rematch support and rejoin improvements Co-Authored-By: Claude Opus 4.6 (1M context) --- .../territory-wars/assets/index-BHXtFtbF.js | 42 +++++++++++++++++++ .../territory-wars/assets/index-CeLYWEfe.js | 42 ------------------- .../territory-wars/assets/index-DqJU4iAc.js | 42 ------------------- .../public/demos/territory-wars/index.html | 2 +- 4 files changed, 43 insertions(+), 85 deletions(-) create mode 100644 website/public/demos/territory-wars/assets/index-BHXtFtbF.js delete mode 100644 website/public/demos/territory-wars/assets/index-CeLYWEfe.js delete mode 100644 website/public/demos/territory-wars/assets/index-DqJU4iAc.js diff --git a/website/public/demos/territory-wars/assets/index-BHXtFtbF.js b/website/public/demos/territory-wars/assets/index-BHXtFtbF.js new file mode 100644 index 0000000000..85182e1593 --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-BHXtFtbF.js @@ -0,0 +1,42 @@ +(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function uC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,`default`)?n.default:n}var vh={exports:{}},Va={};var N0;function fC(){if(N0)return Va;N0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var B0;function hC(){return B0||(B0=1,vh.exports=fC()),vh.exports}var Y=hC(),wh={exports:{}},$a={},bh={exports:{}},Eh={};var L0;function dC(){return L0||(L0=1,(function(n){function t(U,q){var W=U.length;U.push(q);t:for(;0>>1,ut=U[st];if(0>>1;st<_;){var H=2*(st+1)-1,Q=U[H],J=H+1,ot=U[J];if(0>l(Q,W))Jl(ot,Q)?(U[st]=ot,U[J]=W,st=J):(U[st]=Q,U[H]=W,st=H);else if(Jl(ot,W))U[st]=ot,U[J]=W,st=J;else break t}}return q}function l(U,q){var W=U.sortIndex-q.sortIndex;return W!==0?W:U.id-q.id}if(n.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var p=[],g=[],y=1,m=null,v=3,b=!1,w=!1,E=!1,T=!1,B=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,O=typeof setImmediate<`u`?setImmediate:null;function M(U){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=U)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function G(U){if(E=!1,M(U),!w)if(i(p)!==null)w=!0,k||(k=!0,et());else{var q=i(g);q!==null&&ht(G,q.startTime-U)}}var k=!1,L=-1,X=5,tt=-1;function F(){return T?!0:!(n.unstable_now()-ttU&&F());){var st=m.callback;if(typeof st==`function`){m.callback=null,v=m.priorityLevel;var ut=st(m.expirationTime<=U);if(U=n.unstable_now(),typeof ut==`function`){m.callback=ut,M(U),q=!0;break e}m===i(p)&&r(p),M(U)}else r(p);m=i(p)}if(m!==null)q=!0;else{var _=i(g);_!==null&&ht(G,_.startTime-U),q=!1}}break t}finally{m=null,v=W,b=!1}q=void 0}}finally{q?et():k=!1}}}var et;if(typeof O==`function`)et=function(){O(at)};else if(typeof MessageChannel<`u`){var wt=new MessageChannel,Bt=wt.port2;wt.port1.onmessage=at,et=function(){Bt.postMessage(null)}}else et=function(){B(at,0)};function ht(U,q){L=B(function(){U(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125st?(U.sortIndex=W,t(g,U),i(p)===null&&U===i(g)&&(E?(D(L),L=-1):E=!0,ht(G,W-st))):(U.sortIndex=ut,t(p,U),w||b||(w=!0,k||(k=!0,et()))),U},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(U){var q=v;return function(){var W=v;v=q;try{return U.apply(this,arguments)}finally{v=W}}}})(Eh)),Eh}var I0;function pC(){return I0||(I0=1,bh.exports=dC()),bh.exports}var Ch={exports:{}},gt={};var H0;function gC(){if(H0)return gt;H0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),y=Symbol.for(`react.lazy`),m=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function B(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||w}B.prototype.isReactComponent={},B.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=B.prototype;function O(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||w}var M=O.prototype=new D;M.constructor=O,E(M,B.prototype),M.isPureReactComponent=!0;var G=Array.isArray;function k(){}var L={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Q){var J=Q.ref;return{$$typeof:n,type:_,key:H,ref:J!==void 0?J:null,props:Q}}function F(_,H){return tt(_.type,H,_.props)}function at(_){return typeof _==`object`&&_!==null&&_.$$typeof===n}function et(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Q){return H[Q]})}var wt=/\/+/g;function Bt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?et(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(k,k):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function U(_,H,Q,J,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var vt=!1;if(_===null)vt=!0;else switch(it){case`bigint`:case`string`:case`number`:vt=!0;break;case`object`:switch(_.$$typeof){case n:case t:vt=!0;break;case y:return vt=_._init,U(vt(_._payload),H,Q,J,ot)}}if(vt)return ot=ot(_),vt=J===``?`.`+Bt(_,0):J,G(ot)?(Q=``,vt!=null&&(Q=vt.replace(wt,`$&/`)+`/`),U(ot,H,Q,``,function($e){return $e})):ot!=null&&(at(ot)&&(ot=F(ot,Q+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(wt,`$&/`)+`/`)+vt)),H.push(ot)),1;vt=0;var xt=J===``?`.`:J+`:`;if(G(_))for(var bt=0;bt<_.length;bt++)J=_[bt],it=xt+Bt(J,bt),vt+=U(J,H,Q,it,ot);else if(bt=b(_),typeof bt==`function`)for(_=bt.call(_),bt=0;!(J=_.next()).done;)J=J.value,it=xt+Bt(J,bt++),vt+=U(J,H,Q,it,ot);else if(it===`object`){if(typeof _.then==`function`)return U(ht(_),H,Q,J,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return vt}function q(_,H,Q){if(_==null)return _;var J=[],ot=0;return U(_,J,``,``,function(it){return H.call(Q,it,ot++)}),J}function W(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Q){(_._status===0||_._status===-1)&&(_._status=1,_._result=Q)},function(Q){(_._status===0||_._status===-1)&&(_._status=2,_._result=Q)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var st=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Q){q(_,function(){H.apply(this,arguments)},Q)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!at(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return gt.Activity=m,gt.Children=ut,gt.Component=B,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=O,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return L.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,H,Q){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var J=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(J[it]=H[it]);var it=arguments.length-2;if(it===1)J.children=Q;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),xh.exports=yC(),xh.exports}var $0;function SC(){if($0)return $a;$0=1;var n=pC(),t=Gd(),i=mC();function r(e){var s=`https://react.dev/errors/`+e;if(1ut||(e.current=st[ut],st[ut]=null,ut--)}function Q(e,s){ut++,st[ut]=e.current,e.current=s}var J=_(null),ot=_(null),it=_(null),vt=_(null);function xt(e,s){switch(Q(it,s),Q(ot,e),Q(J,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&&(e=e.namespaceURI)?r0(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=r0(s),e=a0(s,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(J),Q(J,e)}function bt(){H(J),H(ot),H(it)}function $e(e){e.memoizedState!==null&&Q(vt,e);var s=J.current,a=a0(s,e.type);s!==a&&(Q(ot,e),Q(J,a))}function Ge(e){ot.current===e&&(H(J),H(ot)),vt.current===e&&(H(vt),Ia._currentValue=W)}var $n,Jr;function wn(e){if($n===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);$n=s&&s[1]||``,Jr=-1)`:-1f||x[c]!==j[f]){var K=` +`+x[c].replace(` at new `,` at `);return e.displayName&&K.includes(``)&&(K=K.replace(``,e.displayName)),K}while(1<=c&&0<=f);break}}}finally{Xr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?wn(a):``}function nt(e,s){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn(`Lazy`);case 13:return e.child!==s&&s!==null?wn(`Suspense Fallback`):wn(`Suspense`);case 19:return wn(`SuspenseList`);case 0:case 15:return Fr(e.type,!1);case 11:return Fr(e.type.render,!1);case 1:return Fr(e.type,!0);case 31:return wn(`Activity`);default:return``}}function P(e){try{var s=``,a=null;do s+=nt(e,a),a=e,e=e.return;while(e);return s}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var dt=Object.prototype.hasOwnProperty,pt=n.unstable_scheduleCallback,St=n.unstable_cancelCallback,Jt=n.unstable_shouldYield,rn=n.unstable_requestPaint,de=n.unstable_now,ti=n.unstable_getCurrentPriorityLevel,Gn=n.unstable_ImmediatePriority,ki=n.unstable_UserBlockingPriority,vs=n.unstable_NormalPriority,Gb=n.unstable_LowPriority,Ip=n.unstable_IdlePriority,Yb=n.log,Qb=n.unstable_setDisableYieldValue,Zr=null,Ye=null;function ws(e){if(typeof Yb==`function`&&Qb(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Zr,e)}catch{}}var Qe=Math.clz32?Math.clz32:Fb,Jb=Math.log,Xb=Math.LN2;function Fb(e){return e>>>=0,e===0?32:31-(Jb(e)/Xb|0)|0}var Ol=256,Rl=262144,Dl=4194304;function ei(e){var s=e&42;if(s!==0)return s;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ml(e,s,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ei(c):(S&=C,S!==0?f=ei(S):a||(a=C&~e,a!==0&&(f=ei(a))))):(C=c&~h,C!==0?f=ei(C):S!==0?f=ei(S):a||(a=c&~e,a!==0&&(f=ei(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function Wr(e,s){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&s)===0}function Zb(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hp(){var e=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function au(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function Pr(e,s){e.pendingLanes|=s,s!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wb(e,s,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,j=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var iE=/[\n"\\]/g;function ln(e){return e.replace(iE,function(s){return`\\`+s.charCodeAt(0).toString(16)+` `})}function hu(e,s,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),s!=null?S===`number`?(s===0&&e.value===``||e.value!=s)&&(e.value=``+an(s)):e.value!==``+an(s)&&(e.value=``+an(s)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),s!=null?du(e,S,an(s)):a!=null?du(e,S,an(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+an(C):e.removeAttribute(`name`)}function Pp(e,s,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),s!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||s!=null)){fu(e);return}a=a!=null?``+an(a):``,s=s!=null?``+an(s):a,C||s===e.value||(e.value=s),e.defaultValue=s}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),fu(e)}function du(e,s,a){s===`number`&&zl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Li(e,s,a,c){if(e=e.options,s){s={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),Su=!1;if(Jn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){Su=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{Su=!1}var Es=null,vu=null,Nl=null;function ag(){if(Nl)return Nl;var e,s=vu,a=s.length,c,f=`value`in Es?Es.value:Es.textContent,h=f.length;for(e=0;e=aa),hg=` `,dg=!1;function pg(e,s){switch(e){case`keyup`:return kE.indexOf(s.keyCode)!==-1;case`keydown`:return s.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gg(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Ki=!1;function zE(e,s){switch(e){case`compositionend`:return gg(s);case`keypress`:return s.which!==32?null:(dg=!0,hg);case`textInput`:return e=s.data,e===hg&&dg?null:e;default:return null}}function jE(e,s){if(Ki)return e===`compositionend`||!xu&&pg(e,s)?(e=ag(),Nl=vu=Es=null,Ki=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=Cg(a)}}function _g(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?_g(e,s.parentNode):`contains`in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Tg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=zl(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==`string`}catch{a=!1}if(a)e=s.contentWindow;else break;s=zl(e.document)}return s}function Au(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||s===`textarea`||e.contentEditable===`true`)}var VE=Jn&&`documentMode`in document&&11>=document.documentMode,Vi=null,Ou=null,ua=null,Ru=!1;function Ag(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ru||Vi==null||Vi!==zl(c)||(c=Vi,`selectionStart`in c&&Au(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Do(Ou,`onSelect`),0>=S,f-=S,Dn=1<<32-Qe(s)+f|a<mt?(Tt=lt,lt=null):Tt=lt.sibling;var Ut=N(R,lt,z[mt],V);if(Ut===null){lt===null&&(lt=Tt);break}e&<&&Ut.alternate===null&&s(R,lt),A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,lt=Tt}if(mt===z.length)return a(R,lt),Ot&&Fn(R,mt),ct;if(lt===null){for(;mtmt?(Tt=lt,lt=null):Tt=lt.sibling;var $s=N(R,lt,Ut.value,V);if($s===null){lt===null&&(lt=Tt);break}e&<&&$s.alternate===null&&s(R,lt),A=h($s,A,mt),kt===null?ct=$s:kt.sibling=$s,kt=$s,lt=Tt}if(Ut.done)return a(R,lt),Ot&&Fn(R,mt),ct;if(lt===null){for(;!Ut.done;mt++,Ut=z.next())Ut=$(R,Ut.value,V),Ut!==null&&(A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Ot&&Fn(R,mt),ct}for(lt=c(lt);!Ut.done;mt++,Ut=z.next())Ut=I(lt,R,mt,Ut.value,V),Ut!==null&&(e&&Ut.alternate!==null&<.delete(Ut.key===null?mt:Ut.key),A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&<.forEach(function(cC){return s(R,cC)}),Ot&&Fn(R,mt),ct}function Ht(R,A,z,V){if(typeof z==`object`&&z!==null&&z.type===E&&z.key===null&&(z=z.props.children),typeof z==`object`&&z!==null){switch(z.$$typeof){case b:t:{for(var ct=z.key;A!==null;){if(A.key===ct){if(ct=z.type,ct===E){if(A.tag===7){a(R,A.sibling),V=f(A,z.props.children),V.return=R,R=V;break t}}else if(A.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&hi(ct)===A.type){a(R,A.sibling),V=f(A,z.props),ya(V,z),V.return=R,R=V;break t}a(R,A);break}else s(R,A);A=A.sibling}z.type===E?(V=li(z.props.children,R.mode,V,z.key),V.return=R,R=V):(V=Yl(z.type,z.key,z.props,null,R.mode,V),ya(V,z),V.return=R,R=V)}return S(R);case w:t:{for(ct=z.key;A!==null;){if(A.key===ct)if(A.tag===4&&A.stateNode.containerInfo===z.containerInfo&&A.stateNode.implementation===z.implementation){a(R,A.sibling),V=f(A,z.children||[]),V.return=R,R=V;break t}else{a(R,A);break}else s(R,A);A=A.sibling}V=Nu(z,R.mode,V),V.return=R,R=V}return S(R);case X:return z=hi(z),Ht(R,A,z,V)}if(ht(z))return rt(R,A,z,V);if(et(z)){if(ct=et(z),typeof ct!=`function`)throw Error(r(150));return z=ct.call(z),ft(R,A,z,V)}if(typeof z.then==`function`)return Ht(R,A,Pl(z),V);if(z.$$typeof===O)return Ht(R,A,Xl(R,z),V);to(R,z)}return typeof z==`string`&&z!==``||typeof z==`number`||typeof z==`bigint`?(z=``+z,A!==null&&A.tag===6?(a(R,A.sibling),V=f(A,z),V.return=R,R=V):(a(R,A),V=ju(z,R.mode,V),V.return=R,R=V),S(R)):a(R,A)}return function(R,A,z,V){try{ga=0;var ct=Ht(R,A,z,V);return tr=null,ct}catch(lt){if(lt===Pi||lt===Zl)throw lt;var kt=Xe(29,lt,null,R.mode);return kt.lanes=V,kt.return=R,kt}}}var pi=Fg(!0),Zg=Fg(!1),As=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xu(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Os(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rs(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(zt&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=Gl(e),zg(e,null,a),s}return $l(e,c,s,a),Gl(e)}function ma(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Kp(e,a)}}function Fu(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var Zu=!1;function Sa(){if(Zu){var e=Wi;if(e!==null)throw e}}function va(e,s,a,c){Zu=!1;var f=e.updateQueue;As=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,j=x.next;x.next=null,S===null?h=j:S.next=j,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=j:C.next=j,K.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,K=j=x=null,C=h;do{var N=C.lane&-536870913,I=N!==C.lane;if(I?(_t&N)===N:(c&N)===N){N!==0&&N===Zi&&(Zu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;N=s;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,N);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,N=typeof rt==`function`?rt.call(Ht,$,N):rt,N==null)break t;$=m({},$,N);break t;case 2:As=!0}}N=C.callback,N!==null&&(e.flags|=64,I&&(e.flags|=8192),I=f.callbacks,I===null?f.callbacks=[N]:I.push(N))}else I={lane:N,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(j=K=I,x=$):K=K.next=I,S|=N;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;I=C,C=I.next,I.next=null,f.lastBaseUpdate=I,f.shared.pending=null}}while(!0);K===null&&(x=$),f.baseState=x,f.firstBaseUpdate=j,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),zs|=S,e.lanes=S,e.memoizedState=$}}function Wg(e,s){if(typeof e!=`function`)throw Error(r(191,e));e.call(s)}function Pg(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=U.T,C={};U.T=C,mf(e,!1,s,a);try{var x=f(),j=U.S;if(j!==null&&j(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var K=WE(x,c);Ea(e,s,K,tn(e))}else Ea(e,s,c,tn(e))}catch($){Ea(e,s,{then:function(){},status:`rejected`,reason:$},tn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),U.T=S}}function i1(){}function gf(e,s,a,c){if(e.tag!==5)throw Error(r(476));var f=My(e).queue;Dy(e,f,s,W,a===null?i1:function(){return ky(e),a(c)})}function My(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:W},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&&(e.memoizedState=s),s}function ky(e){var s=My(e);s.next===null&&(s=e.alternate.memoizedState),Ea(e,s.next.queue,{},tn())}function yf(){return xe(Ia)}function Uy(){return te().memoizedState}function zy(){return te().memoizedState}function r1(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=tn();e=Os(a);var c=Rs(s,e,a);c!==null&&(Ke(c,s,a),ma(c,s,a)),s={cache:$u()},e.payload=s;return}s=s.return}}function a1(e,s,a){var c=tn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},uo(e)?Ny(s,a):(a=Uu(e,s,a,c),a!==null&&(Ke(a,e,c),By(a,s,c)))}function jy(e,s,a){var c=tn();Ea(e,s,a,c)}function Ea(e,s,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(uo(e))Ny(s,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var S=s.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,Je(C,S))return $l(e,s,f,0),Kt===null&&Vl(),!1}catch{}if(a=Uu(e,s,f,c),a!==null)return Ke(a,e,c),By(a,s,c),!0}return!1}function mf(e,s,a,c){if(c={lane:2,revertLane:Xf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},uo(e)){if(s)throw Error(r(479))}else s=Uu(e,a,c,2),s!==null&&Ke(s,e,2)}function uo(e){var s=e.alternate;return e===yt||s!==null&&s===yt}function Ny(e,s){nr=so=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function By(e,s,a){if((a&4194048)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Kp(e,a)}}var Ca={readContext:xe,use:ao,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var Ly={readContext:xe,use:ao,useCallback:function(e,s){return Me().memoizedState=[e,s===void 0?null:s],e},useContext:xe,useEffect:by,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,oo(4194308,4,_y.bind(null,s,e),a)},useLayoutEffect:function(e,s){return oo(4194308,4,e,s)},useInsertionEffect:function(e,s){oo(4,2,e,s)},useMemo:function(e,s){var a=Me();s=s===void 0?null:s;var c=e();if(gi){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,s],c},useReducer:function(e,s,a){var c=Me();if(a!==void 0){var f=a(s);if(gi){ws(!0);try{a(s)}finally{ws(!1)}}}else f=s;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=a1.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var s=Me();return e={current:e},s.memoizedState=e},useState:function(e){e=uf(e);var s=e.queue,a=jy.bind(null,yt,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:df,useDeferredValue:function(e,s){var a=Me();return pf(a,e,s)},useTransition:function(){var e=uf(!1);return e=Dy.bind(null,yt,e.queue,!0,!1),Me().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var c=yt,f=Me();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),Kt===null)throw Error(r(349));(_t&127)!==0||ry(c,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,by(ly.bind(null,c,h,e),[e]),c.flags|=2048,ir(9,{destroy:void 0},ay.bind(null,c,h,a,s),null),a},useId:function(){var e=Me(),s=Kt.identifierPrefix;if(Ot){var a=Mn,c=Dn;a=(c&~(1<<32-Qe(c)-1)).toString(32)+a,s=`_`+s+`R_`+a,a=io++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=s,h[Ne]=c;t:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break t;for(;S.sibling===null;){if(S.return===null||S.return===s)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&ns(s)}}return Yt(s),Mf(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&&s.stateNode!=null)e.memoizedProps!==c&&ns(s);else{if(typeof c!=`string`&&s.stateNode===null)throw Error(r(166));if(e=it.current,Xi(s)){if(e=s.stateNode,a=s.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=s,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||s0(e.nodeValue,a)),e||_s(s,!0)}else e=Mo(e).createTextNode(c),e[Ee]=s,s.stateNode=e}return Yt(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(c=Xi(s),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),e=!1}else a=Hu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&256?(Ze(s),s):(Ze(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Xi(s),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),f=!1}else f=Hu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(Ze(s),s):(Ze(s),null)}return Ze(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(s.child.flags|=8192),yo(s,s.updateQueue),Yt(s),null);case 4:return bt(),e===null&&Pf(s.stateNode.containerInfo),Yt(s),null;case 10:return Wn(s.type),Yt(s),null;case 19:if(H(Pt),c=s.memoizedState,c===null)return Yt(s),null;if(f=(s.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Ft!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(h=no(e),h!==null){for(s.flags|=128,_a(c,!1),e=h.updateQueue,s.updateQueue=e,yo(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)jg(a,e),a=a.sibling;return Q(Pt,Pt.current&1|2),Ot&&Fn(s,c.treeForkCount),s.child}e=e.sibling}c.tail!==null&&de()>bo&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304)}else{if(!f)if(e=no(h),e!==null){if(s.flags|=128,f=!0,e=e.updateQueue,s.updateQueue=e,yo(s,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(s),null}else 2*de()-c.renderingStartTime>bo&&a!==536870912&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304);c.isBackwards?(h.sibling=s.child,s.child=h):(e=c.last,e!==null?e.sibling=h:s.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=de(),e.sibling=null,a=Pt.current,Q(Pt,f?a&1|2:a&1),Ot&&Fn(s,c.treeForkCount),e):(Yt(s),null);case 22:case 23:return Ze(s),Pu(),c=s.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),a=s.updateQueue,a!==null&&yo(s,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),e!==null&&H(fi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),Wn(se),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function f1(e,s){switch(Lu(s),s.tag){case 1:return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return Wn(se),bt(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 26:case 27:case 5:return Ge(s),null;case 31:if(s.memoizedState!==null){if(Ze(s),s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 13:if(Ze(s),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return H(Pt),null;case 4:return bt(),null;case 10:return Wn(s.type),null;case 22:case 23:return Ze(s),Pu(),e!==null&&H(fi),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 24:return Wn(se),null;case 25:return null;default:return null}}function om(e,s){switch(Lu(s),s.tag){case 3:Wn(se),bt();break;case 26:case 27:case 5:Ge(s);break;case 4:bt();break;case 31:s.memoizedState!==null&&Ze(s);break;case 13:Ze(s);break;case 19:H(Pt);break;case 10:Wn(s.type);break;case 22:case 23:Ze(s),Pu(),e!==null&&H(fi);break;case 24:Wn(se)}}function Ta(e,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Nt(s,s.return,C)}}function ks(e,s,a){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=s;var x=a,j=C;try{j()}catch(K){Nt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Nt(s,s.return,K)}}function cm(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{Pg(s,a)}catch(c){Nt(e,e.return,c)}}}function um(e,s,a){a.props=yi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Nt(e,s,c)}}function Aa(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Nt(e,s,f)}}function kn(e,s){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Nt(e,s,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Nt(e,s,f)}else a.current=null}function fm(e){var s=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(s){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Nt(e,e.return,f)}}function kf(e,s,a){try{var c=e.stateNode;U1(c,e.type,a,s),c[Ne]=s}catch(f){Nt(e,e.return,f)}}function hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Is(e.type)||e.tag===4}function Uf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||hm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Is(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zf(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Qn));else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode,s=null),e=e.child,e!==null))for(zf(e,s,a),e=e.sibling;e!==null;)zf(e,s,a),e=e.sibling}function mo(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,s,a),e=e.sibling;e!==null;)mo(e,s,a),e=e.sibling}function dm(e){var s=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);Te(s,c,a),s[Ee]=e,s[Ne]=a}catch(h){Nt(e,e.return,h)}}var ss=!1,ae=!1,jf=!1,pm=typeof WeakSet==`function`?WeakSet:Set,ge=null;function h1(e,s){if(e=e.containerInfo,nh=Lo,e=Tg(e),Au(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,j=0,K=0,$=e,N=null;e:for(;;){for(var I;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(I=$.firstChild)!==null;)N=$,$=I;for(;;){if($===e)break e;if(N===a&&++j===f&&(C=S),N===h&&++K===c&&(x=S),(I=$.nextSibling)!==null)break;$=N,N=$.parentNode}$=I}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(sh={focusedElem:e,selectionRange:a},Lo=!1,ge=s;ge!==null;)if(s=ge,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,ge=e;else for(;ge!==null;){switch(s=ge,h=s.alternate,e=s.flags,s.tag){case 0:if((e&4)!==0&&(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,pe(h),c=h;break t;case`link`:var S=w0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=xg(C,ft),A=xg(C,Ht);if(R&&A&&(I.rangeCount!==1||I.anchorNode!==R.node||I.anchorOffset!==R.offset||I.focusNode!==A.node||I.focusOffset!==A.offset)){var z=$.createRange();z.setStart(R.node,R.offset),I.removeAllRanges(),ft>Ht?(I.addRange(z),I.extend(A.node,A.offset)):(z.setEnd(A.node,A.offset),I.addRange(z))}}}}for($=[],I=C;I=I.parentNode;)I.nodeType===1&&$.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var V=$[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Lo=!!nh,sh=nh=null}finally{zt=f,q.p=c,U.T=a}}e.current=s,ce=2}}function qm(){if(ce===2){ce=0;var e=Ns,s=cr,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var c=q.p;q.p=2;var f=zt;zt|=4;try{gm(e,s.alternate,s)}finally{zt=f,q.p=c,U.T=a}}ce=3}}function Km(){if(ce===4||ce===3){ce=0,rn();var e=Ns,s=cr,a=os,c=Om;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ce=5:(ce=0,cr=Ns=null,Vm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(js=null),ou(a),s=s.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Zr,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=U.T,f=q.p,q.p=2,U.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,U.T=null,a=Kf,Kf=null;var h=Ns,S=os;if(ce=0,cr=Ns=null,os=0,(zt&6)!==0)throw Error(r(331));var C=zt;if(zt|=4,_m(h.current),Em(h,h.current,S,a),zt=C,Ua(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,U.T=c,Vm(e,s)}}function Gm(e,s,a){s=cn(a,s),s=bf(e.stateNode,s,2),e=Rs(e,s,2),e!==null&&(Pr(e,2),Un(e))}function Nt(e,s,a){if(e.tag===3)Gm(e,e,a);else for(;s!==null;){if(s.tag===3){Gm(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(js===null||!js.has(c))){e=cn(a,e),a=Yy(2),c=Rs(s,a,2),c!==null&&(Qy(a,c,s,e),Pr(c,2),Un(c));break}}s=s.return}}function Yf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new g1;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(a)||(Lf=!0,f.add(a),e=w1.bind(null,e,s,a),s.then(e,e))}function w1(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Kt===e&&(_t&a)===a&&(Ft===4||Ft===3&&(_t&62914560)===_t&&300>de()-wo?(zt&2)===0&&ur(e,0):If|=a,or===_t&&(or=0)),Un(e)}function Ym(e,s){s===0&&(s=Hp()),e=ai(e,s),e!==null&&(Pr(e,s),Un(e))}function b1(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Ym(e,a)}function E1(e,s){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Ym(e,a)}function C1(e,s){return pt(e,s)}var Ao=null,hr=null,Qf=!1,Oo=!1,Jf=!1,Ls=0;function Un(e){e!==hr&&e.next===null&&(hr===null?Ao=hr=e:hr=hr.next=e),Oo=!0,Qf||(Qf=!0,_1())}function Ua(e,s){if(!Jf&&Oo){Jf=!0;do for(var a=!1,c=Ao;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Qe(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Fm(c,h))}else h=_t,h=Ml(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Fm(c,h));c=c.next}while(a);Jf=!1}}function x1(){Qm()}function Qm(){Oo=Qf=!1;var e=0;Ls!==0&&j1()&&(e=Ls);for(var s=de(),a=null,c=Ao;c!==null;){var f=c.next,h=Jm(c,s);h===0?(c.next=null,a===null?Ao=f:a.next=f,f===null&&(hr=a)):(a=c,(e!==0||(h&3)!==0)&&(Oo=!0)),c=f}ce!==0&&ce!==5||Ua(e),Ls!==0&&(Ls=0)}function Jm(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,$=x.initiatorType;K&&i0($)&&(x=x.responseEnd,S+=K*(x`u`?null:document;function y0(e,s,a){var c=dr;if(c&&typeof s==`string`&&s){var f=ln(s);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),g0.has(f)||(g0.add(f),e={rel:e,crossOrigin:a,href:s},c.querySelector(f)===null&&(s=c.createElement(`link`),Te(s,`link`,e),pe(s),c.head.appendChild(s)))}}function $1(e){cs.D(e),y0(`dns-prefetch`,e,null)}function G1(e,s){cs.C(e,s),y0(`preconnect`,e,s)}function Y1(e,s,a){cs.L(e,s,a);var c=dr;if(c&&e&&s){var f=`link[rel="preload"][as="`+ln(s)+`"]`;s===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+ln(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+ln(a.imageSizes)+`"]`)):f+=`[href="`+ln(e)+`"]`;var h=f;switch(s){case`style`:h=pr(e);break;case`script`:h=gr(e)}gn.has(h)||(e=m({rel:`preload`,href:s===`image`&&a&&a.imageSrcSet?void 0:e,as:s},a),gn.set(h,e),c.querySelector(f)!==null||s===`style`&&c.querySelector(Ba(h))||s===`script`&&c.querySelector(La(h))||(s=c.createElement(`link`),Te(s,`link`,e),pe(s),c.head.appendChild(s)))}}function Q1(e,s){cs.m(e,s);var a=dr;if(a&&e){var c=s&&typeof s.as==`string`?s.as:`script`,f=`link[rel="modulepreload"][as="`+ln(c)+`"][href="`+ln(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=gr(e)}if(!gn.has(h)&&(e=m({rel:`modulepreload`,href:e},s),gn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),Te(c,`link`,e),pe(c),a.head.appendChild(c)}}}function J1(e,s,a){cs.S(e,s,a);var c=dr;if(c&&e){var f=Ni(c).hoistableStyles,h=pr(e);s=s||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":s},a),(a=gn.get(h))&&uh(e,a);var x=S=c.createElement(`link`);pe(x),Te(x,`link`,e),x._p=new Promise(function(j,K){x.onload=j,x.onerror=K}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Uo(S,s,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function X1(e,s){cs.X(e,s);var a=dr;if(a&&e){var c=Ni(a).hoistableScripts,f=gr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=m({src:e,async:!0},s),(s=gn.get(f))&&fh(e,s),h=a.createElement(`script`),pe(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function F1(e,s){cs.M(e,s);var a=dr;if(a&&e){var c=Ni(a).hoistableScripts,f=gr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=m({src:e,async:!0,type:`module`},s),(s=gn.get(f))&&fh(e,s),h=a.createElement(`script`),pe(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function m0(e,s,a,c){var f=(f=it.current)?ko(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(s=pr(a.href),a=Ni(f).hoistableStyles,c=a.get(s),c||(c={type:`style`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=pr(a.href);var h=Ni(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),gn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},gn.set(e,a),h||Z1(f,e,a,S.state))),s&&c===null)throw Error(r(528,``));return S}if(s&&c!==null)throw Error(r(529,``));return null;case`script`:return s=a.async,a=a.src,typeof a==`string`&&s&&typeof s!=`function`&&typeof s!=`symbol`?(s=gr(a),a=Ni(f).hoistableScripts,c=a.get(s),c||(c={type:`script`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function pr(e){return`href="`+ln(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function S0(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Z1(e,s,a,c){e.querySelector(`link[rel="preload"][as="style"][`+s+`]`)?c.loading=1:(s=e.createElement(`link`),c.preload=s,s.addEventListener(`load`,function(){return c.loading|=1}),s.addEventListener(`error`,function(){return c.loading|=2}),Te(s,`link`,a),pe(s),e.head.appendChild(s))}function gr(e){return`[src="`+ln(e)+`"]`}function La(e){return`script[async]`+e}function v0(e,s,a){if(s.count++,s.instance===null)switch(s.type){case`style`:var c=e.querySelector(`style[data-href~="`+ln(a.href)+`"]`);if(c)return s.instance=c,pe(c),c;var f=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),pe(c),Te(c,`style`,f),Uo(c,a.precedence,e),s.instance=c;case`stylesheet`:f=pr(a.href);var h=e.querySelector(Ba(f));if(h)return s.state.loading|=4,s.instance=h,pe(h),h;c=S0(a),(f=gn.get(f))&&uh(c,f),h=(e.ownerDocument||e).createElement(`link`),pe(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),s.state.loading|=4,Uo(h,a.precedence,e),s.instance=h;case`script`:return h=gr(a.src),(f=e.querySelector(La(h)))?(s.instance=f,pe(f),f):(c=a,(f=gn.get(h))&&(c=m({},a),fh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),pe(f),Te(f,`link`,c),e.head.appendChild(f),s.instance=f);case`void`:return null;default:throw Error(r(443,s.type))}else s.type===`stylesheet`&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,Uo(c,a.precedence,e));return s.instance}function Uo(e,s,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function W1(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof s.precedence!=`string`||typeof s.href!=`string`||s.href===``)break;return!0;case`link`:if(typeof s.rel!=`string`||typeof s.href!=`string`||s.href===``||s.onLoad||s.onError)break;switch(s.rel){case`stylesheet`:return e=s.disabled,typeof s.precedence==`string`&&e==null;default:return!0}case`script`:if(s.async&&typeof s.async!=`function`&&typeof s.async!=`symbol`&&!s.onLoad&&!s.onError&&s.src&&typeof s.src==`string`)return!0}return!1}function E0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function P1(e,s,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=pr(c.href),h=s.querySelector(Ba(f));if(h){s=h._p,s!==null&&typeof s==`object`&&typeof s.then==`function`&&(e.count++,e=jo.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=h,pe(h);return}h=s.ownerDocument||s,c=S0(c),(f=gn.get(f))&&uh(c,f),h=h.createElement(`link`),pe(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=jo.bind(e),s.addEventListener(`load`,a),s.addEventListener(`error`,a))}}var hh=0;function tC(e,s){return e.stylesheets&&e.count===0&&Bo(e,e.stylesheets),0hh?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function Bo(e,s){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,s.forEach(eC,e),No=null,jo.call(e))}function eC(e,s){if(!(s.state.loading&4)){var a=No.get(e);if(a)var c=a.get(null);else{a=new Map,No.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),wh.exports=SC(),wh.exports}var wC=vC(),Z=Gd();const bC={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk3NjY0NH0.F67aNfIfZTYJHWg1hI8aFjlXlWqRRv1R9XdnRpRPCLg`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTc2NjU4fQ.hP1i-w7N4NIYQUXGSMJDh8kL6JJaTTmh84Ha2e7qVbk`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},Mv=Z.createContext(null);function Yd(){const n=Z.useContext(Mv);if(!n)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return n}function Go(n){const t=bC[n];if(!t)throw new Error(`Missing environment variable: ${n}`);return t}function EC({children:n}){const t=Go(`VITE_YJS_URL`),i=Go(`VITE_DS_URL`),r=Z.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_YJS_TOKEN`)}`}),[]),l=Z.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_DS_TOKEN`)}`}),[]),o=Z.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Y.jsx(Mv.Provider,{value:o,children:n})}var Yo={exports:{}},_h,Y0;function CC(){if(Y0)return _h;Y0=1;function n(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return _h=n,_h}var Q0;function xC(){if(Q0)return Yo.exports;Q0=1;var n=CC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=n(r),g=null,y=null,m=0,v=null,b={push:M,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(F){if(!(F>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=F,!b.paused)for(;g&&m=d||b.paused?y?(y.next=et,y=et):(g=et,y=et,b.saturated()):(m++,u.call(o,et.value,et.worked))}function G(F,at){var et=p.get();et.context=o,et.release=k,et.value=F,et.callback=at||i,et.errorHandler=v,m>=d||b.paused?g?(et.next=g,g=et):(g=et,y=et,b.saturated()):(m++,u.call(o,et.value,et.worked))}function k(F){F&&p.release(F);var at=g;at&&m<=d?b.paused?m--:(y===g&&(y=null),g=at.next,at.next=null,u.call(o,at.value,at.worked),y===null&&b.empty()):--m===0&&b.drain()}function L(){g=null,y=null,b.drain=i}function X(){g=null,y=null,b.drain(),b.drain=i}function tt(F){v=F}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,y=o.errorHandler,m=o.value;o.value=null,o.callback=i,o.errorHandler&&y(d,m),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(B){T(null,B)},T)}var g=t(o,p,d),y=g.push,m=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(B,D){y(E,function(O,M){if(O){D(O);return}B(M)})});return T.catch(i),T}function b(E){var T=new Promise(function(B,D){m(E,function(O,M){if(O){D(O);return}B(M)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var B=g.drain;g.drain=function(){typeof B==`function`&&B(),T(),g.drain=B}}})});return E}}return Yo.exports=t,Yo.exports.promise=l,Yo.exports}var _C=xC();const kv=uC(_C),_n=`Stream-Next-Offset`,Ic=`Stream-Cursor`,Hc=`Stream-Up-To-Date`,Nn=`Stream-Closed`,Th=`Stream-Seq`,TC=`Stream-TTL`,AC=`Stream-Expires-At`,J0=`Producer-Id`,Qo=`Producer-Epoch`,X0=`Producer-Seq`,OC=`Producer-Expected-Seq`,RC=`Producer-Received-Seq`,Ah=`offset`,Jo=`live`,DC=`stream-sse-data-encoding`;var Fs=class Uv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new Uv(r,o,u,l,i)}},Qd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Wt=class od extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=F0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new od(d,u,r,l)}static fromFetchError(t){const i=F0(t.status);return new od(t.message,i,t.status,t.json??t.text)}};function F0(n){switch(n){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var MC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},zv=class extends Wt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(n,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,n),this.name=`StreamClosedError`,this.finalOffset=t}},kC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const UC=[429,503],Jd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function zC(n){if(!n)return 0;const t=Number(n);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(n);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function jv(n,t=Jd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],y=p[1];let m=i,v=0;for(;;)try{const b=await n(...p);if(b.ok)return b;throw await Fs.fromResponse(b,g.toString())}catch(b){if(u?.(),y?.signal?.aborted)throw new Qd;if(b instanceof Fs&&!UC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Fs?zC(b.headers[`retry-after`]):0,E=Math.random()*m,T=Math.min(E,r),B=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${B}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,B)),m=Math.min(m*l,r)}}}}const jC=[201,204,205];function NC(n){return async(...t)=>{const i=t[0],r=await n(...t);try{if(r.status<200||jC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Qd:new Fs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function BC(n){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof n[Symbol.asyncIterator]==`function`}function LC(n){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof n[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(n,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(n,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Oh(n){return BC(n)||LC(n),n}async function*Z0(n,t){const i=n.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=l.split(` +`);l=g.pop()??``;for(const y of g)if(y===``){if(o.type&&o.data.length>0){const m=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:m};else if(o.type===`control`)try{const v=JSON.parse(m);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(y.startsWith(`event:`)){const m=y.slice(6);o.type=m.startsWith(` `)?m.slice(1):m}else if(y.startsWith(`data:`)){const m=y.slice(5);o.data.push(m.startsWith(` `)?m.slice(1):m)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Xd=class{shouldContinueLive(n,t){return!(n&&this.upToDate||t===!1||this.streamClosed)}},Nv=class cd extends Xd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new cd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new cd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Fd(this)}},Rh=class wr extends Xd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new wr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new wr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new Nv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Fd(this)}},Fd=class ud extends Xd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new ud(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new ud(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const W0=`PAUSE_STREAM`;var IC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(n){this.url=n.url,this.contentType=n.contentType,this.live=n.live,this.startOffset=n.startOffset;const t={offset:n.initialOffset,cursor:n.initialCursor,upToDate:n.initialUpToDate,streamClosed:n.initialStreamClosed};this.#i=n.startSSE?new Rh(t):new Nv(t),this.#t=n.firstResponse.headers,this.#e=n.firstResponse.status,this.#n=n.firstResponse.statusText,this.#s=n.firstResponse.ok,this.#a=!1,this.#c=n.isJsonMode,this.#l=n.abortController,this.#p=n.fetchNext,this.#d=n.startSSE,this.#v={minConnectionDuration:n.sseResilience?.minConnectionDuration??1e3,maxShortConnections:n.sseResilience?.maxShortConnections??3,backoffBaseDelay:n.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:n.sseResilience?.backoffMaxDelay??5e3,logWarnings:n.sseResilience?.logWarnings??!0},this.#E=n.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(n.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const n=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,n),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,n)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(n=>{this.#S=n}),this.#u?.abort(W0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Fd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Wt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(n){this.#b?.(),this.#f(n)}#w(n){if(this.#x!==null)throw new Wt(`Cannot call ${n}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=n}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(n){this.#i=this.#i.withResponseMetadata({offset:n.headers.get(_n)||void 0,cursor:n.headers.get(Ic)||void 0,upToDate:n.headers.has(Hc),streamClosed:n.headers.get(Nn)?.toLowerCase()===`true`}),this.#t=n.headers,this.#e=n.status,this.#n=n.statusText,this.#s=n.ok}#U(n){this.#i=this.#i.withSSEControl(n)}#z(){this.#i instanceof Rh||(this.#i=new Rh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const n=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=n.state,n.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(n.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,n.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?Z0(t.body,this.#u.signal):null}async#B(n){const{done:t,value:i}=await n.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,n):(this.#U(i),i.upToDate?{type:`response`,response:qC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(n,t){const i=[n];for(;;){const{done:r,value:l}=await t.next();if(r){const o=fd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:fd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(n){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(n.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&n.body)this.#z(),this.#u=new AbortController,i=Z0(n.body,this.#u.signal);else{if(r.enqueue(n),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===W0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const n=this.#C(),t=[];try{let r=await n.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await n.read()}}finally{n.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Wt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:n,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),n}bodyStream(){return this.#w(`bodyStream`),Oh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const n=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await n.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const y=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${y}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await n.read()}this.#r(),r.close()},cancel:()=>{n.releaseLock(),this.cancel()}});return Oh(i)}textStream(){this.#w(`textStream`);const n=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(n.decode(i,{stream:!0}))},flush(i){const r=n.decode();r&&i.enqueue(r)}}));return Oh(t)}subscribeJson(n){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),m=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(m)}catch(w){const E=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await n({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(n){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),y=await o.arrayBuffer();await n({data:new Uint8Array(y),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(n){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),y=await o.text();await n({text:y,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(n){this.#l.abort(n),this.#b?.(),this.#r()}get closed(){return this.#g}};function Dh(n,t,i,r){const l=n.headers.get(_n),o=n.headers.get(Ic),u=n.headers.has(Hc),d=n.headers.get(Nn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function HC(n){const t=n.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Wt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;lm.length>0).map(m=>HC(m));if(y.length===0)g=new ArrayBuffer(0);else if(y.length===1){const m=y[0];g=m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}else{const m=y.reduce((w,E)=>w+E.length,0),v=new Uint8Array(m);let b=0;for(const w of y)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const y=[];for(const m of n){const v=m.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&y.push(b)}else y.push(v)}g=`[${y.join(`,`)}]`}else g=n.join(``);return new Response(g,{status:200,headers:p})}async function Za(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function hs(n,t,i){const r=n.status;if(r===404)throw new Wt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(n.headers.get(Nn)?.toLowerCase()===`true`){const d=n.headers.get(_n)??void 0;throw new zv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Wt(o,u,409)}throw r===400?new Wt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Wt.fromResponse(n,t)}async function nc(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const P0=new Set;function KC(){if(!(typeof process>`u`))return`production`}function VC(){return typeof globalThis.window<`u`}function $C(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function GC(n){try{return new URL(n)}catch{const t=$C();if(t)try{return new URL(n,t)}catch{return}return}}function Bv(n,t){if(t===!1||KC()===`test`||!VC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=n instanceof URL?n.toString():n,l=GC(r);l&&l.protocol===`http:`&&(P0.has(l.origin)||(P0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function YC(n){if(!n.url)throw new Wt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=n.headers,i=n.params;for(;;)try{return await QC({...n,headers:t,params:i})}catch(r){if(n.onError){const l=await n.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function QC(n){const t=n.url instanceof URL?n.url.toString():n.url;Bv(t,n.warnOnHttp);const i=new URL(t),r=n.offset??`-1`;i.searchParams.set(Ah,r);const l=n.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Jo,l);const o=await nc(n.params);for(const[k,L]of Object.entries(o))i.searchParams.set(k,L);const u=await Za(n.headers),d=new AbortController;n.signal&&n.signal.addEventListener(`abort`,()=>d.abort(n.signal?.reason),{once:!0});const p=n.fetch??((...k)=>fetch(...k)),g=n.backoffOptions??Jd,y=jv(p,g);let m;try{m=await y(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(k){throw k instanceof Qd?new Wt(`Stream request was aborted`,`UNKNOWN`):k}const v=m.headers.get(`content-type`)??void 0,b=m.headers.get(_n)??r,w=m.headers.get(Ic)??void 0,E=m.headers.has(Hc),T=m.headers.get(Nn)?.toLowerCase()===`true`,B=n.json===!0||(v?.includes(`application/json`)??!1),O=m.headers.get(DC)===`base64`?`base64`:void 0,M=async(k,L,X,tt)=>{const F=new URL(t);F.searchParams.set(Ah,k),tt||(l===`sse`?F.searchParams.set(Jo,`sse`):(l===!0||l===`long-poll`)&&F.searchParams.set(Jo,`long-poll`)),L&&F.searchParams.set(`cursor`,L);const at=await nc(n.params);for(const[Bt,ht]of Object.entries(at))F.searchParams.set(Bt,ht);const et=await Za(n.headers),wt=await y(F.toString(),{method:`GET`,headers:et,signal:X});return wt.ok||await hs(wt,t),wt},G=l===`sse`?async(k,L,X)=>{const tt=new URL(t);tt.searchParams.set(Ah,k),tt.searchParams.set(Jo,`sse`),L&&tt.searchParams.set(`cursor`,L);const F=await nc(n.params);for(const[wt,Bt]of Object.entries(F))tt.searchParams.set(wt,Bt);const at=await Za(n.headers),et=await y(tt.toString(),{method:`GET`,headers:at,signal:X});return et.ok||await hs(et,t),et}:void 0;return new IC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:B,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:m,abortController:d,fetchNext:M,startSSE:G,sseResilience:n.sseResilience,encoding:O})}var tS=class extends Error{currentEpoch;constructor(n){super(`Producer epoch is stale. Current server epoch: ${n}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=n}},JC=class extends Error{expectedSeq;receivedSeq;constructor(n,t){super(`Producer sequence gap: expected ${n}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=n,this.receivedSeq=t}};function eS(n){return n?n.split(`;`)[0].trim().toLowerCase():``}var Lv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(n,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=n,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=kv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Wt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(n){if(this.#o)throw new Wt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof n==`string`)t=new TextEncoder().encode(n);else if(n instanceof Uint8Array)t=n;else throw new Wt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(n){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=n,await this.flush();const t=await this.#v(n);return this.#u=t,t}async#v(n){const t=this.#t.contentType??`application/octet-stream`,i=eS(t)===`application/json`;let r;if(n!==void 0){const g=typeof n==`string`?new TextEncoder().encode(n):n;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[J0]:this.#e,[Qo]:this.#n.toString(),[X0]:l.toString(),[Nn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===403){const g=d.headers.get(Qo),y=g?parseInt(g,10):this.#n;if(this.#a){const m=y+1;return this.#n=m,this.#s=0,this.#v(n)}throw new tS(y)}throw await Fs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const n=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:n,seq:t}).catch(()=>{})}):this.#y.push({batch:n,seq:t}).catch(()=>{})}async#O(n){const{batch:t,seq:i}=n,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(n,t,i){let r=this.#S.get(n);r||(r=new Map,this.#S.set(n,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(n,t,i){const r=this.#t.contentType??`application/octet-stream`,l=eS(r)===`application/json`;let o;if(l)o=`[${n.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const m=n.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(m);let b=0;for(const w of n)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[J0]:this.#e,[Qo]:i.toString(),[X0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(_n)??``,duplicate:!1};if(g.status===403){const m=g.headers.get(Qo),v=m?parseInt(m,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(n,0,b)}throw new tS(v)}if(g.status===409){const m=g.headers.get(OC),v=m?parseInt(m,10):0;if(v0&&this.#d(n),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Mh(n){return n?n.split(`;`)[0].trim().toLowerCase():``}function XC(n){return n!=null&&typeof n.then==`function`}var jn=class Ya{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){WC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=kv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Jd},l=jv(this.#n,r);this.#e=NC(l)}static async create(t){const i=new Ya(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ya(t);return await i.head(),i}static async head(t){return new Ya(t).head()}static async delete(t){return new Ya(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await hs(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(_n)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(Nn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[TC]=String(t.ttlSeconds)),t?.expiresAt&&(i[AC]=t.expiresAt),t?.closed&&(i[Nn]=`true`);const o=FC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await hs(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await hs(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[Nn]=`true`;let o;t?.body!==void 0&&(Mh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(Nn)?.toLowerCase()===`true`){const g=u.headers.get(_n)??void 0;throw new zv(this.url,g)}return u.ok||await hs(u,this.url),{finalOffset:u.headers.get(_n)??``}}async append(t,i){const r=XC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Th]=i.seq);const u=Mh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await hs(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let m=t.length-1;m>=0;m--)if(t[m].seq!==void 0){o=t[m].seq;break}o&&(i[Th]=o);const u=Mh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const m=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(m&&!v){const b=t.map(B=>B.data),w=b.reduce((B,D)=>B+D.length,0),E=new Uint8Array(w);let T=0;for(const B of b)E.set(B,T),T+=B.length;d=E}else if(v&&!m)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,O)=>D+O.length,0),T=new Uint8Array(E);let B=0;for(const D of w)T.set(D,B),B+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const m of t)m.signal&&p.push(m.signal);const g=p.length>0?AbortSignal.any(p):void 0,y=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});y.ok||await hs(y,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Th]=i.seq);const u=ZC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await hs(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new Lv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return YC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Za(this.#t.headers)}async#f(){const t=await Za(this.#t.headers),i=new URL(this.url),r=await nc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function FC(n){if(n!==void 0)return typeof n==`string`?new TextEncoder().encode(n):n instanceof Uint8Array||n instanceof Blob||n instanceof FormData||n instanceof ReadableStream||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?n:new TextEncoder().encode(JSON.stringify(n))}function ZC(n){if(n instanceof ReadableStream)return n.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=n[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function WC(n){if(!n.url)throw new MC;if(n.signal&&!(n.signal instanceof AbortSignal))throw new kC;Bv(n.url,n.warnOnHttp)}const PC=`__includes_scalar__`;class _i{}class zr extends _i{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class yn extends _i{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Re extends _i{constructor(t){super(),this.path=t,this.type=`ref`}}class Ue extends _i{constructor(t){super(),this.value=t,this.type=`val`}}class Ve extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class Iv extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class Ti extends _i{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function jr(n){return n instanceof Iv||n instanceof Ve||n instanceof Re||n instanceof Ue||n instanceof Ti}function Zd(n){return typeof n==`object`&&`expression`in n?n.expression:n}function nS(n){return typeof n==`object`&&`expression`in n?n.expression:n}function sS(n){return typeof n==`object`&&`expression`in n&&n.residual===!0}function tx(n){return{expression:n,residual:!0}}function ex(n,t){if(n.from.alias===t)return n.from;for(const i of n.join||[])if(i.from.alias===t)return i.from}function al(n,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(n.select){const l=n.select[r];if(l&&l.type===`ref`)return al(n,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=ex(n,r);return o?o.type===`queryRef`?al(o.query,new Re(l),i):{collection:o.collection,path:l}:void 0}}}class vn extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class iS extends vn{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ai extends vn{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class nx extends Ai{constructor(){super(`Collection requires a config`)}}class sx extends Ai{constructor(){super(`Collection requires a sync config`)}}class ix extends Ai{constructor(){super(`Schema must implement the standard-schema interface`)}}class rS extends Ai{constructor(){super(`Schema validation must be synchronous`)}}class bl extends vn{constructor(t){super(t),this.name=`CollectionStateError`}}class rx extends bl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class ax extends bl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class lx extends bl{constructor(){super(`Collection is in error state`)}}class ox extends bl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Vn extends vn{constructor(t){super(t),this.name=`CollectionOperationError`}}class cx extends Vn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class ux extends Vn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class fx extends Vn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class hx extends Vn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class dx extends Vn{constructor(){super(`The first argument to update is missing`)}}class px extends Vn{constructor(){super(`No keys were passed to update`)}}class gx extends Vn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class yx extends Vn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class mx extends Vn{constructor(){super(`No keys were passed to delete`)}}class Sx extends Vn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Wd extends vn{constructor(t){super(t),this.name=`MissingHandlerError`}}class vx extends Wd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class wx extends Wd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class bx extends Wd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class ys extends vn{constructor(t){super(t),this.name=`TransactionError`}}class Ex extends ys{constructor(){super(`mutationFn is required when creating a transaction`)}}class Cx extends ys{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class xx extends ys{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class _x extends ys{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class Tx extends ys{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class kh extends ys{constructor(){super(`No pending sync transaction to write to`)}}class Uh extends ys{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class Ax extends ys{constructor(){super(`No pending sync transaction to commit`)}}class Ox extends ys{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class Oi extends vn{constructor(t){super(t),this.name=`QueryBuilderError`}}class Rx extends Oi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class Dx extends Oi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class Mx extends Oi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Xo extends Oi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class kx extends Oi{constructor(){super(`Join condition must be an equality expression`)}}class Ux extends Oi{constructor(){super(`Query must have a from clause`)}}class aS extends Oi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class ze extends vn{constructor(t){super(t),this.name=`QueryCompilationError`}}class zx extends ze{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class jx extends ze{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class Nx extends ze{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class Bx extends ze{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class Lx extends ze{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Hv extends ze{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class Ix extends ze{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class Hx extends ze{constructor(t){super(`Unsupported FROM type: ${t}`)}}class qx extends ze{constructor(t){super(`Unknown expression type: ${t}`)}}class Kx extends ze{constructor(){super(`Reference path cannot be empty`)}}class Vx extends ze{constructor(t){super(`Unknown function: ${t}`)}}class lS extends ze{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Ri extends vn{constructor(t){super(t),this.name=`JoinError`}}class $x extends Ri{constructor(t){super(`Unsupported join type: ${t}`)}}class Gx extends Ri{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Yx extends Ri{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Qx extends Ri{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class Jx extends Ri{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Xx extends Ri{constructor(){super(`Invalid join condition`)}}class Fx extends Ri{constructor(t){super(`Unsupported join source type: ${t}`)}}class qc extends vn{constructor(t){super(t),this.name=`GroupByError`}}class Zx extends qc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Wx extends qc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Px extends qc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class t_ extends qc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class oS extends vn{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class e_ extends vn{constructor(t){super(t),this.name=`QueryOptimizerError`}}class n_ extends e_{constructor(){super(`Cannot combine empty expression list`)}}class s_ extends ze{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class i_ extends ze{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class r_ extends ze{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Bn(n,t){return sc(n,t,new Map)}function sc(n,t,i){if(n===t)return!0;if(n==null||t==null||typeof n!=typeof t)return!1;if(n instanceof Date)return t instanceof Date?n.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(n instanceof RegExp)return t instanceof RegExp?n.source===t.source&&n.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(n instanceof Map){if(!(t instanceof Map)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const l=Array.from(n.entries()).every(([o,u])=>t.has(o)&&sc(u,t.get(o),i));return i.delete(n),l}if(t instanceof Map)return!1;if(n instanceof Set){if(!(t instanceof Set)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Array.from(n),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(n),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(n),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)&&!(n instanceof DataView)&&!(t instanceof DataView)){const r=n,l=t;if(r.length!==l.length)return!1;for(let o=0;osc(l,t[o],i));return i.delete(n),r}if(Array.isArray(t))return!1;if(typeof n==`object`){if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Object.keys(n),l=Object.keys(t);if(r.length!==l.length)return i.delete(n),!1;const o=r.every(u=>u in t&&sc(n[u],t[u],i));return i.delete(n),o}return!1}const a_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function Zs(n){if(n==null||typeof n!=`object`)return!1;const t=n[Symbol.toStringTag];return typeof t==`string`&&a_.has(t)}const qv={direction:`asc`,nulls:`first`,stringSort:`locale`},zh=new WeakMap;let l_=1;function cS(n){if(zh.has(n))return zh.get(n);const t=l_++;return zh.set(n,t),t}const Pd=(n,t,i)=>{const{nulls:r}=i;if(n==null&&t==null)return 0;if(n==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof n==`string`&&typeof t==`string`&&i.stringSort===`locale`)return n.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(n)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof n==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=cS(n),d=cS(t);return u-d}if(l)return 1;if(o)return-1}return nt?1:0},o_=(n,t,i)=>Pd(t,n,{...i,nulls:i.nulls===`first`?`last`:`first`});function Wa(n){return(t,i)=>n.direction===`asc`?Pd(t,i,n):o_(t,i,n)}const c_=Wa({direction:`asc`,nulls:`first`,stringSort:`locale`});function u_(n,t){if(n.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?g_(n):p_(n);case`func`:return y_(n,t);default:throw new qx(n.type)}}function p_(n){const[t,...i]=n.path;if(!t)throw new Kx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function g_(n){const t=n.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function y_(n,t){const i=n.args.map(r=>tp(r,t));switch(n.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Er(r(o)),d=Er(l(o));return ye(u)||ye(d)?null:h_(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ye(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ye(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return ye(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Er(r(o)),d=l(o);return ye(u)?null:Array.isArray(d)?d.some(p=>Er(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:uS(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:uS(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=jh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=jh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=jh(d);return p?d_(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new Vx(n.name)}}function uS(n,t,i){if(typeof n!=`string`||typeof t!=`string`)return!1;const r=i?n.toLowerCase():n;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class m_{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function fS(n,t,i,r,l){const o=n;return{...n,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const hd=[`$synced`,`$origin`,`$key`,`$collectionId`];function S_(n){return hd.includes(n)}function Vv(n){return n.some(t=>S_(t))}function El(n,t,i){if(Vv(t))return;const r=i??{...qv,...n.compareOptions};for(const l of n.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new m_(l)}function v_(n){if(n.length===0)return new Set;if(n.length===1)return new Set(n[0]);let t=new Set(n[0]);for(let i=1;i=2){const o=r.split(`.`),u=El(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,y=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:v_(l)}}return{canOptimize:!1,matchingKeys:new Set}}function __(n,t){if(n.type!==`func`||n.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of n.args){const l=ep(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:w_(r)}}return{canOptimize:!1,matchingKeys:new Set}}function T_(n,t){if(n.type!==`func`||n.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=n.args[0],r=n.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=El(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const y of g)d.add(y)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function $v(n){return n.config.autoIndex===`eager`}function Kc(n,t,i,r,l){if(Vv(t)||!$v(i))return;const o=r??{...qv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function A_(n,t){if(!$v(t))return;const i=O_(n);for(const{fieldName:r,fieldPath:l}of i)Kc(r,l,t)}function O_(n){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(n),t}class R_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Nh=3e4;function Bh(n,t){if(t.length<=Nh)n.push(...t);else for(let i=0;i0)l=o;else return o}return r}class M_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof n==`string`?-1:1}function ll(n){return JSON.stringify(n,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const U_=we(),z_=we(),j_=we(),N_=we(),B_=we();function we(){return Math.random()*(2**31-1)>>>0}const Gv=new ArrayBuffer(8),L_=new DataView(Gv),Gs=new Uint8Array(Gv);class Cl{constructor(){this.hash=U_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(B_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(z_);for(let i=0;i>>8&255)}return;case`number`:L_.setFloat64(0,t,!0),this.writeByte(Gs[0]),this.writeByte(Gs[1]),this.writeByte(Gs[2]),this.writeByte(Gs[3]),this.writeByte(Gs[4]),this.writeByte(Gs[5]),this.writeByte(Gs[6]),this.writeByte(Gs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(N_)):this.update(j_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const I_=we(),H_=we(),q_=we(),K_=we(),V_=we(),$_=we(),G_=we(),Y_=we(),Q_=we(),J_=we(),X_=we(),F_=we(),Z_=we(),W_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function P_(n){const t=n[Symbol.toStringTag];return typeof t==`string`&&W_.has(t)}const tT=128,ol=new WeakMap;function ke(n){const t=new Cl;return Yv(t,n),t.digest()}function eT(n){const t=ol.get(n);if(t!==void 0)return t;let i;if(n instanceof Date)i=nT(n);else if(typeof Buffer<`u`&&n instanceof Buffer||n instanceof Uint8Array)if(n.byteLength<=tT)i=sT(n);else return pd(n);else{if(n instanceof File)return pd(n);if(P_(n))i=iT(n);else{let r=n,l=Y_;n instanceof Array&&(l=Q_),n instanceof Map&&(l=J_,r=[...n.entries()]),n instanceof Set&&(l=X_,r=[...n.entries()]),i=rT(r,l)}}return ol.set(n,i),i}function nT(n){const t=new Cl;return t.update(G_),t.update(n.getTime()),t.digest()}function sT(n){const t=new Cl;t.update(F_),t.update(n.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ee(this.#t.filter(([i,r])=>t(i)))}negate(){return new ee(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Bh(i,this.#t),Bh(i,t.getInner()),new ee(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Lh.getStringId(u)}|${Lh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Lh.getStringId(p);const y=d+`|`+g;t.set(y,(t.get(y)||0)+u),i.has(y)||i.set(y,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ee(l)}#n(){const t=new R_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const y=u?ke(p):p;u&&!i.has(y)&&i.set(y,p),t.update(y,m=>m+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const y=u?i.get(p):p;d.push([y,g])}return new ee(d)}extend(t){const i=t instanceof ee?t.getInner():t;Bh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class oT{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class On{#t=[];sendData(t){t instanceof ee||(t=new ee(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new oT(t)}}class Qv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Di extends Qv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class cT extends Qv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class np extends Di{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class uT{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new On;return new fT(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class Rn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class fT extends Rn{sendData(t){this.writer.sendData(t)}}class hT extends Di{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ee;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Jv(){return n=>{const t=new Rn(n.graph,new On),i=new hT(n.graph.getNextOperatorId(),n.connectReader(),t.writer);return n.graph.addOperator(i),t}}const Qa=Symbol(`NO_PREFIX`);class dS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Pa(t),l=this.get(r);if(ic(l)){const[o,u]=l;if(Pa(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||ke(o)===ke(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(ke(o),l),p.set(ke(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=ke(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Js{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Js;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ic(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(ic(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ic(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=Pa(r);if(d!==Qa){const p=new dS;p.set(Qa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Pa(r),p=Pa(o);if(p===d&&(o===r||ke(o)===ke(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Qa&&d===Qa){const g=new Ja;g.set(ke(o),i),g.set(ke(r),[r,l]),this.#t.set(t,g)}else{const g=new dS;if(p===d){const y=new Ja;y.set(ke(o),i),y.set(ke(r),[r,l]),g.set(p,y)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ee(i)}}function Pa(n){return Array.isArray(n)&&(typeof n[0]==`string`||typeof n[0]==`number`||typeof n[0]==`bigint`)?n[0]:Qa}function ic(n){return Array.isArray(n)}class dT extends Di{#t=new Js;#e=new Js;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,y]of u){const m=d.get(g)??0;d.set(g,m+y)}for(const[g,y]of o){const m=p.get(g)??0;p.set(g,m+y)}for(const[g,y]of p)d.has(g)||(i.push([[r,g],-y]),this.#e.addValue(r,[g,-y]));for(const[g,y]of d)p.has(g)||y!==0&&(i.push([[r,g],y]),this.#e.addValue(r,[g,y]));for(const[g,y]of d){const m=p.get(g);if(m!==void 0){const v=y-m;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ee(i))}}function Xv(n){return t=>{const i=new Rn(t.graph,new On),r=new dT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class pT extends Di{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=ke(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[ke(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[ke(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ee(i))}}function gT(n=t=>t){return t=>{const i=new Rn(t.graph,new On),r=new pT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class yT extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ps(n){return t=>{const i=new Rn(t.graph,new On),r=new yT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}const mT=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Cr(n,t,i){const r=i[0];if(t!=null&&n>=t)throw new Error(n+` >= `+t);if(n.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(n[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Cr(n.slice(u),t.slice(u),i)}const l=n?i.indexOf(n[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Cr(n.slice(1),null,i)}function Fv(n){if(n.length!==Zv(n[0]))throw new Error(`invalid integer part of order key: `+n)}function Zv(n){if(n>=`a`&&n<=`z`)return n.charCodeAt(0)-97+2;if(n>=`A`&&n<=`Z`)return 90-n.charCodeAt(0)+2;throw new Error(`invalid order key head: `+n)}function Xa(n){const t=Zv(n[0]);if(t>n.length)throw new Error(`invalid order key: `+n);return n.slice(0,t)}function pS(n,t){if(n===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+n);const i=Xa(n);if(n.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+n)}function gS(n,t){Fv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function ST(n,t){Fv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function vT(n,t,i=mT){if(n!=null&&pS(n,i),t!=null&&pS(t,i),n!=null&&t!=null&&n>=t)throw new Error(n+` >= `+t);if(n==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Cr(``,g,i);if(p{const o=n(i,l);return o!==0?o:dd(t,r)}}class sp{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=k_(o,u),g=[];p.forEach(m=>{const v=this.#t[m];v&&g.push(v)});const y=[];return d.forEach(m=>{const v=this.#t[m];v&&y.push(v)}),{moveIns:g,moveOuts:y,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:SS(this.#t[r-1]),o=r===this.#t.length?null:SS(this.#t[r]),u=vT(l,o),d=yS(t,u);if(this.#t.splice(r,0,d),rthis.#e(mS(i),mS(r)))}}class Pv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof sp))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function yc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],1])}}function mc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],-1])}}class wT extends Di{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Wv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new sp(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Pv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>yc(d,r)),u.moveOuts.forEach(d=>mc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);yc(d.moveIn,l),mc(d.moveOut,l),this.#l(o,u)}}function bT(n,t){return i=>{const r=new Rn(i.graph,new On),l=new wT(i.graph.getNextOperatorId(),i.connectReader(),r.writer,n,t);return i.graph.addOperator(l),r}}class ET extends cT{#t=new Js;#e=new Js;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Js.fromMultiSets(this.inputAMessages()),i=Js.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ee;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[g,null]],y)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#t.getIterator(l))y!==0&&r.add([l,[g,null]],p?-y:+y)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[null,g]],y)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#e.getIterator(l))y!==0&&r.add([l,[null,g]],p?-y:+y)}}}function tw(n,t=`inner`){return i=>{if(i.graph!==n.graph)throw new Error(`Cannot join streams from different graphs`);const r=new Rn(i.graph,new On),l=new ET(i.graph.getNextOperatorId(),i.connectReader(),n.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class CT extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function le(n){return t=>{const i=new Rn(t.graph,new On),r=new CT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class xT extends Di{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function gd(n){return t=>{const i=new Rn(t.graph,new On),r=new xT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class _T extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function TT(n){return t=>{const i=new Rn(t.graph,new On),r=new _T(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class AT extends Di{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Wv(l));this.#t=new Pv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new sp(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>yc(o,r)),l.moveOuts.forEach(o=>mc(o,r)),l.changes&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);yc(o.moveIn,l),mc(o.moveOut,l)}}function OT(n,t){const i=t||{};return r=>{const l=new Rn(r.graph,new On),o=new AT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,n,i);return r.graph.addOperator(o),l}}function vS(n){return`pipe`in n}function wS(n,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!vS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>vS(l))),r=>{const l=`__original_key__`;return r.pipe(le(d=>{const p=n(d),g=ll(p),y={};y[l]=p;for(const[m,v]of Object.entries(i))y[m]=v.preMap(d);return[g,y]})).pipe(Xv(d=>{let p=0;for(const[m,v]of d)p+=v;if(p<=0)return[];const g={},y=d[0]?.[0]?.[l];g[l]=y;for(const[m,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[m],E]);g[m]=v.reduce(b)}return[[g,1]]})).pipe(le(([d,p])=>{const g=p[l],y={};Object.assign(y,g);for(const[m,v]of Object.entries(i))v.postMap?y[m]=v.postMap(p[m]):y[m]=p[m];return[d,y]}))}}function RT(n=t=>t){return{preMap:t=>n(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function DT(n=t=>t){return{preMap:t=>n(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function MT(n=t=>t){return{preMap:t=>({sum:n(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function kT(n){const t=n??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const zT={sum:RT,count:DT,avg:MT,min:kT,max:UT};function jT(n,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(bT((g,y)=>d(n(g),n(y)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Jv())}function NT(n,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(n((g,y)=>d(t(g),t(y)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Jv())}function BT(n,t){return NT(OT,n,t)}const Ih=`__virtual_synced__`,Hh=`__virtual_has_local__`;function bS(n){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(n)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:LT,count:IT,avg:HT,min:qT,max:KT}=zT;function VT(n,t){const i=new Map,r=[...n];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Nr(o))continue;const u=r.findIndex(d=>Sc(o,d));if(u===-1)throw new Zx(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function ES(n,t,i,r,l,o,u){const d={[Ih]:{preMap:([,w])=>bS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Hh]:{preMap:([,w])=>bS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,O]of Object.entries(r))if(O.type===`agg`)w[D]=Zo(O);else if(Nr(O)){const{transformed:M,extracted:G}=yd(O,T);for(const[k,L]of Object.entries(G))w[k]=Zo(L);E[D]=ue(M)}}const B=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(n=n.pipe(wS(B,w)),n=n.pipe(le(([,D])=>{const M={...D.$selected||{}};if(r){for(const[F,at]of Object.entries(r))at.type===`agg`&&(M[F]=D[F]);CS(M,D,E)}const G=u?D.__correlationKey:void 0,k=G!==void 0?`single_group_${ll(G)}`:`single_group`,L={...D,$selected:M},X=D[Ih],tt=D[Hh];return L.$synced=X??!0,L.$origin=tt?`local`:`remote`,L.$key=k,L.$collectionId=o??L.$collectionId,u&&G!==void 0&&(L[u]={__correlationKey:G}),[k,L]})),i&&i.length>0)for(const D of i){const O=nS(D),M=vc(O,r||{},`$selected`),G=ue(M);n=n.pipe(ps(([,k])=>{const L={$selected:k.$selected};return _r(G(L))}))}if(l&&l.length>0)for(const D of l)n=n.pipe(ps(([,O])=>{const M={$selected:O.$selected};return _r(D(M))}));return n}const p=VT(t,r),g=t.map(w=>ue(w)),y=([,w])=>{const E={...w};delete E.$selected;const T={};for(let B=0;B{const E=w.$selected||{},T={};if(r){for(const[L,X]of Object.entries(r))if(X.type===`agg`)T[L]=w[L];else if(!v[L]){const tt=p.selectToGroupByIndex.get(L);tt!==void 0?T[L]=w[`__key_${tt}`]:T[L]=E[L]}CS(T,w,v)}else for(let L=0;L0)for(const w of i){const E=nS(w),T=vc(E,r||{}),B=ue(T);n=n.pipe(ps(([,D])=>{const O={$selected:D.$selected};return B(O)}))}if(l&&l.length>0)for(const w of l)n=n.pipe(ps(([,E])=>{const T={$selected:E.$selected};return _r(w(T))}));return n}function Sc(n,t){if(!n||!t||n.type!==t.type)return!1;switch(n.type){case`ref`:return!n.path||!t.path||n.path.length!==t.path.length?!1:n.path.every((i,r)=>i===t.path[r]);case`val`:return n.value===t.value;case`func`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Sc(i,t.args[r]));case`agg`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Sc(i,t.args[r]));default:return!1}}function Zo(n){const t=ue(n.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(n.name.toLowerCase()){case`sum`:return LT(i);case`count`:return IT(l);case`avg`:return HT(i);case`min`:return qT(r);case`max`:return KT(r);default:throw new Wx(n.name)}}function vc(n,t,i=`$selected`){switch(n.type){case`agg`:{const r=n;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&$T(r,o))return new Re([i,l]);throw new Px(r.name)}case`func`:{const r=n,l=r.args.map(o=>vc(o,t));return new Ve(r.name,l)}case`ref`:return n;case`val`:return n;default:throw new t_(n.type)}}function CS(n,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(n[r]=t[r]);for(const[r,l]of Object.entries(i))n[r]=l({$selected:n});for(const r of Object.keys(n))r.startsWith(`__agg_`)&&delete n[r]}function Nr(n){return jr(n)?n.type===`agg`?!0:n.type===`func`&&`args`in n?n.args.some(t=>Nr(t)):!1:!1}function yd(n,t){if(n.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Re([`$selected`,i]),extracted:{[i]:n}}}if(n.type===`func`){const i={},r=n.args.map(l=>{const o=yd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Ve(n.name,r),extracted:i}}return{transformed:n,extracted:{}}}function $T(n,t){return n.name===t.name&&n.args.length===t.args.length&&n.args.every((i,r)=>Sc(i,t.args[r]))}function GT(n,t,i,r,l,o,u,d,p,g){const y=i.map(E=>{const T=vc(E.expression,r,`$selected`);return{compiledExpression:ue(T),compareOptions:md(E,l)}}),m=E=>{const T=E;return i.length>1?y.map(B=>B.compiledExpression(T)):i.length===1?y[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const B=E,D=T;for(let O=0;O1?String(M.path[0]):n.from.alias}}if(B){const k=i.every(F=>F.expression.type===`ref`)?i.map(F=>{const at=F.expression,et=al(n,at,l);return ue(et?new Re(et.path):F.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(F,at)=>{if(i.length===1){const et=F&&B(F),wt=at&&B(at);return v(et,wt)}if(k){const et=wt=>wt&&k.map(Bt=>Bt(wt));return v(et(F),et(at))}return 0},valueExtractorForRawRow:F=>{if(i.length===1)return B(F);if(k)return k.map(at=>at(F))},firstColumnValueExtractor:B,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=F=>{o[tt].dataNeeded=()=>{const at=F();return Math.max(0,w.limit-at)}}}}return g?t.pipe(jT(m,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(BT(m,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function md(n,t){return n.compareOptions.stringSort!==void 0?n.compareOptions:{...t.compareOptions,direction:n.compareOptions.direction,nulls:n.compareOptions.nulls}}function YT(n,t={}){const i=r=>{const l=[];for(const[o,u]of n.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?tl(t.where):void 0,l=JT(n,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=b_(r,n);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=tl(r);return i(o)}}catch(r){console.warn(`${n.id?`[${n.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=tl(t.where);return t.optimizedOnly?void 0:i(l)}}function tl(n){const t=Kv(n);return i=>{try{const r=t(i);return _r(r)}catch{return!1}}}function QT(n,t){const i=tl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&n(l)}}function JT(n,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const m=g.path,v=md(p,n);Kc(m[0],m,n,v);const b=El(n,m,v);if(b&&b.supports(`gt`)){const w=E=>{const T=n.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of n.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const y of t){const m=Wa(y.compareOptions),v=xS(p.value,y.expression),b=xS(g.value,y.expression),w=m(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function xS(n,t){if(t.type===`ref`){const i=t;let r=n;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:Kv(t)(n)}class _S{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=dd(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const rc=`__tanstack_db_direct`;class XT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),y=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let m,v;const b=new Set;for(const D of r){for(const O of D.operations)b.add(O.key);for(const[O]of D.rowMetadataWrites)b.add(O)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const O=this.get(D);O!==void 0&&w.set(D,O)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,B=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const O of D.mutations)this.isThisCollection(O.collection)&&O.optimistic&&B.set(O.key,{type:O.type,value:O.modified});for(const D of r){if(D.truncate){const O=new Set([...this.syncedData.keys(),...y?.upserts.keys()||[]]);for(const M of O){if(y?.deletes.has(M))continue;const G=y?.upserts.get(M)||this.syncedData.get(M);G!==void 0&&E.push({type:`delete`,key:M,value:G})}m=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const M of b)w.delete(M);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const O of D.operations){const M=O.key;this.syncedKeys.add(M);const G=this.isLocalOnly||this.pendingLocalChanges.has(M)||this.pendingLocalOrigins.has(M)||m?.has(M)===!0||v?.has(M)===!0?`local`:`remote`;switch(O.type){case`insert`:this.syncedData.set(M,O.value),this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break;case`update`:{if(T===`partial`){const k=Object.assign({},this.syncedData.get(M),O.value);this.syncedData.set(M,k)}else this.syncedData.set(M,O.value);this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}case`delete`:this.syncedData.delete(M),this.syncedMetadata.delete(M),this.rowOrigins.delete(M),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}}for(const[O,M]of D.rowMetadataWrites){if(M.type===`delete`){this.syncedMetadata.delete(O);continue}this.syncedMetadata.set(O,M.value)}for(const[O,M]of D.collectionMetadataWrites){if(M.type===`delete`){this.syncedCollectionMetadata.delete(O);continue}this.syncedCollectionMetadata.set(O,M.value)}}if(o){const D=new Set;for(const G of r)for(const k of G.operations)(k.type===`insert`||k.type===`update`)&&D.add(k.key);const O=new Map(y.upserts),M=new Set(y.deletes);for(const[G,k]of O)if(!M.has(G))if(D.has(G)){let L=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===G&&tt.type===`insert`){tt.value=k,L=!0;break}}L||E.push({type:`insert`,key:G,value:k})}else E.push({type:`insert`,key:G,value:k});if(E.length>0&&M.size>0){const G=[];for(const k of E)k.type===`insert`&&M.has(k.key)||G.push(k);E.length=0,E.push(...G)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&y){for(const[D,O]of y.upserts)this.optimisticUpserts.set(D,O);for(const D of y.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const O of D.mutations)if(this.isThisCollection(O.collection)&&O.optimistic)switch(O.type){case`insert`:case`update`:this.optimisticUpserts.set(O.key,O.modified),this.optimisticDeletes.delete(O.key);break;case`delete`:this.optimisticUpserts.delete(O.key),this.optimisticDeletes.add(O.key);break}}for(const D of b){const O=w.get(D),M=this.get(D),G=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:B}),k=this.getVirtualPropsSnapshotForState(D),L=G.$synced!==k.$synced||G.$origin!==k.$origin,X=O!==void 0?fS(O,D,this.collection.id,()=>G.$synced,()=>G.$origin):void 0,tt=B.get(D);let F=!1;tt&&(tt.type===`delete`&&O!==void 0&&M===void 0&&Bn(tt.value,O)||M!==void 0&&Bn(tt.value,M))&&(F=!0);const at=L&&O!==void 0&&M!==void 0&&Bn(O,M);if(!(F&&!at))if(O===void 0&&M!==void 0){const et=B.get(D);if(et){const wt=et.value,Bt=fS(wt,D,this.collection.id,()=>G.$synced,()=>G.$origin);E.push({type:`update`,key:D,value:M,previousValue:Bt})}else E.push({type:`insert`,key:D,value:M})}else O!==void 0&&M===void 0?E.push({type:`delete`,key:D,value:X??O}):O!==void 0&&M!==void 0&&(!Bn(O,M)||at)&&E.push({type:`update`,key:D,value:M,previousValue:X??O})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new _S((i,r)=>i.compareCreatedAt(r)),this.syncedData=new _S(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const m of this.transactions.values()){const v=m.metadata[rc]===!0;if(m.state===`completed`){for(const b of m.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(m.state===`failed`)for(const b of m.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const m of this.pendingSyncedTransactions)for(const v of m.operations)o.add(v.key);const u=[];for(const[m,v]of this.pendingOptimisticUpserts)o.has(m)||this.pendingOptimisticDirectUpserts.has(m)?this.optimisticUpserts.set(m,v):u.push(m);for(const m of u)this.pendingOptimisticUpserts.delete(m),this.pendingLocalOrigins.delete(m);const d=[];for(const m of this.pendingOptimisticDeletes)o.has(m)||this.pendingOptimisticDirectDeletes.has(m)?this.optimisticDeletes.add(m):d.push(m);for(const m of d)this.pendingOptimisticDeletes.delete(m),this.pendingLocalOrigins.delete(m);const p=[];for(const m of this.transactions.values())[`completed`,`failed`].includes(m.state)||p.push(m);for(const m of p)for(const v of m.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const y=g.filter(m=>!!(!this.recentlySyncedKeys.has(m.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const m=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)m.add(w.key);const v=y.filter(b=>!(b.type===`delete`&&m.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else y.length>0&&this.indexes.updateIndexes(y),this.changes.emitEvents(y,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),y=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:y}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:y,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function ew(){const n=new Map;function t(i){const r=i.join(`.`);if(n.has(r))return n.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return n.set(r,l),l}return t([])}function vi(n){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,y=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,y)||Object.defineProperty(p,y,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(n.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&n.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...n,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&n.includes(u))return{enumerable:!0,configurable:!0}}})}function TS(n){const t=vi(n),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ne(n){return ac(n)?new Re(n.__path):n&&typeof n==`object`&&`type`in n&&(n.type===`func`||n.type===`ref`||n.type===`val`||n.type===`agg`)?n:new Ue(n)}function ac(n){return n&&typeof n==`object`&&n.__refProxy===!0}function Sd(n,t){return new Ve(`eq`,[ne(n),ne(t)])}function AS(n,t){return new Ve(`gt`,[ne(n),ne(t)])}function FT(n,t){return new Ve(`gte`,[ne(n),ne(t)])}function vd(n,t){return new Ve(`lt`,[ne(n),ne(t)])}function wd(n,t,...i){const r=[n,t,...i];return new Ve(`and`,r.map(l=>ne(l)))}function ZT(n,t,...i){const r=[n,t,...i];return new Ve(`or`,r.map(l=>ne(l)))}function WT(n,t){return new Ve(`in`,[ne(n),ne(t)])}class PT{constructor(t){this.query=t}}class tA{constructor(t){this.query=t}}class nw{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function eA(n,t){if(t.length===0||n.length===0)return;if(n.length===1){const{expression:r,compareOptions:l}=n[0];return(l.direction===`asc`?AS:vd)(r,new Ue(t[0]))}const i=[];for(let r=0;rwd(y,m)))}}return i.length===1?i[0]:i.reduce((r,l)=>ZT(r,l))}class nA extends nw{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&A_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?QT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,y=wd(g,p);i.where=y}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],y=this.orderByIndex,m=this.options.whereExpression,v=m?tl(m):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const F=this.collection.get(tt);return F===void 0?!1:v?.(F)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],F=this.collection.currentStateAsChanges({where:Sd(tt,new Ue(g))});if(F){const at=F.map(wt=>wt.key).filter(wt=>!this.sentKeys.has(wt)&&b(wt));T.push(...at);const et=y.take(i-T.length,g,b);T.push(...et)}else T=y.take(i,g,b)}else T=y.takeFromStart(i,b);const B=()=>Math.max(i-E.length,0),D=()=>T.length===0,O=t[0].expression,M=O.type===`ref`?ue(new Re(O.path),!0):null;for(;B()>0&&!D();){const tt=new Set;for(const F of T){const at=this.collection.get(F);E.push({type:`insert`,key:F,value:at}),w=M?M(at):at,tt.add(F)}T=y.take(B(),w,b)}const G=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let k;if(r!==void 0&&r.length>0){const tt=eA(t,r);if(tt){const{expression:F}=t[0],at=r[0];let et;if(at instanceof Date){const wt=new Date(at.getTime()+1);et=wd(FT(F,new Ue(at)),vd(F,new Ue(wt)))}else et=Sd(F,new Ue(at));k={whereFrom:tt,whereCurrent:et,lastKey:this.lastSentKey}}}const L={where:m,limit:i,orderBy:t,cursor:k,offset:l??G,subscription:this},X=this.collection._sync.loadSubset(L);u?.(X),this.loadedSubsets.push(L),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class sA{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=ew(),p=r(d);o=ne(p)}const u=new nA(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new ox;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const iA=n=>setTimeout(()=>{n({didTimeout:!0,timeRemaining:()=>50})},0),rA=n=>{clearTimeout(n)},aA=typeof window<`u`&&`requestIdleCallback`in window?(n,t)=>window.requestIdleCallback(n,t):(n,t)=>iA(n),qh=typeof window<`u`&&`cancelIdleCallback`in window?n=>window.cancelIdleCallback(n):rA,sw=class fs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return fs.instance||(fs.instance=new fs),fs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){fs.instance&&(fs.instance.timeoutId!==null&&clearTimeout(fs.instance.timeoutId),fs.instance=null)}};sw.instance=null;let Kh=sw;class lA{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new ax(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new bl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new rx(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||Kh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){Kh.getInstance().cancel(this),this.idleCallbackId!==null&&(qh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&qh(this.idleCallbackId),this.idleCallbackId=aA(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),Kh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(qh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const ip=Symbol(`liveQueryInternal`);class oA{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=cA(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new kh;if(r.committed)throw new Uh;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const y=this.state.syncedData.get(l);if(y!==void 0&&Bn(y,i.value))o=`update`;else{const b=this.config.utils[ip];throw new hx(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Ax;if(i.committed)throw new Ox;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new kh;if(i.committed)throw new Uh;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ai(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new kh;if(t.committed)throw new Uh;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new lx);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new oS(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new oS(this.id,t)})}this.preloadPromise=null}}function cA(n){if(typeof n==`function`)return{cleanup:n};if(typeof n==`object`)return n}const OS=1;function lc(n,t){return n===t?0:nYs(r)??null);if(n instanceof Date)return{__type:`date`,value:n.toISOString()};if(n instanceof Set)return{__type:`set`,values:Array.from(n).map(l=>Ys(l)??null).sort((l,o)=>lc(wi(l),wi(o)))};if(n instanceof Map)return{__type:`map`,entries:Array.from(n.entries()).map(([l,o])=>({key:Ys(l)??null,value:Ys(o)??null})).sort((l,o)=>lc(wi(l.key),wi(o.key)))};if(n instanceof RegExp)return{__type:`regexp`,value:n.toString()};const t={},i=Object.entries(n).sort(([r],[l])=>lc(r,l));for(const[r,l]of i){const o=Ys(l);o!==void 0&&(t[r]=o)}return t}function wi(n){return n===null?`null`:Array.isArray(n)?`[${n.map(wi).join(`,`)}]`:typeof n!=`object`?JSON.stringify(n):`{${Object.keys(n).sort((r,l)=>lc(r,l)).map(r=>`${JSON.stringify(r)}:${wi(n[r])}`).join(`,`)}}`}function fA(n,t,i,r,l){const o=uA(r),u=Ys(t)??null,d=Ys(l),g=Ys({signatureVersion:OS,expression:u,options:d??null})??null,y=wi(g);return{signatureVersion:OS,signature:y,indexId:n,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function bd(n){if(n===null||typeof n!=`object`)return n;if(Array.isArray(n))return n.map(i=>bd(i));const t={};for(const[i,r]of Object.entries(n))t[i]=bd(r);return t}function hA(n){return JSON.parse(JSON.stringify(n))}class dA{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=ew(),o=t(l),u=ne(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ai(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=fA(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:hA(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:bd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var pA={};const gA=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),yA=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),mA=new Set([`set`,`delete`,`clear`,`add`]),SA=new Set([`entries`,`keys`,`values`,`forEach`]);function rp(n){return n!==null&&typeof n==`object`&&!(n instanceof Date)&&!(n instanceof RegExp)&&!Zs(n)}function vA(n,t,i,r){if(gA.has(n))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,y)=>{if(rp(g)){const m={tracker:i,prop:String(y)},{proxy:v}=r(g,m);return v}return g},d=function(g,y,m){const v=u(g,y);return o.call(this,v,y,m)};if(n===`reduce`||n===`reduceRight`){const g=function(y,m,v,b){const w=u(m,v);return o.call(this,y,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((n===`find`||n===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return n===`filter`&&Array.isArray(p)?p.map(g=>{const y=i.copy_.indexOf(g);return y!==-1?u(g,y):g}):p}}function wA(n,t){return function(){const i=n.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(rp(l)){const u={tracker:n,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function RS(n,t,i){return function(...r){const l=n.apply(t.copy_,r);return i(t),l}}function bA(n,t,i,r,l,o,u){if(SA.has(n)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(n===`forEach`){const m=p[0];if(typeof m==`function`){const v=function(b,w,E){const T=m.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(n===`entries`||n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator){const m=g,v=new Map;if(n===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=m.next();if(!w.done&&w.value&&typeof w.value==`object`){if(n===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:B}=o(w.value[1],T);w.value[1]=B}}else if(n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator)if(n===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:B}=o(w.value,T);w.value=B}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:B}=o(w.value,T);w.value=B}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...n){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...n):!t&&typeof process<`u`&&pA.DEBUG===`true`&&console.log(`[proxy]`,...n)}function ds(n,t=new WeakMap){if(n==null||typeof n!=`object`)return n;if(t.has(n))return t.get(n);if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n.source,n.flags);if(Array.isArray(n)){const l=[];return t.set(n,l),n.forEach((o,u)=>{l[u]=ds(o,t)}),l}if(ArrayBuffer.isView(n)&&!(n instanceof DataView)){const l=Object.getPrototypeOf(n).constructor,o=new l(n.length);t.set(n,o);for(let u=0;u{l.set(u,ds(o,t))}),l}if(n instanceof Set){const l=new Set;return t.set(n,l),n.forEach(o=>{l.add(ds(o,t))}),l}if(Zs(n))return n;const i={};t.set(n,i);for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=ds(n[l],t));const r=Object.getOwnPropertySymbols(n);for(const l of r)i[l]=ds(n[l],t);return i}let DS=0;function EA(){return DS+=1,DS}function ap(n,t){const i=new Map;function r(m,v){if(At(`Object ID:`,m.constructor.name),i.has(m))return i.get(m);{const b=ap(m,v);return i.set(m,b),b}}const l=new Map,o={copy_:ds(n),originalObject:ds(n),proxyCount:EA(),modified:!1,assigned_:{},parent:t,target:n};At(`createChangeProxy called for target`,n,o.proxyCount);function u(m){m.modified||(m.modified=!0),m.parent&&(At(`propagating change to parent`),`updateMap`in m.parent?m.parent.updateMap(m.copy_):`updateSet`in m.parent?m.parent.updateSet(m.copy_):(m.parent.tracker.copy_[m.parent.prop]=m.copy_,m.parent.tracker.assigned_[m.parent.prop]=!0),u(m.parent.tracker))}function d(m){if(At(`checkIfReverted called with assigned keys:`,Object.keys(m.assigned_)),Object.keys(m.assigned_).length===0&&Object.getOwnPropertySymbols(m.assigned_).length===0)return At(`No assigned properties, returning true`),!0;for(const b in m.assigned_)if(m.assigned_[b]===!0){const w=m.copy_[b],E=m.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,`original:`,E),!Bn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(m.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(m.assigned_);for(const b of v)if(m.assigned_[b]===!0){const w=m.copy_[b],E=m.originalObject[b];if(!Bn(w,E))return At(`Symbol property is different, returning false`),!1}else if(m.assigned_[b]===!1)return At(`Symbol property was deleted, returning false`),!1;return At(`All properties match original values, returning true`),!0}function p(m,v){At(`checkParentStatus called for child prop:`,v);const b=d(m);At(`Parent checkIfReverted returned:`,b),b&&(At(`Parent is fully reverted, clearing tracking`),m.modified=!1,m.assigned_={},m.parent&&(At(`Continuing up the parent chain`),p(m.parent.tracker,m.parent.prop)))}function g(m){if(At(`createObjectProxy`,m),l.has(m))return At(`proxyCache found match`),l.get(m);const v=new Proxy(m,{get(b,w){At(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(yA.has(D))return RS(E,o,u);const O=vA(D,E,o,r);if(O)return O;if(w===Symbol.iterator)return wA(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(mA.has(D))return RS(E,o,u);const O=bA(D,w,E,b,o,r,u);if(O)return O}return E.bind(b)}if(rp(E)){const D={tracker:o,prop:String(w)},{proxy:O}=r(T,D);return l.set(E,O),O}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,`new:`,E),Bn(T,E))At(`Value unchanged, not tracking`);else{const B=o.originalObject[w],D=Bn(E,B);if(At(`value:`,E,`original:`,B,`isRevertToOriginal:`,D),D){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=ds(B),At(`Checking if all properties reverted`);const O=d(o);At(`All reverted:`,O),O?(At(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(At(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(At(`Some properties still changed, keeping modified flag`),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=ds(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,B=Reflect.deleteProperty(b,w);return B&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),B}return!0}});return l.set(m,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At(`getChanges called, modified:`,o.modified),At(o),!o.modified)return At(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const m={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(m[v]=o.copy_[v]);return At(`Returning copy:`,m),m}}}function CA(n){const t=n.map(i=>ap(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function xA(n,t){const{proxy:i,getChanges:r}=ap(n);return t(i),r()}function _A(n,t){const{proxies:i,getChanges:r}=CA(n);return t(i),r()}function TA(){let n,t,i=!0;return{promise:new Promise((l,o)=>{n=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:n,reject:t,isPending:()=>i}}function AA(n){return typeof n==`object`&&n!==null&&typeof n.hasPendingGraphRun==`function`}class OA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const wc=new OA,bc=[];let cl=[],RA=0;function DA(n,t){switch(`${n.type}-${t.type}`){case`insert-update`:return{...n,type:`insert`,original:{},modified:t.modified,changes:{...n.changes,...t.changes},key:n.key,globalKey:n.globalKey,metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:n.original,changes:{...n.changes,...t.changes},metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${n.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Fa(n){const t=new zA(n);return bc.push(t),t}function oc(){if(cl.length>0)return cl.slice(-1)[0]}function MA(n){wc.clear(n.id),cl.push(n)}function kA(n){try{wc.flush(n.id)}finally{cl=cl.filter(t=>t.id!==n.id)}}function UA(n){const t=bc.findIndex(i=>i.id===n.id);t!==-1&&bc.splice(t,1)}let zA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new Ex;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=TA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=RA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&UA(this)}mutate(t){if(this.state!==`pending`)throw new xx;MA(this);try{t()}finally{kA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=DA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new _x;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of bc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new Tx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class jA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=oc();if(!u&&!this.config.onInsert)throw new vx;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(y=>{const m=this.validateData(y,`insert`),v=this.config.getKey(m);if(this.state.has(v)||g.has(v))throw new fx(v);g.add(v);const b=this.generateGlobalKey(v,y),w={mutationId:crypto.randomUUID(),original:{},modified:m,changes:Object.fromEntries(Object.keys(y).map(E=>[E,m[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const y=Fa({metadata:{[rc]:!0},mutationFn:async m=>await this.config.onInsert({transaction:m.transaction,collection:this.collection})});return y.applyMutations(p),this.markPendingLocalOrigins(p),y.commit().catch(()=>{}),o.transactions.set(y.id,y),o.scheduleTransactionCleanup(y),o.recomputeOptimisticState(!0),y}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=oc();if(!u&&!this.config.onDelete)throw new bx;if(Array.isArray(r)&&r.length===0)throw new mx;const d=Array.isArray(r)?r:[r],p=[];for(const y of d){if(!this.state.has(y))throw new Sx(y);const m=this.generateGlobalKey(y,this.state.get(y)),v={mutationId:crypto.randomUUID(),original:this.state.get(y),modified:this.state.get(y),changes:this.state.get(y),globalKey:m,key:y,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(y)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Fa({autoCommit:!0,metadata:{[rc]:!0},mutationFn:async y=>this.config.onDelete({transaction:y.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new ix}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new rS;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new iS(i,v)}const g=p.value,y=Object.keys(t);return Object.fromEntries(y.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new rS;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new iS(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new cx(i):new ux(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new dx;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=oc();if(!o&&!this.config.onUpdate)throw new wx;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new px;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,y=d.map(w=>{const E=this.state.get(w);if(!E)throw new gx(w);return E});let m;u?m=_A(y,p):m=[xA(y[0],p)];const v=d.map((w,E)=>{const T=m[E];if(!T||Object.keys(T).length===0)return null;const B=y[E],D=this.validateData(T,`update`,w),O=Object.assign({},B,D),M=this.config.getKey(B),G=this.config.getKey(O);if(M!==G)throw new yx(M,G);const k=this.generateGlobalKey(G,O);return{mutationId:crypto.randomUUID(),original:B,modified:O,changes:Object.fromEntries(Object.keys(T).map(L=>[L,O[L]])),globalKey:k,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Fa({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Fa({metadata:{[rc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class NA extends nw{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function lp(n){const t=new op(n);return n.utils?t.utils=n.utils:t.utils={},t}class op{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new nx;if(!t.sync)throw new sx;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ai(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new sA,this._events=new NA,this._indexes=new dA,this._lifecycle=new lA(t,this.id),this._mutations=new jA(t,this.id),this._state=new XT(t),this._sync=new oA(t,this.id),this.comparisonOpts=BA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return YT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function BA(n){if(n.defaultStringCollation){const t=n.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function LA(n){return!!n&&(typeof n==`object`||typeof n==`function`)&&typeof n.then==`function`}function IA(n){const{mutationFn:t,onMutate:i,...r}=n;return l=>{const o=Fa({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(LA(u))throw new Cx}),o}}function HA(n){const t=qA(n);let i=n,r,l=0;const o=10;for(;law(u)),l=lw(r),o=iw(n);for(const[u,d]of l.singleSource)KA(n,u)&&!o.has(u)&&t.set(u,d);return t}function KA(n,t){if(n.from.alias===t)return n.from.type===`collectionRef`;if(n.join){for(const i of n.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function iw(n){const t=new Set;if(n.join){const i=n.from.alias;for(const r of n.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function Ed(n){const t={...n,from:n.from.type===`queryRef`?new yn(Ed(n.from.query),n.from.alias):n.from,join:n.join?.map(i=>({...i,from:i.from.type===`queryRef`?new yn(Ed(i.from.query),i.from.alias):i.from}))};return VA(t)}function VA(n){if(!n.where||n.where.length===0)return n;if(!n.join||n.join.length===0){if(n.where.length>1){const d=xd(n.where),p=Ec(d);return{...n,where:[p]}}return n}const t=n.where.filter(d=>!sS(d)),r=xd(t).map(d=>aw(d)),l=lw(r),o=GA(n,l),u=n.where.filter(d=>sS(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function rw(n){return{...n,from:Cd(n.from),join:n.join?.map(t=>({...t,from:Cd(t.from)}))}}function Cd(n){if(n.type===`collectionRef`)return n;const t=rw(n.query);if($A(t)){const i=Cd(t.from);return i.type===`collectionRef`?new zr(i.collection,n.alias):new yn(i.query,n.alias)}return new yn(t,n.alias)}function $A(n){return(!n.where||n.where.length===0)&&!n.select&&(!n.groupBy||n.groupBy.length===0)&&(!n.having||n.having.length===0)&&(!n.orderBy||n.orderBy.length===0)&&(!n.join||n.join.length===0)&&n.limit===void 0&&n.offset===void 0&&!n.fnSelect&&(!n.fnWhere||n.fnWhere.length===0)&&(!n.fnHaving||n.fnHaving.length===0)}function xd(n){const t=[];for(const i of n){const r=Zd(i);t.push(...cp(r))}return t}function cp(n){if(n.type===`func`&&n.name===`and`){const t=[];for(const i of n.args)t.push(...cp(i));return t}else return[n]}function aw(n){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(n),{expression:n,touchedSources:t,hasNamespaceOnlyRef:i}}function lw(n){const t=new Map,i=[];for(const o of n)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Ec(u));const l=i.length>0?Ec(i):void 0;return{singleSource:r,multiSource:l}}function GA(n,t){const i=new Set,r=iw(n),l=new Map;for(const[m,v]of t.singleSource)r.has(m)||l.set(m,v);const o=MS(n.from,l,i),u=n.join?n.join.map(m=>({...m,from:MS(m.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[m,v]of t.singleSource)i.has(m)?p&&d.push(tx(v)):d.push(v);const g=d.length>1?[Ec(d.flatMap(m=>cp(Zd(m))))]:d;return{select:n.select,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,distinct:n.distinct,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function xr(n){return{from:n.from.type===`collectionRef`?new zr(n.from.collection,n.from.alias):new yn(xr(n.from.query),n.from.alias),select:n.select,join:n.join?n.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new zr(t.from.collection,t.from.alias):new yn(xr(t.from.query),t.from.alias)})):void 0,where:n.where?[...n.where]:void 0,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0}}function MS(n,t,i){const r=t.get(n.alias);if(!r)return n.type===`collectionRef`?new zr(n.collection,n.alias):new yn(xr(n.query),n.alias);if(n.type===`collectionRef`){const u={from:new zr(n.collection,n.alias),where:[r]};return i.add(n.alias),new yn(u,n.alias)}if(!ZA(n.query,r,n.alias))return new yn(xr(n.query),n.alias);if(PA(n.query,r,n.alias))return new yn(xr(n.query),n.alias);const l=n.query.where||[],o={...xr(n.query),where:[...l,r]};return i.add(n.alias),new yn(o,n.alias)}function YA(n,t,i){return n.select?ow(n.select)||WA(n.select,t,i):!1}function QA(n){return n.groupBy&&n.groupBy.length>0}function JA(n){return n.having&&n.having.length>0}function XA(n){return n.orderBy&&n.orderBy.length>0&&(n.limit!==void 0||n.offset!==void 0)}function FA(n){return n.fnSelect||n.fnWhere&&n.fnWhere.length>0||n.fnHaving&&n.fnHaving.length>0}function ZA(n,t,i){return!(YA(n,t,i)||QA(n)||JA(n)||XA(n)||FA(n))}function ow(n){for(const t of Object.values(n))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&ow(i))return!0}return!1}function up(n){const t=[];if(n==null||typeof n!=`object`)return t;switch(n.type){case`ref`:t.push(n);break;case`func`:case`agg`:for(const i of n.args??[])t.push(...up(i));break}return t}function WA(n,t,i){const r=new Set;for(const[o,u]of Object.entries(n))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Re||r.add(o);const l=up(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function PA(n,t,i){const r=up(t);if(r.every(o=>o.path[0]!==i))return!1;if(n.fnSelect)return!0;const l=n.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Re)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==n.from.alias||g!==u[1])return!0}return!1}function Ec(n){if(n.length===0)throw new n_;return n.length===1?n[0]:new Ve(`and`,n)}function tO(n,t,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D){let O=n;for(const M of t)O=eO(O,M,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D);return O}function eO(n,t,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D){const O=t.from.type===`collectionRef`,{alias:M,input:G,collectionId:k}=sO(t.from,o,p,g,y,m,v,b,u,d,E,T,B,D);i[M]=G,O&&(T[M]=k);const L=p[r],X=p[k];if(!L)throw new lS(r);if(!X)throw new lS(k);const{activeSource:tt,lazySource:F}=rO(t.type,L,X),at=Object.keys(i),{mainExpr:et,joinedExpr:wt}=nO(t.left,t.right,at,M),Bt=ue(et),ht=ue(wt);let U=n.pipe(le(([W,st])=>[Er(Bt(st)),[W,st]])),q=G.pipe(le(([W,st])=>{const ut={[M]:st};return[Er(ht(ut)),[W,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new $x(t.type);if(tt){const W=tt===`main`?t.from:w.from,st=W.type===`queryRef`&&(W.query.limit||W.query.offset),ut=et.type===`func`||wt.type===`func`;if(!st&&!ut){const _=tt===`main`?M:l;m.add(_);const H=tt===`main`?U:q,J=al(w,tt===`main`?wt:et,F),ot=J.collection,it=J.path[0];it&&Kc(it,J.path,ot);const vt=H.pipe(TT(xt=>{const bt=B[_]||_,$e=g[bt];if(!$e)throw new s_(bt,_,F.id,Object.keys(g));if($e.hasLoadedInitialState())return;const Ge=xt.getInner().map(([[wn]])=>wn),$n=new Re(J.path);$e.requestSnapshot({where:WT($n,Ge),optimizedOnly:!0})||$e.requestSnapshot()}));tt===`main`?U=vt:q=vt}}return U.pipe(tw(q,t.type),iO(t.type))}function nO(n,t,i,r){const l=i.filter(d=>d!==r),o=_d(n),u=_d(t);if(o&&l.includes(o)&&u===r)return{mainExpr:n,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:n};throw!o||!u?new Yx:o===u?new Gx(o):l.includes(o)?u!==r?new Jx(r):new Xx:new Qx(o)}function _d(n){switch(n.type){case`ref`:return n.path[0]||null;case`func`:{const t=new Set;for(const i of n.args){const r=_d(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function sO(n,t,i,r,l,o,u,d,p,g,y,m,v,b){switch(n.type){case`collectionRef`:{const w=t[n.alias];if(!w)throw new Hv(n.alias,n.collection.id,Object.keys(t));return m[n.alias]=n.collection.id,{alias:n.alias,input:w,collectionId:n.collection.id}}case`queryRef`:{const w=g.get(n.query)||n.query,E=y(w,t,i,r,l,o,u,d,p,g);Object.assign(m,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(n.query),B=n.query.from.alias;if(!(!T&&n.alias===B))for(const[k,L]of E.sourceWhereClauses)b.set(k,L);const O=Object.keys(E.aliasToCollectionId).find(k=>E.aliasToCollectionId[k]===E.collectionId);O&&O!==n.alias&&(v[n.alias]=O);const G=E.pipeline.pipe(le(k=>{const[L,[X,tt]]=k;return[L,X]}));return{alias:n.alias,input:G,collectionId:E.collectionId}}default:throw new Fx(n.type)}}function iO(n){return function(t){return t.pipe(ps(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return n===`inner`?!!(u&&d):n===`left`?!!u:n===`right`?!!d:!0}),le(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],y={};return d&&Object.assign(y,d),g&&Object.assign(y,g),[`[${u},${p}]`,y]}))}}function rO(n,t,i){switch(n){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeoO(l,r)))}function uO(n){return n.type===`agg`}function fO(n){return n&&typeof n==`object`&&!jr(n)}function cw(n,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const y=[...n],m=g?l:new Re(p.split(`.`)),v=ue(m);i.push({kind:`merge`,targetPath:y,source:v})}else{const y=p,m=[...n];i.push({kind:`merge`,targetPath:m,source:v=>v[y]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});continue}if(fO(o)){cw([...n,r],o,i);continue}if(uO(o)||Nr(o))i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});else{if(o===void 0||!jr(o)){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>o});continue}if(o instanceof Ue){const u=o.value;i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:ue(o)})}}}const Tr=Symbol(`includesRouting`);function Cc(n,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,y,m){const v=p.get(n);if(v)return v;Ad(n);const{optimizedQuery:b,sourceWhereClauses:w}=HA(n);let E=b;g.set(E,n),Rd(E,n,g);const T={...t},B={},D={},O={},{alias:M,input:G,collectionId:k}=dO(E.from,T,i,r,l,o,u,d,p,g,B,D,w);O[M]=G;let L=G;if(y&&m){const ht=m.path.slice(1);L=G.pipe(le(([W,st])=>[mO(st,ht),[W,st]])).pipe(tw(y,`inner`)).pipe(ps(([W,[st]])=>st!=null),le(([W,[st,ut]])=>{const[_,H]=st,Q={...H,__correlationKey:W};return ut!=null&&(Q.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Q]})),O[M]=L}let X=L.pipe(le(([ht,U])=>{const{__parentContext:q,...W}=U,st={[M]:W};return q&&(Object.assign(st,q),st.__parentContext=q),[ht,st]}));if(E.join&&E.join.length>0&&(X=tO(X,E.join,O,k,M,T,p,g,i,r,l,o,u,d,n,Cc,B,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const U=Zd(ht),q=ue(U);X=X.pipe(ps(([W,st])=>_r(q(st))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ps(([U,q])=>_r(ht(q))));const tt=[],F=[];if(E.select){const ht=gO(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:U,subquery:q}of ht){const W=ue(q.correlationField);let st;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:ue(Q)}));st=X.pipe(le(([Q,J])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(J);let xt=ot[it.alias];for(let bt=0;bt[W(Q),null]));st=st.pipe(Xv(H=>H.map(([Q,J])=>[Q,J>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=Cc(ut,T,i,r,l,o,u,d,p,g,st,q.childCorrelationField);if(Object.assign(B,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(J=>({alias:J.path[0],field:J.path.slice(1),compiled:ue(J)})),Q=W;F.push({fieldName:q.fieldName,getRouting:J=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(J);let xt=ot[it.alias];for(let bt=0;bt({correlationKey:W(H),parentContext:null})});yO(E.select,U)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new zx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new jx;E.fnSelect?X=X.pipe(le(([ht,U])=>{const q=E.fnSelect(U);return[ht,{...U,$selected:q}]})):E.select?X=cO(X,E.select):X=X.pipe(le(([ht,U])=>{const q=!E.join&&!E.groupBy?U[M]:U;return[ht,{...U,$selected:q}]})),F.length>0&&(X=X.pipe(le(([ht,U])=>{const q={};for(const{fieldName:W,getRouting:st}of F)q[W]=st(U);return U.$selected[Tr]=q,[ht,U]})));const at=y?M:void 0;if(E.groupBy&&E.groupBy.length>0?X=ES(X,E.groupBy,E.having,E.select,E.fnHaving,k,at):E.select&&Object.values(E.select).some(U=>U.type===`agg`||Nr(U))&&(X=ES(X,[],E.having,E.select,E.fnHaving,k,at)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(U=>U.type===`agg`):!1))throw new Bx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ps(([U,q])=>ht(q)));if(E.distinct&&(X=X.pipe(gT(([ht,U])=>U.$selected))),E.orderBy&&E.orderBy.length>0){const ht=y&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[M]?.__correlationKey,Q=_?.__parentContext;return Q!=null?JSON.stringify([H,Q]):H}:void 0,W=GT(n,X,E.orderBy,E.select||{},i[k],u,d,E.limit,E.offset,ht).pipe(le(([ut,[_,H]])=>{const Q=_.$selected,J=kS(Od(Q),_);if(y){const ot=_[M]?.__correlationKey,it=_.__parentContext??null;return delete J.__correlationKey,delete J.__parentContext,[ut,[J,H,ot,it]]}return[ut,[J,H]]})),st={collectionId:k,pipeline:W,sourceWhereClauses:w,aliasToCollectionId:B,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(n,st),st}else if(E.limit!==void 0||E.offset!==void 0)throw new Lx;const wt=X.pipe(le(([ht,U])=>{const q=U.$selected,W=kS(Od(q),U);if(y){const st=U[M]?.__correlationKey,ut=U.__parentContext??null;return delete W.__correlationKey,delete W.__parentContext,[ht,[W,void 0,st,ut]]}return[ht,[W,void 0]]})),Bt={collectionId:k,pipeline:wt,sourceWhereClauses:w,aliasToCollectionId:B,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(n,Bt),Bt}function hO(n){const t=new Set;if(n.from.type===`collectionRef`&&t.add(n.from.alias),n.join)for(const i of n.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Ad(n,t=new Set){const i=hO(n);for(const l of i)if(t.has(l))throw new Ix(l,Array.from(t));const r=new Set([...t,...i]);if(n.from.type===`queryRef`&&Ad(n.from.query,r),n.join)for(const l of n.join)l.from.type===`queryRef`&&Ad(l.from.query,r)}function dO(n,t,i,r,l,o,u,d,p,g,y,m,v){switch(n.type){case`collectionRef`:{const b=t[n.alias];if(!b)throw new Hv(n.alias,n.collection.id,Object.keys(t));return y[n.alias]=n.collection.id,{alias:n.alias,input:b,collectionId:n.collection.id}}case`queryRef`:{const b=g.get(n.query)||n.query,w=Cc(b,t,i,r,l,o,u,d,p,g);Object.assign(y,w.aliasToCollectionId),Object.assign(m,w.aliasRemapping);const E=g.has(n.query),T=n.query.from.alias;if(!(!E&&n.alias===T))for(const[G,k]of w.sourceWhereClauses)v.set(G,k);const D=Object.keys(w.aliasToCollectionId).find(G=>w.aliasToCollectionId[G]===w.collectionId);D&&D!==n.alias&&(m[n.alias]=D);const M=w.pipeline.pipe(le(G=>{const[k,[L,X]]=G,tt=Od(L);return[k,tt]}));return{alias:n.alias,input:M,collectionId:w.collectionId}}default:throw new Hx(n.type)}}function pO(n){return n instanceof Ue||n&&typeof n==`object`&&`type`in n&&n.type===`val`}function Od(n){return pO(n)?n.value:n}function kS(n,t){if(!n||typeof n!=`object`)return n;let i=!1;for(const r of hd)if(n[r]==null&&r in t){i=!0;break}if(!i)return n;for(const r of hd)n[r]==null&&r in t&&(n[r]=t[r]);return n}function Rd(n,t,i){if(n.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(n.from.query,t.from.query),Rd(n.from.query,t.from.query,i)),n.join&&t.join)for(let r=0;r1)return new Re(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Re([r[0]])}return new Re(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of n.args){const o=fp(l,t);r.push(o)}return new Ve(n.name,r)}}function hp(n,t){return n.map(r=>{const l=fp(r.expression,t);return{...r,expression:l}})}const hw=new WeakMap;function SO(n){return n.utils?.[ip]?.getBuilder?.()}function vO(n,t){hw.set(n,t)}function wO(n){return hw.get(n)}class Zt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Xo(i,d)}if(Array.isArray(t))throw new Xo(i,`array`);if(r.length!==1)throw r.length===0?new Xo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Xo(i,`string`):new Rx(i);const l=r[0],o=t[l];let u;if(o instanceof op)u=new zr(o,l);else if(o instanceof Zt){const d=o._getQuery();if(!d.from)throw new Dx(i);u=new yn(d,l)}else throw new Mx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Zt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=vi(d),g=i(p);let y,m;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)y=g.args[0],m=g.args[1];else throw new kx;const v={from:o,type:r,left:y,right:m},b=this.query.join||[];return new Zt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=ac(l)?ne(l):l;if(!jr(o))throw new aS(US(o));const u=this.query.where||[];return new Zt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?TS(i):vi(i),l=t(r),o=ac(l)?ne(l):l;if(!jr(o))throw new aS(US(o));const u=this.query.having||[];return new Zt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=vi(i);let l=t(r);ac(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=pw(l,i);return new Zt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?TS(r):vi(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=y=>({expression:ne(y),compareOptions:u}),p=Array.isArray(o)?o.map(y=>d(y)):[d(o)],g=this.query.orderBy||[];return new Zt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=Array.isArray(l)?l.map(d=>ne(d)):[ne(l)],u=this.query.groupBy||[];return new Zt({...this.query,groupBy:[...u,...o]})}limit(t){return new Zt({...this.query,limit:t})}offset(t){return new Zt({...this.query,offset:t})}distinct(){return new Zt({...this.query,distinct:!0})}findOne(){return new Zt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Zt({...t.query,select:void 0,fnSelect:i})},where(i){return new Zt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Zt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new Ux;return this.query}}function US(n){return n===null?`null`:n===void 0?`undefined`:typeof n==`object`?`object`:typeof n}function bO(n){return n===void 0?ne(null):n instanceof Iv||n instanceof Ve||n instanceof Re||n instanceof Ue?n:ne(n)}function dw(n){return n!==null&&typeof n==`object`&&!jr(n)&&!n.__refProxy}function pw(n,t=[]){if(!dw(n))return bO(n);const i={};for(const[r,l]of Object.entries(n)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Zt){i[r]=Vh(l,r,t,`collection`);continue}if(l instanceof PT){if(!(l.query instanceof Zt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Vh(l.query,r,t,`array`);continue}if(l instanceof tA){if(!(l.query instanceof Zt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Vh(l.query,r,t,`concat`);continue}i[r]=pw(l,t)}return i}function dp(n){const t=[];switch(n.type){case`ref`:t.push(n);break;case`func`:for(const i of n.args??[])t.push(...dp(i));break}return t}function EO(n,t){const i=typeof n==`object`&&`expression`in n?n.expression:n;return dp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Vh(n,t,i,r){const l=n._getQuery(),o=[l.from.alias];if(l.join)for(const O of l.join)o.push(O.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let O=0;O=2){for(let k=0;k eq(child.parentId, parent.id))`);const y=[...l.where];if(g>=0){const O=y[p],G=(typeof O==`object`&&`expression`in O?O.expression:O).args.filter((k,L)=>L!==g);if(G.length===1){const k=typeof O==`object`&&`expression`in O&&O.residual;y[p]=k?{expression:G[0],residual:!0}:G[0]}else{const k=new Ve(`and`,G),L=typeof O==`object`&&`expression`in O&&O.residual;y[p]=L?{expression:k,residual:!0}:k}}else y.splice(p,1);const m=[],v=[];for(const O of y)EO(O,i)?v.push(O):m.push(O);let b;if(v.length>0){const O=new Set;b=[];for(const M of v){const G=typeof M==`object`&&`expression`in M?M.expression:M;for(const k of dp(G))k.path[0]!=null&&i.includes(k.path[0])&&!O.has(k.path.join(`.`))&&(O.add(k.path.join(`.`)),b.push(k))}}const w={...l,where:m.length>0?m:void 0},E=w.select,T=E===void 0||dw(E);let B=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=PC,B={...w,select:{[D]:E}}}return new Ti(B,u,d,t,v.length>0?v:void 0,b,r,D)}function zS(n,t,i,r){if(n.type===`ref`&&t.type===`ref`){const l=n.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:n,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:n}}}function CO(n){const t=n(new Zt);return gw(t)}function gw(n){return n._getQuery()}function xO(n){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?r(d.query):pp(d)&&l(d))}return r(n),t}function yw(n){const t=n.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return yw(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(n)}`)}function _O(n){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?l(d.query):pp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(n),t}function pp(n){return!(n===null||typeof n!=`object`||n instanceof Ti||`type`in n&&typeof n.type==`string`||n.__refProxy)}function TO(n){const t=typeof n.query==`function`?CO(n.query):gw(n.query);if(t.select&&!pp(t.select))throw new Nx;return t}function AO(n,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&n.sendData(new ee(r)),r.length}function*OO(n){for(const t of n)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function RO(n,t){const i=[];for(const r of n){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function DO(n,t,i,r){let l=t,o=!1;for(const u of n){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function MO(n,t){const{orderBy:i,limit:r,offset:l}=n,o=r!==void 0&&l!==void 0?r+l:r,u=i?hp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const y=g.path;return Array.isArray(y)&&y.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function kO(n,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=n,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const y=ll({minValues:g??null,offset:d,limit:l});if(i===y)return;const m=hp(o,r);return{minValues:g,normalizedOrderBy:m,loadRequestKey:y}}const jS=Symbol.for(`@tanstack/db.collection-config-builder`);class UO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=fp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=RO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=AO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=MO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const y={},m=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const B=OO(T);this.sendChangesToPipelineWithTracking(B,y.current)},v=this.collection.subscribeChanges(m,{whereExpression:t,onStatusChange:r});y.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=hp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[jS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[jS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=kO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=DO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let zO=0;class jO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++zO}`,this.query=TO({query:t.query}),this.collections=xO(this.query);const i=_O(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=mw(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??yw(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[ip]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new r_;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??oc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const y of g)p.add(y)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;wc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=wc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new uT,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=Cc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new i_(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(gd(y=>{const m=y.getInner();i.messagesCount+=m.length,m.reduce(KO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const y=p.size>0,m=HO(g);if(!y&&!m)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}y&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Dd(g,t.collection,this.id,y?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(gd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,b]=p,w=Br(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=y),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Sw(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=wO(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const y=new UO(u,d,p,this),m=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(m);const v=y.subscribe();return this.subscriptions[u]=v,y.loadMoreIfNeeded.bind(y,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function mw(n){return(t,i)=>{const r=n.get(t),l=n.get(i);return r&&l?rl?1:0:0}}function NS(n){return n.materialization!==`collection`}function BS(n,t){if(!t)return n.materialization===`array`?[]:n.materialization===`concat`?``:void 0;if(n.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=n.scalarField?i.map(l=>l?.[n.scalarField]):i;return n.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Sw(n,t){return n.map(i=>{const r=new Map;i.pipeline.pipe(gd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,b]=p,w=Br(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=y),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Sw(i.childCompilationResult.includes,t)),l})}function NO(n){return n.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function BO(n){const t=new Set;if(!n.nestedSetups)return t;for(let i=0;i0&&(b.value=m.value,m.orderByIndex!==void 0&&(b.orderByIndex=m.orderByIndex))):v.set(y,{...m})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function LO(n,t,i){if(n.nestedSetups){for(const r of n.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Tr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Br(u,d);if(u!=null){n.nestedRoutingIndex.set(p,t);let g=n.nestedRoutingReverseIndex.get(t);g||(g=new Set,n.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Tr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Br(u,d);if(u!=null){n.nestedRoutingIndex.delete(p);const g=n.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&n.nestedRoutingReverseIndex.delete(t))}}}}function IO(n,t){if(!n.nestedRoutingReverseIndex)return;const i=n.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)n.nestedRoutingIndex.delete(r);n.nestedRoutingReverseIndex.delete(t)}}function vw(n){for(const t of n)if(t.buffer.size>0||t.nestedSetups&&vw(t.nestedSetups))return!0;return!1}function Br(n,t){return t==null?n:JSON.stringify([n,t])}function LS(n,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?mw(u):void 0,y={collection:lp({id:`__child-collection:${n}-${t}-${ll(i)}`,getKey:m=>o.get(m),compare:p,sync:{rowUpdateMode:`full`,sync:m=>(d=m,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(y.includesStates=NO(l)),y}function Dd(n,t,i,r,l){for(const o of n){if(r){for(const[y,m]of r)if(m.inserts>0){const v=m.value,b=v[Tr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Br(w,E);if(w!=null){if(!o.childRegistry.has(T)){const M=LS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,M)}let B=o.correlationToParentKeys.get(T);B||(B=new Set,o.correlationToParentKeys.set(T,B)),B.add(y);const D=BS(o,o.childRegistry.get(T));v[o.fieldName]=D;const O=t.get(y);O&&O!==v&&(O[o.fieldName]=D)}}}const u=NS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[y,m]of o.pendingChildChanges){let v=o.childRegistry.get(y);if(v||(v=LS(i,o.fieldName,y,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(y,v)),o.materialization===`collection`&&qO(t,o.fieldName,y,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of m)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}LO(o,y,m),d.set(y,{entry:v,childChanges:m})}o.pendingChildChanges.clear()}const p=BO(o);for(const[,{entry:y,childChanges:m}]of d)y.includesStates&&Dd(y.includesStates,y.collection,y.collection.id,m,y.syncMethods);for(const y of p){if(d.has(y))continue;const m=o.childRegistry.get(y);m?.includesStates&&Dd(m.includesStates,m.collection,m.collection.id,null,m.syncMethods)}const g=NS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const y=[];for(const m of g){const v=o.correlationToParentKeys.get(m);if(!v)continue;const b=o.childRegistry.get(m);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),B={...E};E[o.fieldName]=BS(o,b),y.push({type:`update`,key:T,value:E,previousValue:B})}}}y.length>0&&t._changes.emitEvents(y,!0)}if(r){for(const[y,m]of r)if(m.deletes>0&&m.inserts===0){const v=m.value[Tr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Br(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(y),T.size===0&&(IO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Tr]}function HO(n){for(const t of n)if(t.pendingChildChanges.size>0||t.nestedSetups&&vw(t.nestedSetups))return!0;return!1}function qO(n,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=n.get(u);d&&(d[t]=l)}}function KO(n,[[t,i],r]){const[l,o]=i,u=n.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),n.set(t,u),n}function IS(n){return new jO(n).getConfig()}function $h(n){if(typeof n==`function`){const i=IS({query:n});return HS(i)}else{const t=n,i=IS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),HS(i)}}function HS(n){const t=lp(n),i=SO(n);return i&&vO(t,i),t}function ww(n){return n!=null&&`operation`in n.headers}function bw(n){return n!=null&&`control`in n.headers}var VO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(n,t){this.handlers.set(n,t),this.existingKeys.has(n)||this.existingKeys.set(n,new Set)}dispatchChange(n){if(!ww(n))return;n.headers.txid&&typeof n.headers.txid==`string`&&this.pendingTxids.add(n.headers.txid);const t=this.handlers.get(n.type);if(!t)return;let i=n.headers.operation;if(i!==`delete`&&(typeof n.value!=`object`||n.value===null))throw new Error(`StreamDB collections require object values; got ${typeof n.value} for type=${n.type}, key=${n.key}`);const l={...n.value??{}};l[t.primaryKey]=n.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(n.type)?.has(n.key)?`update`:`insert`);const o=this.existingKeys.get(n.type);i===`insert`||i===`update`?o?.add(n.key):o?.delete(n.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:n.type,key:n.key,operation:i}),u}}dispatchControl(n){if(bw(n))switch(n.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const n of this.pendingHandlers)try{n.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const n of this.pendingTxids){this.seenTxids.add(n);const t=this.txidResolvers.get(n);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(n)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const n of this.handlers.values())n.markReady();for(const n of this.preloadResolvers)n();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((n,t)=>{this.preloadResolvers.push(n),this.preloadRejecters.push(t)})}rejectAll(n){for(const t of this.preloadRejecters)t(n);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(n);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(n,t=5e3){return this.seenTxids.has(n)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(n);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(n)}r(new Error(`Timeout waiting for txid: ${n}`))},t);this.txidResolvers.has(n)||this.txidResolvers.set(n,[]),this.txidResolvers.get(n).push({resolve:i,reject:r,timeoutId:l})})}};function $O(n,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(n,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const qS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function GO(n,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} update: ${d.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const y=i[`~standard`].validate(o);if(`issues`in y)throw new Error(`Validation failed for ${n} update (oldValue): ${y.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${n} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${n} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:n,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function Ew(n){for(const r of Object.keys(n))if(qS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(qS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(n)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(n))i[r]={...l,...GO(l.type,l.primaryKey,l.schema)};return i}function Cw(n){const{streamOptions:t,state:i,actions:r}=n,l=new jn(t),o=new VO,u={};for(const[b,w]of Object.entries(i)){const E=lp({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:$O(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const y=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const B of T.items)ww(B)?o.dispatchChange(B):bw(B)&&o.dispatchControl(B);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(B){console.error(`[StreamDB] Error processing batch:`,B),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(B),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},m={stream:l,preload:async()=>{await y(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...m};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=IA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const gp=600,YO=gp/2*1e3,QO=3600*24,JO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Gh=Ew({rooms:{schema:JO,type:`stream`,primaryKey:`roomId`}}),XO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},KS=Ew({scores:{schema:XO,type:`stream`,primaryKey:`playerName`}});function FO(n,t){return Cw({streamOptions:{url:n,headers:t,contentType:`application/json`},state:Gh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Gh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Gh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const xw=Z.createContext(null);function _w(){const n=Z.useContext(xw);if(!n)throw new Error(`useRegistryContext must be used within RegistryProvider`);return n}function ZO({children:n}){const{dsEndpoint:t,dsHeaders:i}=Yd(),[r,l]=Z.useState({registryDB:null,error:null,isLoading:!0});return Z.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,m=await new jn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(m.exists||await jn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:QO}),o=await FO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Y.jsxs(`div`,{style:VS.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`LOADING...`})]}):r.error||!r.registryDB?Y.jsxs(`div`,{style:VS.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})]}):Y.jsx(xw.Provider,{value:{registryDB:r.registryDB},children:n})}const VS={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`}},Yh=1;function WO(n,t=[]){const i=n&&typeof n==`object`&&typeof n.subscribeChanges==`function`&&typeof n.startSyncImmediate==`function`&&typeof n.id==`string`,r=Z.useRef(null),l=Z.useRef(null),o=Z.useRef(null),u=Z.useRef(0),d=Z.useRef(null),p=!r.current||i&&o.current!==n||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)n.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),n.startSyncImmediate(),r.current=n,o.current=n;else if(typeof n==`function`){const w=new Zt,E=n(w);if(E==null)r.current=null;else if(E instanceof op)E.startSyncImmediate(),r.current=E;else if(E instanceof Zt)r.current=$h({query:n,startSync:!0,gcTime:Yh});else if(E&&typeof E==`object`)r.current=$h({startSync:!0,gcTime:Yh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=$h({startSync:!0,gcTime:Yh,...n}),l.current=[...t];p&&(u.current=0,d.current=null);const g=Z.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const y=Z.useRef(null);(!y.current||p)&&(y.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const m=Z.useSyncExternalStore(g.current,y.current),v=Z.useRef(null),b=Z.useRef(null);if(!v.current||v.current.version!==m.version||v.current.collection!==m.collection){if(!m.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(m.collection.entries()),T=m.collection.config.singleResult;let B=null,D=null;b.current={get state(){return B||(B=new Map(w)),B},get data(){return D||(D=w.map(([,O])=>O)),T?D[0]:D},collection:m.collection,status:m.collection.status,isLoading:m.collection.status===`loading`,isReady:m.collection.status===`ready`,isIdle:m.collection.status===`idle`,isError:m.collection.status===`error`,isCleanedUp:m.collection.status===`cleaned-up`,isEnabled:!0}}v.current=m}return b.current}const qt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Wo=[{label:`32x32`,cols:32,rows:32},{label:`64x64`,cols:64,rows:64},{label:`128x128`,cols:128,rows:128}];function Qh(n,t){return`${n}__${t.cols}x${t.rows}`}function PO(){const n=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=n[Math.floor(Math.random()*n.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function tR({playerName:n,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=_w(),[l,o]=Z.useState(PO),[u,d]=Z.useState(1),[p,g]=Z.useState(!1),[y,m]=Z.useState(0),[v,b]=Z.useState(!1),[w,E]=Z.useState(``),[,T]=Z.useState(0);Z.useEffect(()=>{const k=setInterval(()=>T(L=>L+1),1e3);return()=>clearInterval(k)},[]);const{data:B=[]}=WO(k=>k.from({rooms:r.collections.rooms})),D=Date.now(),M=[...B.filter(k=>k.expiresAt>D)].sort((k,L)=>L.createdAt-k.createdAt),G=async()=>{if(!p){g(!0);try{const k=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,L=Wo[u],X=Qh(k,L),tt=Date.now(),F={roomId:X,name:k,boardSize:`${L.cols}x${L.rows}`,createdAt:tt,expiresAt:tt+gp*1e3};await r.actions.addRoom(F),o(``),i(X)}catch(k){console.error(`Failed to create room:`,k)}finally{g(!1)}}};return Y.jsxs(`div`,{style:me.container,children:[Y.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),Y.jsx(`div`,{style:me.title,children:`TERRITORY WARS`}),Y.jsx(`div`,{style:{fontSize:7,color:qt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Claim 20% territory or lead when time runs out.`}),Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`NAME`}),Y.jsx(`input`,{style:me.input,value:n,onChange:k=>t(k.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`ROOM`}),Y.jsx(`input`,{style:me.input,value:l,onChange:k=>o(k.target.value),placeholder:`room name`,onKeyDown:k=>k.key===`Enter`&&G()}),Y.jsx(`div`,{style:me.cardTitle,children:`BOARD SIZE`}),Y.jsx(`div`,{style:{display:`flex`,gap:6,marginBottom:10},children:Wo.map((k,L)=>Y.jsx(`button`,{className:`lobby-btn`,style:{flex:1,padding:`6px 0`,fontSize:7,fontFamily:`inherit`,background:L===u?qt.accent:`transparent`,color:L===u?`#000`:qt.accent,border:`1px solid ${qt.accent}`,cursor:`pointer`,letterSpacing:1},onClick:()=>d(L),children:k.label},k.label))}),Y.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{...me.createBtn,flex:1,opacity:p?.6:1},onClick:G,disabled:p,children:p?`STARTING...`:`START`}),Y.jsx(`button`,{className:`lobby-btn`,style:{...me.joinBtn,flex:1},onClick:()=>b(!0),children:`JOIN`})]})]}),v&&Y.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>b(!1),children:Y.jsxs(`div`,{style:{...me.card,marginBottom:0},onClick:k=>k.stopPropagation(),children:[Y.jsx(`div`,{style:me.cardTitle,children:`JOIN ROOM`}),Y.jsx(`input`,{style:me.input,value:w,onChange:k=>E(k.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:k=>{if(k.key===`Enter`&&w.trim()){const L=M.find(X=>X.name===w.trim());i(L?L.roomId:Qh(w.trim(),Wo[u]))}}}),Y.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{...me.joinBtn,flex:1},onClick:()=>b(!1),children:`CANCEL`}),Y.jsx(`button`,{className:`lobby-btn`,style:{...me.createBtn,flex:1,opacity:w.trim()?1:.4},disabled:!w.trim(),onClick:()=>{if(w.trim()){const k=M.find(L=>L.name===w.trim());i(k?k.roomId:Qh(w.trim(),Wo[u]))}},children:`JOIN`})]})]})}),M.length>0&&Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`ROOMS`}),Y.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:M.slice(y*3,y*3+3).map(k=>Y.jsx(eR,{room:k,onJoin:()=>i(k.roomId)},k.roomId))}),M.length>3&&Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:qt.bg,color:qt.dim,border:`1px solid ${qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y===0?.3:1},disabled:y===0,onClick:()=>m(k=>k-1),children:`<`}),Y.jsxs(`span`,{style:{fontSize:7,color:qt.dim,lineHeight:`24px`},children:[y+1,`/`,Math.ceil(M.length/3)]}),Y.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:qt.bg,color:qt.dim,border:`1px solid ${qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y>=Math.ceil(M.length/3)-1?.3:1},disabled:y>=Math.ceil(M.length/3)-1,onClick:()=>m(k=>k+1),children:`>`})]})]})]})}function eR({room:n,onJoin:t}){const[i,r]=Z.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(n.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Y.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:qt.bg,border:`1px solid ${qt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Y.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:Y.jsx(`span`,{style:{fontSize:8,color:i?qt.accent:qt.text,cursor:`pointer`},children:i?`COPIED`:n.name})}),Y.jsx(`button`,{className:`lobby-btn`,style:{background:qt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const me={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:qt.bg,color:qt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:qt.accent,marginBottom:6},card:{background:qt.card,border:`1px solid ${qt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:qt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:qt.bg,border:`1px solid ${qt.border}`,padding:`8px 10px`,color:qt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:qt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:qt.accent,border:`1px solid ${qt.accent}`,cursor:`pointer`,letterSpacing:2}},Tn=()=>new Map,Md=n=>{const t=Tn();return n.forEach((i,r)=>{t.set(r,i)}),t},Ps=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r},nR=(n,t)=>{const i=[];for(const[r,l]of n)i.push(t(l,r));return i},sR=(n,t)=>{for(const[i,r]of n)if(t(r,i))return!0;return!1},Lr=()=>new Set,Jh=n=>n[n.length-1],iR=(n,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(n);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ei((this._observers.get(t)||Tn()).values()).forEach(r=>r(...i))}destroy(){this._observers=Tn()}};const In=Math.floor,cc=Math.abs,Aw=(n,t)=>nn>t?n:t,Ow=n=>n!==0?n<0:1/n<0,$S=1,GS=2,Xh=4,Fh=8,ul=32,gs=64,sn=128,$c=31,kd=63,bi=127,lR=2147483647,xc=Number.MAX_SAFE_INTEGER,YS=Number.MIN_SAFE_INTEGER,oR=Number.isInteger||(n=>typeof n==`number`&&isFinite(n)&&In(n)===n),cR=String.fromCharCode,uR=n=>n.toLowerCase(),fR=/^\s*/g,hR=n=>n.replace(fR,``),dR=/([A-Z])/g,QS=(n,t)=>hR(n.replace(dR,i=>`${t}${uR(i)}`)),pR=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lfl.encode(n),yR=fl?gR:pR;let el=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});el&&el.decode(new Uint8Array).length===1&&(el=null);const mR=(n,t)=>rR(t,()=>n).join(``);let xl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}};const Gc=()=>new xl,SR=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(SR(n));let i=0;for(let r=0;r{const i=n.cbuf.length;i-n.cpos{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Ud=Se,Mt=(n,t)=>{for(;t>bi;)Se(n,sn|bi&t),t=In(t/128);Se(n,bi&t)},mp=(n,t)=>{const i=Ow(t);for(i&&(t=-t),Se(n,(t>kd?sn:0)|(i?gs:0)|kd&t),t=In(t/64);t>0;)Se(n,(t>bi?sn:0)|bi&t),t=In(t/128)},zd=new Uint8Array(3e4),wR=zd.length/3,bR=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Mt(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=Aw(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array($r(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},en=(n,t)=>{Mt(n,t.byteLength),Yc(n,t)},Sp=(n,t)=>{vR(n,t);const i=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,i},CR=(n,t)=>Sp(n,4).setFloat32(0,t,!1),xR=(n,t)=>Sp(n,8).setFloat64(0,t,!1),_R=(n,t)=>Sp(n,8).setBigInt64(0,t,!1),JS=new DataView(new ArrayBuffer(4)),TR=n=>(JS.setFloat32(0,n),JS.getFloat32(0)===n),hl=(n,t)=>{switch(typeof t){case`string`:Se(n,119),Ar(n,t);break;case`number`:oR(t)&&cc(t)<=lR?(Se(n,125),mp(n,t)):TR(t)?(Se(n,124),CR(n,t)):(Se(n,123),xR(n,t));break;case`bigint`:Se(n,122),_R(n,t);break;case`object`:if(t===null)Se(n,126);else if(Vc(t)){Se(n,117),Mt(n,t.length);for(let i=0;i0&&Mt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const FS=n=>{n.count>0&&(mp(n.encoder,n.count===1?n.s:-n.s),n.count>1&&Mt(n.encoder,n.count-2))};class uc{constructor(){this.encoder=new xl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(FS(this),this.count=1,this.s=t)}toUint8Array(){return FS(this),Ln(this.encoder)}}const ZS=n=>{if(n.count>0){const t=n.diff*2+(n.count===1?0:1);mp(n.encoder,t),n.count>1&&Mt(n.encoder,n.count-2)}};class Zh{constructor(){this.encoder=new xl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(ZS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return ZS(this),Ln(this.encoder)}}class AR{constructor(){this.sarr=[],this.s=``,this.lensE=new uc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new xl;return this.sarr.push(this.s),this.s=``,Ar(t,this.sarr.join(``)),Yc(t,this.lensE.toUint8Array()),Ln(t)}}const Hn=n=>new Error(n),An=()=>{throw Hn(`Method unimplemented`)},Sn=()=>{throw Hn(`Unexpected case`)},Rw=Hn(`Unexpected end of array`),Dw=Hn(`Integer out of Range`);let Qc=class{constructor(t){this.arr=t,this.pos=0}};const vp=n=>new Qc(n),OR=n=>n.pos!==n.arr.length,RR=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},nn=n=>RR(n,Rt(n)),Ir=n=>n.arr[n.pos++],Rt=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posxc)throw Dw}throw Rw},wp=n=>{let t=n.arr[n.pos++],i=t&kd,r=64;const l=(t&gs)>0?-1:1;if((t&sn)===0)return l*i;const o=n.arr.length;for(;n.posxc)throw Dw}throw Rw},DR=n=>{let t=Rt(n);if(t===0)return``;{let i=String.fromCodePoint(Ir(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(Ir(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},MR=n=>el.decode(nn(n)),Or=el?MR:DR,bp=(n,t)=>{const i=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,i},kR=n=>bp(n,4).getFloat32(0,!1),UR=n=>bp(n,8).getFloat64(0,!1),zR=n=>bp(n,8).getBigInt64(0,!1),jR=[n=>{},n=>null,wp,kR,UR,zR,n=>!1,n=>!0,Or,n=>{const t=Rt(n),i={};for(let r=0;r{const t=Rt(n),i=[];for(let r=0;rjR[127-Ir(n)](n);class WS extends Qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),OR(this)?this.count=Rt(this)+1:this.count=-1),this.count--,this.s}}class fc extends Qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=wp(this);const t=Ow(this.s);this.count=1,t&&(this.s=-this.s,this.count=Rt(this)+2)}return this.count--,this.s}}class Wh extends Qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=wp(this),i=t&1;this.diff=In(t/2),this.count=1,i&&(this.count=Rt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class NR{constructor(t){this.decoder=new fc(t),this.str=Or(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const BR=crypto.getRandomValues.bind(crypto),Mw=()=>BR(new Uint32Array(1))[0],LR=`10000000-1000-4000-8000`+-1e11,IR=()=>LR.replace(/[018]/g,n=>(n^Mw()&15>>n/4).toString(16)),PS=n=>new Promise(n);Promise.all.bind(Promise);const tv=n=>n===void 0?null:n;class HR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let kw=new HR,qR=!0;try{typeof localStorage<`u`&&localStorage&&(kw=localStorage,qR=!1)}catch{}const KR=kw,pl=Symbol(`Equality`),Uw=(n,t)=>n===t||!!n?.[pl]?.(t)||!1,VR=n=>typeof n==`object`,$R=Object.assign,GR=Object.keys,YR=(n,t)=>{for(const i in n)t(n[i],i)},_c=n=>GR(n).length,QR=n=>{for(const t in n)return!1;return!0},_l=(n,t)=>{for(const i in n)if(!t(n[i],i))return!1;return!0},Ep=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),JR=(n,t)=>n===t||_c(n)===_c(t)&&_l(n,(i,r)=>(i!==void 0||Ep(t,r))&&Uw(t[r],i)),XR=Object.freeze,zw=n=>{for(const t in n){const i=n[t];(typeof i==`object`||typeof i==`function`)&&zw(n[t])}return XR(n)},Cp=(n,t,i=0)=>{try{for(;i{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[pl]!=null)return n[pl](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(n);var jw={};const gl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let zn;const ZR=()=>{if(zn===void 0)if(gl){zn=Tn();const n=process.argv;let t=null;for(let i=0;i{if(n.length!==0){const[t,i]=n.split(`=`);zn.set(`--${QS(t,`-`)}`,i),zn.set(`-${QS(t,`-`)}`,i)}})):zn=Tn();return zn},jd=n=>ZR().has(n),Tc=n=>tv(gl?jw[n.toUpperCase().replaceAll(`-`,`_`)]:KR.getItem(n)),Nw=n=>jd(`--`+n)||Tc(n)!==null,WR=Nw(`production`),PR=gl&&FR(jw.FORCE_COLOR,[`true`,`1`,`2`]),tD=PR||!jd(`--no-colors`)&&!Nw(`no-color`)&&(!gl||process.stdout.isTTY)&&(!gl||jd(`--color`)||Tc(`COLORTERM`)!==null||(Tc(`TERM`)||``).includes(`color`)),eD=n=>new Uint8Array(n),nD=n=>{const t=eD(n.byteLength);return t.set(n),t};class sD{constructor(t,i){this.left=t,this.right=i}}const us=(n,t)=>new sD(n,t),ev=n=>n.next()>=.5,Ph=(n,t,i)=>In(n.next()*(i+1-t)+t),Bw=(n,t,i)=>In(n.next()*(i+1-t)+t),xp=(n,t,i)=>Bw(n,t,i),iD=n=>cR(xp(n,97,122)),rD=(n,t=0,i=20)=>{const r=xp(n,t,i);let l=``;for(let o=0;ot[xp(n,0,t.length-1)],aD=Symbol(`0schema`);class lD{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(mR(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Nd=(n,t)=>n===t?!0:n==null||t==null||n.constructor!==t.constructor?!1:n[pl]?Uw(n,t):Vc(n)?yp(n,i=>Tw(t,r=>Nd(i,r))):VR(n)?_l(n,(i,r)=>Nd(i,t[r])):!1;class je{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Nd(i,r)}equals(t){return this.constructor===t.constructor&&hc(this.shape,t.shape)}[aD](){return!0}[pl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){An()}get nullable(){return Gr(this,Wc)}get optional(){return new Hw(this)}cast(t){return nv(t,this),t}expect(t){return nv(t,this),t}}class _p extends je{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const oe=(n,t=null)=>new _p(n,t);oe(_p);class Tp extends je{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=n=>new Tp(n);oe(Tp);class Jc extends je{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Xc=(...n)=>new Jc(n),Lw=oe(Jc),oD=RegExp.escape||(n=>n.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Iw=n=>{if(Hr.check(n))return[oD(n)];if(Lw.check(n))return n.shape.map(t=>t+``);if(Xw.check(n))return[`[+-]?\\d+.?\\d*`];if(Fw.check(n))return[`.*`];if(Ac.check(n))return n.shape.map(Iw).flat(1);Sn()};class cD extends je{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Iw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}oe(cD);const uD=Symbol(`optional`);class Hw extends je{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[uD](){return!0}}const fD=oe(Hw);class hD extends je{check(t,i){return i?.extend(null,`never`,typeof t),!1}}oe(hD);class Fc extends je{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Fc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):_l(this.shape,(r,l)=>{const o=this._isPartial&&!Ep(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const dD=n=>new Fc(n),pD=oe(Fc),gD=be(n=>n!=null&&(n.constructor===Object||n.constructor==null));class qw extends je{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&_l(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const Kw=(n,t)=>new qw(n,t),yD=oe(qw);class Vw extends je{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&_l(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const mD=(...n)=>new Vw(n);oe(Vw);class $w extends je{constructor(t){super(),this.shape=t.length===1?t[0]:new Ap(t)}check(t,i){const r=Vc(t)&&yp(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const Gw=(...n)=>new $w(n),SD=oe($w),vD=be(n=>Vc(n));class Yw extends je{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const wD=(n,t=null)=>new Yw(n,t);oe(Yw);const bD=wD(je);class ED extends je{constructor(t){super(),this.len=t.length-1,this.args=mD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const CD=oe(ED),xD=be(n=>typeof n==`function`);class _D extends je{constructor(t){super(),this.shape=t}check(t,i){const r=yp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}oe(_D,n=>n.shape.length>0);class Ap extends je{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=Tw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Gr=(...n)=>n.findIndex(t=>Ac.check(t))>=0?Gr(...n.map(t=>yl(t)).map(t=>Ac.check(t)?t.shape:[t]).flat(1)):n.length===1?n[0]:new Ap(n),Ac=oe(Ap),Qw=()=>!0,Oc=be(Qw),TD=oe(Tp,n=>n.shape===Qw),Op=be(n=>typeof n==`bigint`),AD=be(n=>n===Op),Jw=be(n=>typeof n==`symbol`);be(n=>n===Jw);const Rr=be(n=>typeof n==`number`),Xw=be(n=>n===Rr),Hr=be(n=>typeof n==`string`),Fw=be(n=>n===Hr),Zc=be(n=>typeof n==`boolean`),OD=be(n=>n===Zc),Zw=Xc(void 0);oe(Jc,n=>n.shape.length===1&&n.shape[0]===void 0);Xc(void 0);const Wc=Xc(null),RD=oe(Jc,n=>n.shape.length===1&&n.shape[0]===null);oe(Uint8Array);oe(_p,n=>n.shape===Uint8Array);const DD=Gr(Rr,Hr,Wc,Zw,Op,Zc,Jw);(()=>{const n=Gw(Oc),t=Kw(Hr,Oc),i=Gr(Rr,Hr,Wc,Zc,n,t);return n.shape=i,t.shape.values=i,i})();const yl=n=>{if(bD.check(n))return n;if(gD.check(n)){const t={};for(const i in n)t[i]=yl(n[i]);return dD(t)}else{if(vD.check(n))return Gr(...n.map(yl));if(DD.check(n))return Xc(n);if(xD.check(n))return oe(n)}Sn()},nv=WR?()=>{}:(n,t)=>{const i=new lD;if(!t.check(n,i))throw Hn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class MD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:yl(t),h:i}),this}else(t){return this.if(Oc,t)}done(){return(t,i)=>{for(let r=0;rnew MD(n),Ww=kD(Oc).if(Xw,(n,t)=>Ph(t,YS,xc)).if(Fw,(n,t)=>rD(t)).if(OD,(n,t)=>ev(t)).if(AD,(n,t)=>BigInt(Ph(t,YS,xc))).if(Ac,(n,t)=>mr(t,td(t,n.shape))).if(pD,(n,t)=>{const i={};for(const r in n.shape){let l=n.shape[r];if(fD.check(l)){if(ev(t))continue;l=l.shape}i[r]=Ww(l,t)}return i}).if(SD,(n,t)=>{const i=[],r=Bw(t,0,42);for(let l=0;ltd(t,n.shape)).if(RD,(n,t)=>null).if(CD,(n,t)=>{const i=mr(t,n.res);return()=>i}).if(TD,(n,t)=>mr(t,td(t,[Rr,Hr,Wc,Zw,Op,Zc,Gw(Rr),Kw(Gr(`a`,`b`,`c`),Rr)]))).if(yD,(n,t)=>{const i={},r=Ph(t,0,3);for(let l=0;lWw(yl(t),n),Pc=typeof document<`u`?document:{};be(n=>n.nodeType===BD);typeof DOMParser<`u`&&new DOMParser;be(n=>n.nodeType===zD);be(n=>n.nodeType===jD);const UD=n=>nR(n,(t,i)=>`${i}:${t};`).join(``),zD=Pc.ELEMENT_NODE,jD=Pc.TEXT_NODE,ND=Pc.DOCUMENT_NODE,BD=Pc.DOCUMENT_FRAGMENT_NODE;be(n=>n.nodeType===ND);const ms=Symbol,Pw=ms(),tb=ms(),LD=ms(),ID=ms(),HD=ms(),eb=ms(),qD=ms(),Rp=ms(),KD=ms(),VD=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[],r=Tn();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...nb(n)),sb.forEach(t=>t.print(n))},QD=(...n)=>{console.warn(...nb(n)),n.unshift(Rp),sb.forEach(t=>t.print(n))},sb=Lr(),ib=n=>({[Symbol.iterator](){return this},next:n}),JD=(n,t)=>ib(()=>{let i;do i=n.next();while(!i.done&&!t(i.value));return i}),ed=(n,t)=>ib(()=>{const{done:i,value:r}=n.next();return{done:i,value:i?void 0:t(r)}});class Dp{constructor(t,i){this.clock=t,this.len=i}}class tu{constructor(){this.clients=new Map}}const rb=(n,t,i)=>t.clients.forEach((r,l)=>{const o=n.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=n.length-1;for(;i<=r;){const l=In((i+r)/2),o=n[l],u=o.clock;if(u<=t){if(t{const i=n.clients.get(t.client);return i!==void 0&&XD(i,t.clock)!==null},Mp=n=>{n.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new Dp(l.clock,$r(l.len,o.clock+o.len-l.clock)):(r{const t=new tu;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{Ps(n.clients,t,()=>[]).push(new Dp(i,r))},kp=(n,t)=>{Mt(n.restEncoder,t.clients.size),Ei(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{n.resetDsCurVal(),Mt(n.restEncoder,i);const l=r.length;Mt(n.restEncoder,l);for(let o=0;o{const t=new tu,i=Rt(n.restDecoder);for(let r=0;r0){const u=Ps(t.clients,l,()=>[]);for(let d=0;d{const r=new tu,l=Rt(n.restDecoder);for(let o=0;o0){const o=new eu;return Mt(o.restEncoder,0),kp(o,r),o.toUint8Array()}return null},lb=Mw;class Yr extends aR{constructor({guid:t=IR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=lb(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new fb,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=PS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>PS(g=>{const y=m=>{(m===void 0||m===!0)&&(this.off(`sync`,y),g())};this.on(`sync`,y)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ei(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Ae){const r=Ps(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Ae&&l!==i)if(l===Ae){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Mr)}getText(t=``){return this.get(t,Kr)}getMap(t=``){return this.get(t,qr)}getXmlElement(t=``){return this.get(t,Vr)}getXmlFragment(t=``){return this.get(t,Ci)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ei(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Yr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class WD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Rt(this.restDecoder)}readDsLen(){return Rt(this.restDecoder)}}class PD extends WD{readLeftID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readRightID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readClient(){return Rt(this.restDecoder)}readInfo(){return Ir(this.restDecoder)}readString(){return Or(this.restDecoder)}readParentInfo(){return Rt(this.restDecoder)===1}readTypeRef(){return Rt(this.restDecoder)}readLen(){return Rt(this.restDecoder)}readAny(){return dl(this.restDecoder)}readBuf(){return nD(nn(this.restDecoder))}readJSON(){return JSON.parse(Or(this.restDecoder))}readKey(){return Or(this.restDecoder)}}class tM{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Rt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Rt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Dc extends tM{constructor(t){super(t),this.keys=[],Rt(t),this.keyClockDecoder=new Wh(nn(t)),this.clientDecoder=new fc(nn(t)),this.leftClockDecoder=new Wh(nn(t)),this.rightClockDecoder=new Wh(nn(t)),this.infoDecoder=new WS(nn(t),Ir),this.stringDecoder=new NR(nn(t)),this.parentInfoDecoder=new WS(nn(t),Ir),this.typeRefDecoder=new fc(nn(t)),this.lenDecoder=new fc(nn(t))}readLeftID(){return new Dr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Dr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return dl(this.restDecoder)}readBuf(){return nn(this.restDecoder)}readJSON(){return dl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=$r(r,t[0].id.clock);const l=qn(t,r);Mt(n.restEncoder,t.length-l),n.writeClient(i),Mt(n.restEncoder,r);const o=t[l];o.write(n,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),Up(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Mt(n.restEncoder,r.size),Ei(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{iM(n,t.clients.get(l),l,o)})},rM=(n,t)=>{const i=Tn(),r=Rt(n.restDecoder);for(let l=0;l{const r=[];let l=Ei(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new fb,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let y=u.refs[u.i++];const m=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(y.constructor!==xn){const w=Ps(m,y.id.client,()=>ve(t,y.id.client))-y.id.clock;if(w<0)r.push(y),g(y.id.client,y.id.clock-1),v();else{const E=y.getMissing(n,t);if(E!==null){r.push(y);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{y=T.refs[T.i++];continue}}else(w===0||w0)y=r.pop();else if(u!==null&&u.i0){const b=new eu;return ob(b,d,new Map),Mt(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},lM=(n,t)=>ob(n,t.doc.store,t.beforeState),oM=(n,t,i,r=new Dc(n))=>$t(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=rM(r,u),g=aM(l,d,p),y=d.pendingStructs;if(y){for(const[v,b]of y.missing)if(bb)&&y.missing.set(v,b)}y.update=fv([y.update,g.update])}}else d.pendingStructs=g;const m=sv(r,l,d);if(d.pendingDs){const v=new Dc(vp(d.pendingDs));Rt(v.restDecoder);const b=sv(v,l,d);m&&b?d.pendingDs=fv([m,b]):d.pendingDs=m||b}else d.pendingDs=m;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,cb(l.doc,v)}},i,!1),cb=(n,t,i,r=Dc)=>{const l=vp(t);oM(l,n,i,new r(l))},iv=(n,t,i)=>cb(n,t,i,PD);class cM{constructor(){this.l=[]}}const rv=()=>new cM,av=(n,t)=>n.l.push(t),lv=(n,t)=>{const i=n.l,r=i.length;n.l=i.filter(l=>t!==l),r===n.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},ub=(n,t,i)=>Cp(n.l,[t,i]);class Dr{constructor(t,i){this.client=t,this.clock=i}}const Po=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,Dt=(n,t)=>new Dr(n,t),uM=n=>{for(const[t,i]of n.doc.share.entries())if(i===n)return t;throw Sn()},br=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ab(t.ds,n.id),Bd=(n,t)=>{const i=Ps(n.meta,Bd,Lr),r=n.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class fb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Up=n=>{const t=new Map;return n.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(n,t)=>{const i=n.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},hb=(n,t)=>{let i=n.clients.get(t.id.client);if(i===void 0)i=[],n.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw Sn()}i.push(t)},qn=(n,t)=>{let i=0,r=n.length-1,l=n[r],o=l.id.clock;if(o===t)return r;let u=In(t/(o+l.length-1)*r);for(;i<=r;){if(l=n[u],o=l.id.clock,o<=t){if(t{const i=n.clients.get(t.client);return i[qn(i,t.clock)]},nd=fM,Ld=(n,t,i)=>{const r=qn(t,i),l=t[r];return l.id.clock{const i=n.doc.store.clients.get(t.client);return i[Ld(n,i,t.clock)]},ov=(n,t,i)=>{const r=t.clients.get(i.client),l=qn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==mn&&r.splice(l+1,0,Nc(n,o,i.clock-o.id.clock+1)),o},hM=(n,t,i)=>{const r=n.clients.get(t.id.client);r[qn(r,t.id.clock)]=i},db=(n,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ld(n,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!sR(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Mp(t.deleteSet),lM(n,t),kp(n,t.deleteSet),!0),uv=(n,t,i)=>{const r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ps(n.changed,t,Lr).add(i)},dc=(n,t)=>{let i=n[t],r=n[t-1],l=t;for(;l>0;i=r,r=n[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof fe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&n.splice(t+1-o,o),o},pM=(n,t,i)=>{for(const[r,l]of n.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=qn(o,d.clock),y=o[g];g{n.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=Aw(l.length-1,1+qn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+dc(l,p)}})},pb=(n,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(y=>y.target._item===null||!y.target._item.deleted),p.forEach(y=>{y.currentTarget=g,y._path=null}),p.sort((y,m)=>y.path.length-m.path.length),d.push(()=>{ub(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&zM(i)})}),Cp(d,[])}finally{r.gc&&pM(o,l,r.gcFilter),gM(o,l),i.afterState.forEach((y,m)=>{const v=i.beforeState.get(m)||0;if(v!==y){const b=l.clients.get(m),w=$r(qn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+dc(b,E)}});for(let y=u.length-1;y>=0;y--){const{client:m,clock:v}=u[y].id,b=l.clients.get(m),w=qn(b,v);w+11||w>0&&dc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(YD(Rp,Pw,`[yjs] `,tb,eb,`Changed the client-id because another client seems to be using it.`),r.clientID=lb()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const y=new nM;cv(y,i)&&r.emit(`update`,[y.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const y=new eu;cv(y,i)&&r.emit(`updateV2`,[y.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(y=>{y.clientID=r.clientID,y.collectionid==null&&(y.collectionid=r.collectionid),r.subdocs.add(y)}),g.forEach(y=>r.subdocs.delete(y)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(y=>y.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,n])):pb(n,t+1)}}},$t=(n,t,i=null,r=!0)=>{const l=n._transactionCleanups;let o=!1,u=null;n._transaction===null&&(o=!0,n._transaction=new dM(n,i,r),l.push(n._transaction),l.length===1&&n.emit(`beforeAllTransactions`,[n]),n.emit(`beforeTransaction`,[n._transaction,n]));try{u=t(n._transaction)}finally{if(o){const d=n._transaction===l[0];n._transaction=null,d&&pb(l,0)}}return u};function*yM(n){const t=Rt(n.restDecoder);for(let i=0;i{if(n.constructor===mn){const{client:i,clock:r}=n.id;return new mn(Dt(i,r+t),n.length-t)}else if(n.constructor===xn){const{client:i,clock:r}=n.id;return new xn(Dt(i,r+t),n.length-t)}else{const i=n,{client:r,clock:l}=i.id;return new fe(Dt(r,l+t),null,Dt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},fv=(n,t=Dc,i=eu)=>{if(n.length===1)return n[0];const r=n.map(y=>new t(vp(y)));let l=r.map(y=>new mM(y,!0)),o=null;const u=new i,d=new SM(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===xn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const y=l[0],m=y.curr.id.client;if(o!==null){let v=y.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=y.next(),b=!0;if(v===null||v.id.client!==m||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(m!==o.struct.id.client)Ga(d,o.struct,o.offset),o={struct:v,offset:0},y.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===xn?o.struct.length-=w:v=vM(v,w)),o.struct.mergeWith(v)||(Ga(d,o.struct,o.offset),o={struct:v,offset:0},y.next())}}else o={struct:y.curr,offset:0},y.next();for(let v=y.curr;v!==null&&v.id.client===m&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==xn;v=y.next())Ga(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ga(d,o.struct,o.offset),o=null),wM(d);const p=r.map(y=>ZD(y)),g=FD(p);return kp(u,g),u.toUint8Array()},gb=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:Ln(n.encoder.restEncoder)}),n.encoder.restEncoder=Gc(),n.written=0)},Ga=(n,t,i)=>{n.written>0&&n.currClient!==t.id.client&&gb(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),Mt(n.encoder.restEncoder,t.id.clock+i)),t.write(n.encoder,i),n.written++},wM=n=>{gb(n);const t=n.encoder.restEncoder;Mt(t,n.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Jh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Jh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Jh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Hn(hv);const i=this.target,r=Lr(),l=Lr(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const bM=(n,t)=>{const i=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},De=()=>{QD(`Invalid access: Add Yjs type to a document before reading data.`)},yb=80;let zp=0;class EM{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=zp++}}const CM=n=>{n.timestamp=zp++},mb=(n,t,i)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=i,n.timestamp=zp++},xM=(n,t,i)=>{if(n.length>=yb){const r=n.reduce((l,o)=>l.timestamp{if(n._start===null||t===0||n._searchMarker===null)return null;const i=n._searchMarker.length===0?null:n._searchMarker.reduce((o,u)=>cc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&cc(i.index-l){for(let r=n.length-1;r>=0;r--){const l=n[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=$r(t,l.index+i))}},iu=(n,t,i)=>{const r=n,l=t.changedParentTypes;for(;Ps(l,n,()=>[]).push(i),n._item!==null;)n=n._item.parent;ub(r._eH,i,t)};class Ae{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=rv(),this._dEH=rv(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw An()}clone(){throw An()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){av(this._eH,t)}observeDeep(t){av(this._dEH,t)}unobserve(t){lv(this._eH,t)}unobserveDeep(t){lv(this._dEH,t)}toJSON(){}}const Sb=(n,t,i)=>{n.doc??De(),t<0&&(t=n._length+t),i<0&&(i=n._length+i);let r=i-t;const l=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},vb=n=>{n.doc??De();const t=[];let i=n._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=n._start;for(n.doc??De();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return Sl(n,(r,l)=>{i.push(t(r,l,n))}),i},_M=n=>{let t=n._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},bb=(n,t)=>{n.doc??De();const i=su(n,t);let r=n._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=n.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const y=()=>{g.length>0&&(l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new xi(g)),l.integrate(n,0),g=[])};r.forEach(m=>{if(m===null)g.push(m);else switch(m.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(m);break;default:switch(y(),m.constructor){case Uint8Array:case ArrayBuffer:l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Tl(new Uint8Array(m))),l.integrate(n,0);break;case Yr:l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Al(m)),l.integrate(n,0);break;default:if(m instanceof Ae)l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ss(m)),l.integrate(n,0);else throw new Error(`Unexpected content type in insert operation`)}}}),y()},Eb=()=>Hn(`Length exceeded!`),Cb=(n,t,i,r)=>{if(i>t._length)throw Eb();if(i===0)return t._searchMarker&&ml(t._searchMarker,i,r.length),Mc(n,t,null,r);const l=i,o=su(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Mc(n,t,l,i)},xb=(n,t,i,r)=>{if(r===0)return;const l=i,o=r,u=su(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw Eb();t._searchMarker&&ml(t._searchMarker,l,-o+r)},kc=(n,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(n)},jp=(n,t,i,r)=>{const l=t._map.get(i)||null,o=n.doc,u=o.clientID;let d;if(r==null)d=new xi([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new xi([r]);break;case Uint8Array:d=new Tl(r);break;case Yr:d=new Al(r);break;default:if(r instanceof Ae)d=new Ss(r);else throw new Error(`Unexpected content type`)}new fe(Dt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(n,0)},Np=(n,t)=>{n.doc??De();const i=n._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},_b=n=>{const t={};return n.doc??De(),n._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},Tb=(n,t)=>{n.doc??De();const i=n._map.get(t);return i!==void 0&&!i.deleted},AM=(n,t)=>{const i={};return n._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&br(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},tc=n=>(n.doc??De(),JD(n._map.entries(),t=>!t[1].deleted));class OM extends nu{}class Mr extends Ae{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof Ae?i.clone():i)),t}get length(){return this.doc??De(),this._length}_callObserver(t,i){super._callObserver(t,i),iu(this,t,new OM(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{Cb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{TM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{xb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return bb(this,t)}toArray(){return vb(this)}slice(t=0,i=this.length){return Sb(this,t,i)}toJSON(){return this.map(t=>t instanceof Ae?t.toJSON():t)}map(t){return wb(this,t)}forEach(t){Sl(this,t)}[Symbol.iterator](){return _M(this)}_write(t){t.writeTypeRef(PM)}}const RM=n=>new Mr;class DM extends nu{constructor(t,i,r){super(t,i),this.keysChanged=r}}class qr extends Ae{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new qr}clone(){const t=new qr;return this.forEach((i,r)=>{t.set(r,i instanceof Ae?i.clone():i)}),t}_callObserver(t,i){iu(this,t,new DM(this,t,i))}toJSON(){this.doc??De();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Ae?l.toJSON():l}}),t}get size(){return[...tc(this)].length}keys(){return ed(tc(this),t=>t[0])}values(){return ed(tc(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return ed(tc(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??De(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Np(this,t)}has(t){return Tb(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,l){kc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(t2)}}const MM=n=>new qr,Xs=(n,t)=>n===t||typeof n==`object`&&typeof t==`object`&&n&&t&&JR(n,t);class Id{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&Sn(),this.right.content.constructor){case he:this.right.deleted||Qr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const dv=(n,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case he:t.right.deleted||Qr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?su(t,i):null;if(o){const u=new Id(o.p.left,o.p,o.index,l);return dv(n,u,i-o.index)}else{const u=new Id(null,t._start,0,l);return dv(n,u,i)}},Ab=(n,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===he&&Xs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=n.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,y=new fe(Dt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new he(d,u));y.integrate(n,0),i.right=y,i.forward()})},Qr=(n,t)=>{const{key:i,value:r}=t;r===null?n.delete(i):n.set(i,r)},Ob=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===he&&Xs(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Rb=(n,t,i,r)=>{const l=n.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Xs(g,p)){u.set(d,g);const{left:y,right:m}=i;i.right=new fe(Dt(o,ve(l.store,o)),y,y&&y.lastId,m,m&&m.id,t,null,new he(d,p)),i.right.integrate(n,0),i.forward()}}return u},sd=(n,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=n.doc,u=o.clientID;Ob(i,l);const d=Rb(n,t,i,l),p=r.constructor===String?new Kn(r):r instanceof Ae?new Ss(r):new Mi(r);let{left:g,right:y,index:m}=i;t._searchMarker&&ml(t._searchMarker,i.index,p.getLength()),y=new fe(Dt(u,ve(o.store,u)),g,g&&g.lastId,y,y&&y.id,t,null,p),y.integrate(n,0),i.right=y,i.index=m,i.forward(),Ab(n,t,i,d)},pv=(n,t,i,r,l)=>{const o=n.doc,u=o.clientID;Ob(i,l);const d=Rb(n,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===he));){if(!i.right.deleted)switch(i.right.content.constructor){case he:{const{key:p,value:g}=i.right.content,y=l[p];if(y!==void 0){if(Xs(y,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(n)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new fe(Dt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Kn(p)),i.right.integrate(n,0),i.forward()}Ab(n,t,i,d)},Db=(n,t,i,r,l)=>{let o=t;const u=Tn();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===he){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case he:{const{key:y,value:m}=g,v=r.get(y)??null;(u.get(y)!==g||v===m)&&(t.delete(n),d++,!p&&(l.get(y)??null)===m&&v!==m&&(v===null?l.delete(y):l.set(y,v))),!p&&!t.deleted&&Qr(l,g);break}}}t=t.right}return d},kM=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===he){const r=t.content.key;i.has(r)?t.delete(n):i.add(r)}t=t.left}},UM=n=>{let t=0;return $t(n.doc,i=>{let r=n._start,l=n._start,o=Tn();const u=Md(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case he:Qr(u,l.content);break;default:t+=Db(i,r,l,o,u),o=Md(u),r=l;break}l=l.right}}),t},zM=n=>{const t=new Set,i=n.doc;for(const[r,l]of n.afterState.entries()){const o=n.beforeState.get(r)||0;l!==o&&db(n,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===he&&u.constructor!==mn&&t.add(u.parent)})}$t(i,r=>{rb(n,n.deleteSet,l=>{if(l instanceof mn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===he?t.add(o):kM(r,l)});for(const l of t)UM(l)})},gv=(n,t,i)=>{const r=i,l=Md(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Ss:case Mi:case Kn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,y=0,m=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:m>0&&(b={delete:m}),m=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:y>0&&(b={retain:y},QR(p)||(b.attributes=$R({},p))),y=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case Ss:case Mi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=1);break;case Kn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=u.length);break;case he:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Xs(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Xs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Xs(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Xs(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Qr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Kr extends Ae{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??De(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Kr}clone(){const t=new Kr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new jM(this,t,i);iu(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??De();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Kn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const l=new Id(null,this._start,0,new Map);for(let o=0;o0)&&sd(r,this,l,d,u.attributes||{})}else u.retain!==void 0?pv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&gv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??De();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const m={};let v=!1;o.forEach((w,E)=>{v=!0,m[E]=w});const b={insert:d};v&&(b.attributes=m),l.push(b),d=``}}const y=()=>{for(;p!==null;){if(br(p,t)||i!==void 0&&br(p,i))switch(p.content.constructor){case Kn:{const m=o.get(`ychange`);t!==void 0&&!br(p,t)?(m===void 0||m.user!==p.id.client||m.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!br(p,i)?(m===void 0||m.user!==p.id.client||m.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):m!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case Ss:case Mi:{g();const m={insert:p.content.getContent()[0]};if(o.size>0){const v={};m.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(m);break}case he:br(p,t)&&(g(),Qr(o,p.content));break}p=p.right}g()};return t||i?$t(u,m=>{t&&Bd(m,t),i&&Bd(m,i),y()},`cleanup`):y(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),sd(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);sd(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,l=>{gv(l,ec(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!1);u.right!==null&&pv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Np(this,t)}getAttributes(){return _b(this)}_write(t){t.writeTypeRef(e2)}}const NM=n=>new Kr;class id{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??De()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Vr||i.constructor===Ci)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ci extends Ae{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ci}clone(){const t=new Ci;return t.insert(0,this.toArray().map(i=>i instanceof Ae?i.clone():i)),t}get length(){return this.doc??De(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new id(this,t)}querySelector(t){t=t.toUpperCase();const r=new id(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ei(new id(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){iu(this,t,new IM(this,i,t))}toString(){return wb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),Sl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?$t(this.doc,r=>{Cb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const l=t&&t instanceof Ae?t._item:t;Mc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Hn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{xb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return vb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return bb(this,t)}slice(t=0,i=this.length){return Sb(this,t,i)}forEach(t){Sl(this,t)}_write(t){t.writeTypeRef(s2)}}const BM=n=>new Ci;class Vr extends Ci{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new Vr(this.nodeName)}clone(){const t=new Vr(this.nodeName),i=this.getAttributes();return YR(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Ae?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Np(this,t)}hasAttribute(t){return Tb(this,t)}getAttributes(t){return t?AM(this,t):_b(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return Sl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(n2),t.writeKey(this.nodeName)}}const LM=n=>new Vr(n.readKey());class IM extends nu{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Uc extends qr{constructor(t){super(),this.hookName=t}_copy(){return new Uc(this.hookName)}clone(){const t=new Uc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(i2),t.writeKey(this.hookName)}}const HM=n=>new Uc(n.readKey());class zc extends Kr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new zc}clone(){const t=new zc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(r2)}}const qM=n=>new zc;class Bp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw An()}mergeWith(t){return!1}write(t,i,r){throw An()}integrate(t,i){throw An()}}const KM=0;class mn extends Bp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),hb(t.doc.store,this)}write(t,i){t.writeInfo(KM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Tl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Tl(this.content)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const VM=n=>new Tl(n.readBuf());class vl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new vl(this.len)}splice(t){const i=new vl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Rc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const $M=n=>new vl(n.readLen()),Mb=(n,t)=>new Yr({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Al{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Al(Mb(this.doc.guid,this.opts))}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const GM=n=>new Al(Mb(n.readString(),n.readAny()));class Mi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Mi(this.embed)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const YM=n=>new Mi(n.readJSON());class he{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new he(this.key,this.value)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const QM=n=>new he(n.readKey(),n.readJSON());class jc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new jc(this.arr)}splice(t){const i=new jc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=n.readLen(),i=[];for(let r=0;r{const t=n.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const ZM=n=>new Kn(n.readString()),WM=[RM,MM,NM,LM,BM,HM,qM],PM=0,t2=1,e2=2,n2=3,s2=4,i2=5,r2=6;class Ss{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Ss(this.type._copy())}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const a2=n=>new Ss(WM[n.readTypeRef()](n)),Nc=(n,t,i)=>{const{client:r,clock:l}=t.id,o=new fe(Dt(r,l+i),t,Dt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Dt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class fe extends Bp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?GS:0}set marker(t){(this.info&Fh)>0!==t&&(this.info^=Fh)}get marker(){return(this.info&Fh)>0}get keep(){return(this.info&$S)>0}set keep(t){this.keep!==t&&(this.info^=$S)}get countable(){return(this.info&GS)>0}get deleted(){return(this.info&Xh)>0}set deleted(t){this.deleted!==t&&(this.info^=Xh)}markDeleted(){this.info|=Xh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Dr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ov(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===mn||this.right&&this.right.constructor===mn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===fe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===fe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Dr){const r=nd(i,this.parent);r.constructor===mn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=ov(t,t.doc.store,Dt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Po(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Rc(t.deleteSet,this.id.client,this.id.clock,this.length),uv(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw Sn();this.content.gc(t),i?hM(t,this,new mn(this.id,this.length)):this.content=new vl(this.length)}write(t,i){const r=i>0?Dt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&$c|(r===null?0:sn)|(l===null?0:gs)|(o===null?0:ul);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=uM(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Dr?(t.writeParentInfo(!1),t.writeLeftID(d)):Sn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const kb=(n,t)=>l2[t&$c](n),l2=[()=>{Sn()},$M,JM,VM,ZM,YM,QM,a2,FM,GM,()=>{Sn()}],o2=10;class xn extends Bp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){Sn()}write(t,i){t.writeInfo(o2),Mt(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const Ub=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},zb=`__ $YJS$ __`;Ub[zb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);Ub[zb]=!0;const jb=Math.floor,c2=(n,t)=>nn>t?n:t,Nb=128,pc=127,f2=Number.MAX_SAFE_INTEGER,Bb=()=>new Set,Lb=Array.from,h2=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lwl.encode(n),p2=wl?d2:h2;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);class g2{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Ib=()=>new g2,y2=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(y2(n));let i=0;for(let r=0;r{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},kr=(n,t)=>{for(;t>pc;)Bc(n,Nb|pc&t),t=jb(t/128);Bc(n,pc&t)},Hd=new Uint8Array(3e4),m2=Hd.length/3,S2=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;kr(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=c2(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(u2(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},qb=(n,t)=>{kr(n,t.byteLength),b2(n,t)},Kb=n=>new Error(n),E2=Kb(`Unexpected end of array`),C2=Kb(`Integer out of Range`);class x2{constructor(t){this.arr=t,this.pos=0}}const qd=n=>new x2(n),yv=n=>n.pos!==n.arr.length,_2=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},Kd=n=>_2(n,sl(n)),mv=n=>n.arr[n.pos++],sl=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posf2)throw C2}throw E2},T2=n=>{let t=sl(n);if(t===0)return``;{let i=String.fromCodePoint(mv(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(mv(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},A2=n=>nl.decode(Kd(n)),O2=nl?A2:T2,Lc=Date.now,Ur=()=>new Map,Vb=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r};class R2{constructor(){this._observers=Ur()}on(t,i){return Vb(this._observers,t,Bb).add(i),i}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Lb((this._observers.get(t)||Ur()).values()).forEach(r=>r(...i))}destroy(){this._observers=Ur()}}class D2{constructor(){this._observers=Ur()}on(t,i){Vb(this._observers,t,Bb).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Lb((this._observers.get(t)||Ur()).values()).forEach(r=>r(...i))}destroy(){this._observers=Ur()}}const Sv=Symbol(`Equality`),M2=Object.keys,vv=n=>M2(n).length,k2=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),il=(n,t)=>{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[Sv]!=null)return n[Sv](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;i{const i=Lc();this.getLocalState()!==null&&rd/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&rd<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&z2(this,r,`timeout`)},jb(rd/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:Lc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),il(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const z2=(n,t,i)=>{const r=[];for(let l=0;l0&&(n.emit(`change`,[{added:[],updated:[],removed:r},i]),n.emit(`update`,[{added:[],updated:[],removed:r},i]))},wv=(n,t,i=n.states)=>{const r=t.length,l=Ib();kr(l,r);for(let o=0;o{const r=qd(t),l=Lc(),o=[],u=[],d=[],p=[],g=sl(r);for(let y=0;y0||d.length>0||p.length>0)&&n.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&n.emit(`update`,[{added:o,updated:u,removed:p},i])},N2={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},B2=15e3;var L2=class gc extends R2{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return N2[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&iv(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new jn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Lv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=y=>{l||(l=!0,g(y))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const y=new jn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const m=await y.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=m.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await m.closed,p();continue}catch(m){if(g()){p();return}if(this.isNotFoundError(m)){if(d){o(m instanceof Error?m:new Error(String(m)));return}this.emit(`error`,[m instanceof Error?m:new Error(String(m))]),this.disconnect();return}if(d){o(m instanceof Error?m:new Error(String(m)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Ib();return qb(i,t),Hb(i)}applyUpdates(t){if(t.length===0)return;const i=qd(t);for(;yv(i);){const r=Kd(i);iv(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qd(t);for(;yv(i);){const r=Kd(i);try{j2(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(gc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},B2),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=wv(this.awareness,[this.awareness.clientID]);new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(gc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=wv(this.awareness,o);await new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(gc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Wt&&t.code===`NOT_FOUND`||t instanceof Fs&&t.status===404}isAuthError(t){return t instanceof Wt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof Fs&&(t.status===401||t.status===403)}};const I2=64,H2=64,bv=120,q2=1500,Vd=.3,Ev=12e4,Cv=`#d0bcff`;function K2(n){const t=n.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:I2,rows:H2}}function rl(n){return n.getMap(`territoryCell`)}function Qs(n){return n.getMap(`players`)}function ru(n){return n.getMap(`gameState`)}function $d(n,t){const i=Qs(n),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function xv(n){const t=rl(n),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function V2(n,t){let i=0;return n.forEach(r=>{r.owner===t&&i++}),i}function $2(n,t,i,r,l){const o=new Set,u=new Set;t.forEach((y,m)=>{y.owner===n?o.add(m):l.has(y.owner)&&u.add(m)});const d=new Set,p=[];for(let y=0;y0;){const{x:y,y:m}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=y+v,E=m+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let y=0;yG.x===v&&G.y===b);if(E){const[G,k]=E,L=g+q2,X=Qs(n);return X.set(G,{...k,stunnedUntil:L}),X.set(t,{x:l.x,y:l.y,name:i,color:r,stunnedUntil:L}),{moved:!1,stunned:!0,x:l.x,y:l.y,stunnedUntil:L}}Qs(n).set(t,{x:v,y:b,name:i,color:r});const B=rl(n),D=Date.now();n.transact(()=>{B.set(`${v},${b}`,{owner:t,claimedAt:D})});const O=new Set([t]);$d(n,t).forEach((G,k)=>O.add(k));const M=$2(t,B,u,d,O);return M.length>0&&n.transact(()=>{for(const G of M)B.set(`${G.x},${G.y}`,{owner:t,claimedAt:D})}),{moved:!0,stunned:!1,x:v,y:b,stunnedUntil:0}}function _v(n){const t=ru(n);t.has(`gameStartedAt`)||n.transact(()=>{t.has(`gameStartedAt`)||t.set(`gameStartedAt`,Date.now())})}function Q2(n){const i=ru(n).get(`gameStartedAt`);return i!==void 0?i:null}function ad(n){const i=ru(n).get(`gameEndedAt`);return i!==void 0?i:null}function Tv(n){const t=ru(n);(!t.has(`gameEndedAt`)||t.get(`gameEndedAt`)===null)&&n.transact(()=>{t.set(`gameEndedAt`,Date.now())})}function Lp(n){const t=new Map;return n.forEach(i=>{t.set(i.owner,(t.get(i.owner)||0)+1)}),t}function J2(n,t,i){const r=Lp(n),l=Vd*t;for(const[o,u]of r)if(u>=l){const d=i.get(o);if(d)return{name:d.name,pct:Math.round(u/t*100)}}return null}function X2(n,t,i){const r=Lp(n);let l=0,o=``;if(r.forEach((d,p)=>{d>l&&(l=d,o=p)}),!o||l===0)return null;const u=i.get(o);return u?{name:u.name,pct:Math.round(l/t*100)}:null}const $b=Z.createContext(null);function F2(){const n=Z.useContext($b);if(!n)throw new Error(`useGameRoom must be used within GameRoom`);return n}function Z2(n,t){return Cw({streamOptions:{url:n,headers:t,contentType:`application/json`},state:KS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(KS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Av=Z.createContext(null);function W2({roomId:n,children:t}){const{dsEndpoint:i,dsHeaders:r}=Yd(),[l,o]=Z.useState(null),[u,d]=Z.useState(null);return Z.useEffect(()=>{let p=null,g=!1;const y=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(n)}`,w=await new jn({url:v,headers:r,contentType:`application/json`}).head();if(y()||(w.exists||await jn.create({url:v,headers:r,contentType:`application/json`}),p=await Z2(v,r),await p.preload(),y()))return;o(p)}catch(v){if(y())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[n,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?Y.jsx(Av.Provider,{value:{scoresDB:l},children:t}):Y.jsx(Av.Provider,{value:null,children:t})}const P2=1,Sr=8,Ov=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},vr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function tk(n,t){return n>256||t>256?2:n>64||t>64?4:14}function ek({onLeave:n}){const{doc:t,awareness:i,roomId:r,playerId:l,playerName:o,playerColor:u}=F2(),{cols:d,rows:p}=Z.useMemo(()=>K2(r),[r]),g=d*p,y=Z.useMemo(()=>tk(d,p),[d,p]),m=d<=100&&p<=100,[v,b]=Z.useState(new Map),[w,E]=Z.useState(new Map),[T,B]=Z.useState({x:0,y:0}),[D,O]=Z.useState(1),[M,G]=Z.useState(!1),[k,L]=Z.useState(!1),[X,tt]=Z.useState(null),[F,at]=Z.useState(Ev/1e3),et=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),wt=Z.useRef(void 0),Bt=Z.useRef(null),ht=Z.useRef({x:0,y:0,stunnedUntil:0}),U=Z.useMemo(()=>V2(v,l)*P2,[v,l]),q=Z.useMemo(()=>Math.round(U/g*100),[U,g]),W=Z.useMemo(()=>Lp(v),[v]),st=Z.useMemo(()=>{let nt=0,P=``;if(W.forEach((St,Jt)=>{St>nt&&(nt=St,P=Jt)}),!P||nt===0)return null;const dt=Math.round(nt/g*100);if(P===l)return{name:o,pct:dt};const pt=w.get(P);return pt?{name:pt.name,pct:dt}:null},[W,g,l,o,w]);Z.useEffect(()=>{const nt=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);ht.current={x:nt,y:P,stunnedUntil:0},B({x:nt,y:P});const dt=Qs(t);dt.set(l,{x:nt,y:P,name:o,color:u});const pt=rl(t);return t.transact(()=>{pt.set(`${nt},${P}`,{owner:l,claimedAt:Date.now()})}),_v(t),()=>{dt.delete(l)}},[t,l,o,u,d,p]),Z.useEffect(()=>{const nt=rl(t),P=()=>{const dt=xv(t);if(b(dt),ad(t)!==null)return;const pt=J2(dt,g,Qs(t));pt&&(tt(pt),Tv(t))};return nt.observe(P),P(),()=>nt.unobserve(P)},[t,g]),Z.useEffect(()=>{const nt=()=>{const dt=Q2(t);if(!dt)return;const pt=Date.now()-dt,St=Math.max(0,Ev-pt);if(at(Math.ceil(St/1e3)),St<=0&&ad(t)===null){const Jt=xv(t),rn=X2(Jt,g,Qs(t));tt(rn||{name:`Nobody`,pct:0}),Tv(t)}},P=setInterval(nt,1e3);return nt(),()=>clearInterval(P)},[t,g]),Z.useEffect(()=>{const nt=Qs(t),P=()=>{E($d(t,l))};return nt.observe(P),P(),()=>nt.unobserve(P)},[t,l]),Z.useEffect(()=>{const nt=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((St,Jt)=>{if(Jt!==i.clientID){St.playerId&&P.add(St.playerId);const rn=St.user?.name;rn&&dt.add(rn)}}),O(St=>{const Jt=dt.size;return St===Jt?St:Jt});const pt=Qs(t);pt.forEach((St,Jt)=>{Jt!==l&&!P.has(Jt)&&pt.delete(Jt)})};return i.on(`change`,nt),nt(),()=>i.off(`change`,nt)},[i,t,l,o]),Z.useEffect(()=>{const nt=new Set,P=pt=>{if(pt.key in vr){pt.preventDefault();const St=!Bt.current;nt.add(pt.key),Bt.current=vr[pt.key],St&&xt.current?.(vr[pt.key])}},dt=pt=>{if(nt.delete(pt.key),pt.key in vr){let St=!1;for(const Jt of nt)if(Jt in vr){Bt.current=vr[Jt],St=!0;break}St||(Bt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const ut=Z.useRef(null),_=Z.useRef(null),H=Z.useRef(0),Q=10,J=Z.useCallback((nt,P)=>{const dt=Date.now();if(dt-H.currentMath.abs(vs)?xt.current?.({dx:ki>0?1:-1,dy:0}):xt.current?.({dx:0,dy:vs>0?1:-1}),H.current=dt)},[y]),ot=Z.useCallback(nt=>{nt.preventDefault();const P=nt.touches[0];_.current={x:P.clientX,y:P.clientY},J(P.clientX,P.clientY)},[J]),it=Z.useCallback(nt=>{if(nt.preventDefault(),!_.current)return;const P=nt.touches[0],dt=P.clientX-_.current.x,pt=P.clientY-_.current.y;Math.abs(dt){_.current=null},[]),xt=Z.useRef(void 0),bt=Z.useCallback(nt=>{const P=ut.current;if(!P)return;const dt=P.createSVGPoint();dt.x=nt.clientX,dt.y=nt.clientY;const pt=P.getScreenCTM();if(!pt)return;const St=dt.matrixTransform(pt.inverse()),Jt=St.x/y-.5,rn=St.y/y-.5,de=ht.current,ti=Jt-de.x,Gn=rn-de.y;ti===0&&Gn===0||(Math.abs(ti)>Math.abs(Gn)?xt.current?.({dx:ti>0?1:-1,dy:0}):xt.current?.({dx:0,dy:Gn>0?1:-1}))},[y]),$e=Z.useCallback(()=>{n()},[n]);Z.useEffect(()=>{const nt=dt=>{if(ad(t)!==null)return;const pt=ht.current,St=Y2(t,l,o,u,{x:pt.x,y:pt.y},dt,d,p,pt.stunnedUntil);pt.stunnedUntil=St.stunnedUntil,St.moved&&(pt.x=St.x,pt.y=St.y,B({x:St.x,y:St.y}),i.setLocalState({...i.getLocalState(),x:St.x,y:St.y}))};xt.current=nt;const P=setInterval(()=>{const dt=Bt.current;dt&&nt(dt)},bv);return()=>clearInterval(P)},[t,l,o,u,d,p,i]);const Ge=d*y,$n=p*y,Jr=Z.useCallback(()=>{navigator.clipboard.writeText(et).catch(()=>{}),G(!0),clearTimeout(wt.current),wt.current=setTimeout(()=>G(!1),1200)},[et]);Z.useEffect(()=>()=>clearTimeout(wt.current),[]);const wn=Z.useMemo(()=>m?Y.jsxs(Y.Fragment,{children:[Array.from({length:d},(nt,P)=>Y.jsx(`line`,{x1:P*y,y1:0,x2:P*y,y2:$n,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(nt,P)=>Y.jsx(`line`,{x1:0,y1:P*y,x2:Ge,y2:P*y,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}):null,[d,p,Ge,$n,y,m]),Xr=Z.useMemo(()=>{const nt=new Map;return nt.set(l,u),w.forEach((P,dt)=>{nt.set(dt,P.color)}),nt},[l,u,w]),Fr=nt=>{const P=Math.floor(nt/60),dt=nt%60;return`${P}:${dt.toString().padStart(2,`0`)}`};return Y.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Y.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + `}),Y.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:Sr},children:[Y.jsx(`button`,{onClick:$e,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:Sr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Y.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:Jr,title:`Click to copy room name`,children:[Y.jsx(`span`,{style:{color:Vt.accent},children:o}),Y.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Y.jsx(`span`,{style:{color:M?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:M?`COPIED`:et})]}),Y.jsx(`span`,{style:{color:F<=30?`#FF3D71`:Vt.accent,fontVariantNumeric:`tabular-nums`},children:Fr(F)}),Y.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(nt=>!nt),children:[D,` PLAYERS`,k&&Y.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(w.entries()).map(([nt,P])=>({id:nt,name:P.name,color:P.color}))].map(nt=>{const P=W.get(nt.id)||0,dt=Math.round(P/g*100);return Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Y.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Y.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:nt.color,display:`inline-block`}}),nt.name]}),Y.jsxs(`span`,{style:{color:Vt.accent},children:[dt,`%`]})]},nt.id)})})]})]}),Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:Sr},children:[Y.jsxs(`div`,{children:[Y.jsxs(`span`,{style:{fontSize:Ov,color:Vt.accent},children:[q,`%`]}),` `,Y.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Y.jsxs(`div`,{style:{textAlign:`right`},children:[Y.jsxs(`div`,{style:{marginBottom:st?4:0,color:st&&st.pct>=Math.round(Vd*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Vd*100),`%`]}),st&&Y.jsxs(`div`,{children:[Y.jsx(`span`,{style:{color:Vt.dim},children:st.name}),` `,Y.jsxs(`span`,{style:{fontSize:Ov,color:Vt.accent},children:[st.pct,`%`]})]})]})]}),Y.jsxs(`svg`,{ref:ut,viewBox:`0 0 ${Ge} ${$n}`,onTouchStart:ot,onTouchMove:it,onTouchEnd:vt,onClick:bt,style:{width:`min(100%, calc(100dvh - 140px))`,maxWidth:Ge,height:`auto`,aspectRatio:`${d} / ${p}`,background:Vt.grid,border:`1px solid ${Vt.border}`,flexShrink:0,userSelect:`none`,WebkitUserSelect:`none`},children:[wn,Array.from(v.entries()).map(([nt,P])=>{const[dt,pt]=nt.split(`,`).map(Number),St=Xr.get(P.owner)||Vt.accent;return Y.jsx(`rect`,{x:dt*y,y:pt*y,width:y,height:y,fill:St,opacity:.5},nt)}),Array.from(w.entries()).map(([nt,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const nt=ht.current.stunnedUntil>0&&Date.now(){const nt=rl(t),P=t.getMap(`gameState`);t.transact(()=>{Array.from(nt.keys()).forEach(pt=>nt.delete(pt)),P.delete(`gameStartedAt`),P.delete(`gameEndedAt`)}),tt(null),_v(t)},style:{fontFamily:`inherit`,fontSize:Sr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Y.jsx(`button`,{onClick:$e,style:{fontFamily:`inherit`,fontSize:Sr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}function nk({roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:l}){const{registryDB:o}=_w(),[{playerId:u,playerColor:d,doc:p,awareness:g}]=Z.useState(()=>{const D=`player-${Math.random().toString(36).slice(2,10)}`,O=new Yr,M=new U2(O);return M.setLocalState({user:{name:r,color:Cv},playerId:D,type:`human`}),{playerId:D,playerColor:Cv,doc:O,awareness:M}}),[y,m]=Z.useState(!0),[v,b]=Z.useState(!1),[w,E]=Z.useState(null),T=Z.useRef(null);Z.useEffect(()=>{const D=new L2({doc:p,baseUrl:t,docId:n,awareness:g,headers:i,connect:!1});return D.on(`synced`,O=>{b(O),O&&m(!1)}),D.on(`status`,O=>{O===`connected`&&m(!1)}),D.on(`error`,O=>{E(O),m(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u,type:`human`}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[n,p,g,t,i,r,d,u]),Z.useEffect(()=>{const O=setInterval(()=>{const M=new Set([u]);if(g.getStates().forEach(L=>{L.playerId&&M.add(L.playerId)}),[...M].sort()[0]!==u)return;const k=o.collections.rooms.toArray.find(L=>L.roomId===n);if(k)try{o.actions.addRoom({...k,expiresAt:Date.now()+gp*1e3})}catch{}},YO);return()=>clearInterval(O)},[g,o,n,u]),Z.useEffect(()=>()=>{p.destroy()},[p]);const B=Z.useMemo(()=>({doc:p,awareness:g,roomId:n,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:y}),[p,g,n,u,r,d,v,y]);return w?Y.jsxs(`div`,{style:ld.center,children:[Y.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Y.jsx(`button`,{onClick:l,style:ld.btn,children:`BACK`})]}):y?Y.jsxs(`div`,{style:ld.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Y.jsx($b.Provider,{value:B,children:Y.jsx(W2,{roomId:n,children:Y.jsx(ek,{onLeave:l})})})}const ld={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},Rv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],Dv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function sk(){const n=Rv[Math.floor(Math.random()*Rv.length)],t=Dv[Math.floor(Math.random()*Dv.length)];return`${n} ${t}`}function ik(){return localStorage.getItem(`territory-player-name`)||sk()}function rk(){const[n,t]=Z.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return Z.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),n}function ak(){const n=rk(),{yjsEndpoint:t,yjsHeaders:i}=Yd(),[r,l]=Z.useState(ik),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return n?Y.jsx(nk,{roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Y.jsx(tR,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function lk(){return Y.jsx(EC,{children:Y.jsx(ZO,{children:Y.jsx(ak,{})})})}wC.createRoot(document.getElementById(`root`)).render(Y.jsx(lk,{})); diff --git a/website/public/demos/territory-wars/assets/index-CeLYWEfe.js b/website/public/demos/territory-wars/assets/index-CeLYWEfe.js deleted file mode 100644 index 083c8d7710..0000000000 --- a/website/public/demos/territory-wars/assets/index-CeLYWEfe.js +++ /dev/null @@ -1,42 +0,0 @@ -(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function z1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var hh={exports:{}},Ga={};var C0;function j1(){if(C0)return Ga;C0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:s,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Ga.Fragment=t,Ga.jsx=i,Ga.jsxs=i,Ga}var x0;function N1(){return x0||(x0=1,hh.exports=j1()),hh.exports}var Q=N1(),dh={exports:{}},$a={},ph={exports:{}},gh={};var _0;function B1(){return _0||(_0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ut=M[at];if(0>>1;at<_;){var H=2*(at+1)-1,Y=M[H],F=H+1,ot=M[F];if(0>l(Y,Z))Fl(ot,Y)?(M[at]=ot,M[F]=Z,at=F):(M[at]=Y,M[H]=Z,at=H);else if(Fl(ot,Z))M[at]=ot,M[F]=Z,at=F;else break t}}return q}function l(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,st());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function J(){return T?!0:!(s.unstable_now()-ttM&&J());){var at=y.callback;if(typeof at==`function`){y.callback=null,v=y.priorityLevel;var ut=at(y.expirationTime<=M);if(M=s.unstable_now(),typeof ut==`function`){y.callback=ut,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?st():I=!1}}}var st;if(typeof A==`function`)st=function(){A(nt)};else if(typeof MessageChannel<`u`){var Ct=new MessageChannel,Kt=Ct.port2;Ct.port1.onmessage=nt,st=function(){Kt.postMessage(null)}}else st=function(){N(nt,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125at?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-at))):(M.sortIndex=ut,t(p,M),w||b||(w=!0,I||(I=!0,st()))),M},s.unstable_shouldYield=J,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(gh)),gh}var T0;function L1(){return T0||(T0=1,ph.exports=B1()),ph.exports}var yh={exports:{}},yt={};var A0;function I1(){if(A0)return yt;A0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var F=Y.ref;return{$$typeof:s,type:_,key:H,ref:F!==void 0?F:null,props:Y}}function J(_,H){return tt(_.type,H,_.props)}function nt(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function st(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var Ct=/\/+/g;function Kt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?st(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,F,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var gt=!1;if(_===null)gt=!0;else switch(it){case`bigint`:case`string`:case`number`:gt=!0;break;case`object`:switch(_.$$typeof){case s:case t:gt=!0;break;case m:return gt=_._init,M(gt(_._payload),H,Y,F,ot)}}if(gt)return ot=ot(_),gt=F===``?`.`+Kt(_,0):F,L(ot)?(Y=``,gt!=null&&(Y=gt.replace(Ct,`$&/`)+`/`),M(ot,H,Y,``,function(ln){return ln})):ot!=null&&(nt(ot)&&(ot=J(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(Ct,`$&/`)+`/`)+gt)),H.push(ot)),1;gt=0;var Dt=F===``?`.`:F+`:`;if(L(_))for(var vt=0;vt<_.length;vt++)F=_[vt],it=Dt+Kt(F,vt),gt+=M(F,H,Y,it,ot);else if(vt=b(_),typeof vt==`function`)for(_=vt.call(_),vt=0;!(F=_.next()).done;)F=F.value,it=Dt+Kt(F,vt++),gt+=M(F,H,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,F,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return gt}function q(_,H,Y){if(_==null)return _;var F=[],ot=0;return M(_,F,``,``,function(it){return H.call(Y,it,ot++)}),F}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var at=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!nt(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return yt.Activity=y,yt.Children=ut,yt.Component=N,yt.Fragment=i,yt.Profiler=l,yt.PureComponent=A,yt.StrictMode=r,yt.Suspense=p,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,yt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},yt.cache=function(_){return function(){return _.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var F=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(F[it]=H[it]);var it=arguments.length-2;if(it===1)F.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),mh.exports=H1(),mh.exports}var M0;function K1(){if(M0)return $a;M0=1;var s=L1(),t=jd(),i=q1();function r(e){var n=`https://react.dev/errors/`+e;if(1ut||(e.current=at[ut],at[ut]=null,ut--)}function Y(e,n){ut++,at[ut]=e.current,e.current=n}var F=_(null),ot=_(null),it=_(null),gt=_(null);function Dt(e,n){switch(Y(it,n),Y(ot,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ym(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ym(n),e=Qm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(F),Y(F,e)}function vt(){H(F),H(ot),H(it)}function ln(e){e.memoizedState!==null&&Y(gt,e);var n=F.current,a=Qm(n,e.type);n!==a&&(Y(ot,e),Y(F,a))}function Es(e){ot.current===e&&(H(F),H(ot)),gt.current===e&&(H(gt),Ha._currentValue=Z)}var et,P;function dt(e){if(et===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);et=n&&n[1]||``,P=-1)`:-1f||x[c]!==U[f]){var V=` -`+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{pt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?dt(a):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return dt(e.type);case 16:return dt(`Lazy`);case 13:return e.child!==n&&n!==null?dt(`Suspense Fallback`):dt(`Suspense`);case 19:return dt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return dt(`Activity`);default:return``}}function te(e){try{var n=``,a=null;do n+=kt(e,a),a=e,e=e.return;while(e);return n}catch(c){return` -Error generating stack: `+c.message+` -`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,_l=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,Tl=s.unstable_LowPriority,Tp=s.unstable_IdlePriority,yb=s.log,mb=s.unstable_setDisableYieldValue,Wr=null,Xe=null;function _s(e){if(typeof yb==`function`&&mb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Wr,e)}catch{}}var Ze=Math.clz32?Math.clz32:wb,Sb=Math.log,vb=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(Sb(e)/vb|0)|0}var Al=256,Ol=262144,Rl=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dl(e,n,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):a||(a=C&~e,a!==0&&(f=ii(a))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):a||(a=c&~e,a!==0&&(f=ii(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function Pr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ap(){var e=Rl;return Rl<<=1,(Rl&62914560)===0&&(Rl=4194304),e}function Pc(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function ta(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,n,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ob=/[\n"\\]/g;function cn(e){return e.replace(Ob,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function ru(e,n,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):a!=null?au(e,S,on(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Hp(e,n,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){iu(e);return}a=a!=null?``+on(a):``,n=n!=null?``+on(n):a,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),iu(e)}function au(e,n,a){n===`number`&&Ul(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Gi(e,n,a,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),fu=!1;if(Xn)try{var ia={};Object.defineProperty(ia,`passive`,{get:function(){fu=!0}}),window.addEventListener(`test`,ia,ia),window.removeEventListener(`test`,ia,ia)}catch{fu=!1}var As=null,hu=null,jl=null;function Qp(){if(jl)return jl;var e,n=hu,a=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=la),Pp=` `,tg=!1;function eg(e,n){switch(e){case`keyup`:return nE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ng(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function iE(e,n){switch(e){case`compositionend`:return ng(n);case`keypress`:return n.which!==32?null:(tg=!0,Pp);case`textInput`:return e=n.data,e===Pp&&tg?null:e;default:return null}}function rE(e,n){if(Fi)return e===`compositionend`||!mu&&eg(e,n)?(e=Qp(),jl=hu=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:a,offset:n-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=ug(a)}}function hg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ul(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href==`string`}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ul(e.document)}return n}function wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var dE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,bu=null,fa=null,Eu=!1;function pg(e,n,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Eu||Ji==null||Ji!==Ul(c)||(c=Ji,`selectionStart`in c&&wu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fa&&ua(fa,c)||(fa=c,c=Ro(bu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|a<St?(_t=lt,lt=null):_t=lt.sibling;var zt=j(R,lt,k[St],G);if(zt===null){lt===null&&(lt=_t);break}e&<&&zt.alternate===null&&n(R,lt),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt,lt=_t}if(St===k.length)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;StSt?(_t=lt,lt=null):_t=lt.sibling;var Js=j(R,lt,zt.value,G);if(Js===null){lt===null&&(lt=_t);break}e&<&&Js.alternate===null&&n(R,lt),O=h(Js,O,St),Ut===null?ct=Js:Ut.sibling=Js,Ut=Js,lt=_t}if(zt.done)return a(R,lt),Ot&&Wn(R,St),ct;if(lt===null){for(;!zt.done;St++,zt=k.next())zt=$(R,zt.value,G),zt!==null&&(O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,St),ct}for(lt=c(lt);!zt.done;St++,zt=k.next())zt=B(lt,R,St,zt.value,G),zt!==null&&(e&&zt.alternate!==null&<.delete(zt.key===null?St:zt.key),O=h(zt,O,St),Ut===null?ct=zt:Ut.sibling=zt,Ut=zt);return e&<.forEach(function(U1){return n(R,U1)}),Ot&&Wn(R,St),ct}function Ht(R,O,k,G){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ct=k.key;O!==null;){if(O.key===ct){if(ct=k.type,ct===E){if(O.tag===7){a(R,O.sibling),G=f(O,k.props.children),G.return=R,R=G;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&gi(ct)===O.type){a(R,O.sibling),G=f(O,k.props),ma(G,k),G.return=R,R=G;break t}a(R,O);break}else n(R,O);O=O.sibling}k.type===E?(G=ui(k.props.children,R.mode,G,k.key),G.return=R,R=G):(G=$l(k.type,k.key,k.props,null,R.mode,G),ma(G,k),G.return=R,R=G)}return S(R);case w:t:{for(ct=k.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){a(R,O.sibling),G=f(O,k.children||[]),G.return=R,R=G;break t}else{a(R,O);break}else n(R,O);O=O.sibling}G=Ru(k,R.mode,G),G.return=R,R=G}return S(R);case X:return k=gi(k),Ht(R,O,k,G)}if(ht(k))return rt(R,O,k,G);if(st(k)){if(ct=st(k),typeof ct!=`function`)throw Error(r(150));return k=ct.call(k),ft(R,O,k,G)}if(typeof k.then==`function`)return Ht(R,O,Wl(k),G);if(k.$$typeof===A)return Ht(R,O,Fl(R,k),G);Pl(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(a(R,O.sibling),G=f(O,k),G.return=R,R=G):(a(R,O),G=Ou(k,R.mode,G),G.return=R,R=G),S(R)):a(R,O)}return function(R,O,k,G){try{ya=0;var ct=Ht(R,O,k,G);return ar=null,ct}catch(lt){if(lt===rr||lt===Xl)throw lt;var Ut=Pe(29,lt,null,R.mode);return Ut.lanes=G,Ut.return=R,Ut}}}var mi=Bg(!0),Lg=Bg(!1),ks=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Gl(e),bg(e,null,a),n}return Vl(e,c,n,a),Gl(e)}function Sa(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}function Vu(e,n){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Gu=!1;function va(){if(Gu){var e=ir;if(e!==null)throw e}}function wa(e,n,a,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;j=n;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,j);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,j=typeof rt==`function`?rt.call(Ht,$,j):rt,j==null)break t;$=y({},$,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=$):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=$),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=$}}function Ig(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Hg(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,uf(e,!1,n,a);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=EE(x,c);Ca(e,n,V,rn(e))}else Ca(e,n,c,rn(e))}catch($){Ca(e,n,{then:function(){},status:`rejected`,reason:$},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function OE(){}function of(e,n,a,c){if(e.tag!==5)throw Error(r(476));var f=Sy(e).queue;my(e,f,n,Z,a===null?OE:function(){return vy(e),a(c)})}function Sy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vy(e){var n=Sy(e);n.next===null&&(n=e.alternate.memoizedState),Ca(e,n.next.queue,{},rn())}function cf(){return xe(Ha)}function wy(){return ne().memoizedState}function by(){return ne().memoizedState}function RE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=rn();e=Us(a);var c=zs(n,e,a);c!==null&&(Ye(c,n,a),Sa(c,n,a)),n={cache:Bu()},e.payload=n;return}n=n.return}}function DE(e,n,a){var c=rn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},co(e)?Cy(n,a):(a=Tu(e,n,a,c),a!==null&&(Ye(a,e,c),xy(a,n,c)))}function Ey(e,n,a){var c=rn();Ca(e,n,a,c)}function Ca(e,n,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(co(e))Cy(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Vl(e,n,f,0),qt===null&&Kl(),!1}catch{}if(a=Tu(e,n,f,c),a!==null)return Ye(a,e,c),xy(a,n,c),!0}return!1}function uf(e,n,a,c){if(c={lane:2,revertLane:Kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},co(e)){if(n)throw Error(r(479))}else n=Tu(e,a,c,2),n!==null&&Ye(n,e,2)}function co(e){var n=e.alternate;return e===mt||n!==null&&n===mt}function Cy(e,n){or=no=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function xy(e,n,a){if((a&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,a|=c,n.lanes=a,Rp(e,a)}}var xa={readContext:xe,use:ro,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};xa.useEffectEvent=Xt;var _y={readContext:xe,use:ro,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:oy,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,lo(4194308,4,hy.bind(null,n,e),a)},useLayoutEffect:function(e,n){return lo(4194308,4,e,n)},useInsertionEffect:function(e,n){lo(4,2,e,n)},useMemo:function(e,n){var a=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return a.memoizedState=[c,n],c},useReducer:function(e,n,a){var c=ze();if(a!==void 0){var f=a(n);if(Si){_s(!0);try{a(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=DE.bind(null,mt,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=nf(e);var n=e.queue,a=Ey.bind(null,mt,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,n){var a=ze();return lf(a,e,n)},useTransition:function(){var e=nf(!1);return e=my.bind(null,mt,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var c=mt,f=ze();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),qt===null)throw Error(r(349));(xt&127)!==0||Yg(c,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,oy(Fg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Qg.bind(null,c,h,a,n),null),a},useId:function(){var e=ze(),n=qt.identifierPrefix;if(Ot){var a=Nn,c=jn;a=(c&~(1<<32-Ze(c)-1)).toString(32)+a,n=`_`+n+`R_`+a,a=so++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return Yt(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=it.current,er(n)){if(e=n.stateNode,a=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(e.nodeValue,a)),e||Ds(n,!0)}else e=Do(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return Yt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),e=!1}else a=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Yt(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),f=!1}else f=Uu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=a,n):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),go(n,n.updateQueue),Yt(n),null);case 4:return vt(),e===null&&Yf(n.stateNode.containerInfo),Yt(n),null;case 10:return ts(n.type),Yt(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return Yt(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Ta(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=eo(e),h!==null){for(n.flags|=128,Ta(c,!1),e=h.updateQueue,n.updateQueue=e,go(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Eg(a,e),a=a.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>wo&&(n.flags|=128,f=!0,Ta(c,!1),n.lanes=4194304)}else{if(!f)if(e=eo(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,go(n,e),Ta(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(n),null}else 2*Re()-c.renderingStartTime>wo&&a!==536870912&&(n.flags|=128,f=!0,Ta(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,a=ee.current,Y(ee,f?a&1|2:a&1),Ot&&Wn(n,c.treeForkCount),e):(Yt(n),null);case 22:case 23:return en(n),Yu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(a&536870912)!==0&&(n.flags&128)===0&&(Yt(n),n.subtreeFlags&6&&(n.flags|=8192)):Yt(n),a=n.updateQueue,a!==null&&go(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==a&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ts(re),Yt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jE(e,n){switch(Mu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return vt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Yu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Jy(e,n){switch(Mu(n),n.tag){case 3:ts(re),vt();break;case 26:case 27:case 5:Es(n);break;case 4:vt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Yu(),e!==null&&H(pi);break;case 24:ts(re)}}function Aa(e,n){try{var a=n.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(n,n.return,C)}}function Bs(e,n,a){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=a,U=C;try{U()}catch(V){Bt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Bt(n,n.return,V)}}function Xy(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Hg(n,a)}catch(c){Bt(e,e.return,c)}}}function Zy(e,n,a){a.props=vi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,n,c)}}function Oa(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,n,f)}}function Bn(e,n){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,n,f)}else a.current=null}function Wy(e){var n=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function _f(e,n,a){try{var c=e.stateNode;s1(c,e.type,a,n),c[He]=n}catch(f){Bt(e,e.return,f)}}function Py(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gs(e.type)||e.tag===4}function Tf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Py(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Af(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Af(e,n,a),e=e.sibling;e!==null;)Af(e,n,a),e=e.sibling}function yo(e,n,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(c!==4&&(c===27&&Gs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(yo(e,n,a),e=e.sibling;e!==null;)yo(e,n,a),e=e.sibling}function tm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,a),n[Ee]=e,n[He]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,oe=!1,Of=!1,em=typeof WeakSet==`function`?WeakSet:Set,ye=null;function NE(e,n){if(e=e.containerInfo,Jf=Bo,e=dg(e),wu(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,U=0,V=0,$=e,j=null;e:for(;;){for(var B;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(B=$.firstChild)!==null;)j=$,$=B;for(;;){if($===e)break e;if(j===a&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=$.nextSibling)!==null)break;$=j,j=$.parentNode}$=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xf={focusedElem:e,selectionRange:a},Bo=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=l0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=fg(C,ft),O=fg(C,Ht);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=$.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),ft>Ht?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for($=[],B=C;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var G=$[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Bo=!!Jf,Xf=Jf=null}finally{jt=f,q.p=c,M.T=a}}e.current=n,fe=2}}function Om(){if(fe===2){fe=0;var e=qs,n=gr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var c=q.p;q.p=2;var f=jt;jt|=4;try{nm(e,n.alternate,n)}finally{jt=f,q.p=c,M.T=a}}fe=3}}function Rm(){if(fe===4||fe===3){fe=0,Cs();var e=qs,n=gr,a=us,c=gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?fe=5:(fe=0,gr=qs=null,Dm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hs=null),eu(a),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Wr,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=M.T,f=q.p,q.p=2,M.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,M.T=null,a=jf,jf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,hm(h.current),cm(h,h.current,S,a),jt=C,za(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Wr,h)}catch{}return!0}finally{q.p=f,M.T=c,Dm(e,n)}}function km(e,n,a){n=fn(a,n),n=pf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(ta(e,2),Ln(e))}function Bt(e,n,a){if(e.tag===3)km(e,e,a);else for(;n!==null;){if(n.tag===3){km(n,e,a);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(a,e),a=Uy(2),c=zs(n,a,2),c!==null&&(zy(a,c,n,e),ta(c,2),Ln(c));break}}n=n.return}}function If(e,n,a){var c=e.pingCache;if(c===null){c=e.pingCache=new IE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(a)||(Mf=!0,f.add(a),e=GE.bind(null,e,n,a),n.then(e,e))}function GE(e,n,a){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qt===e&&(xt&a)===a&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-vo?(jt&2)===0&&yr(e,0):kf|=a,pr===xt&&(pr=0)),Ln(e)}function Um(e,n){n===0&&(n=Ap()),e=ci(e,n),e!==null&&(ta(e,n),Ln(e))}function $E(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(e,a)}function YE(e,n){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),Um(e,a)}function QE(e,n){return Ue(e,n)}var To=null,Sr=null,Hf=!1,Ao=!1,qf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?To=Sr=e:Sr=Sr.next=e),Ao=!0,Hf||(Hf=!0,JE())}function za(e,n){if(!qf&&Ao){qf=!0;do for(var a=!1,c=To;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Bm(c,h))}else h=xt,h=Dl(c,c===qt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Pr(c,h)||(a=!0,Bm(c,h));c=c.next}while(a);qf=!1}}function FE(){zm()}function zm(){Ao=Hf=!1;var e=0;Vs!==0&&r1()&&(e=Vs);for(var n=Re(),a=null,c=To;c!==null;){var f=c.next,h=jm(c,n);h===0?(c.next=null,a===null?To=f:a.next=f,f===null&&(Sr=a)):(a=c,(e!==0||(h&3)!==0)&&(Ao=!0)),c=f}fe!==0&&fe!==5||za(e),Vs!==0&&(Vs=0)}function jm(e,n){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,$=x.initiatorType;V&&$m($)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function s0(e,n,a){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),n0.has(f)||(n0.add(f),e={rel:e,crossOrigin:a,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function p1(e){fs.D(e),s0(`dns-prefetch`,e,null)}function g1(e,n){fs.C(e,n),s0(`preconnect`,e,n)}function y1(e,n,a){fs.L(e,n,a);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+cn(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+cn(a.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&a&&a.imageSrcSet?void 0:e,as:n},a),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(La(h))||n===`script`&&c.querySelector(Ia(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function m1(e,n){fs.m(e,n);var a=vr;if(a&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(Ia(h)))return}c=a.createElement(`link`),Te(c,`link`,e),ge(c),a.head.appendChild(c)}}}function S1(e,n,a){fs.S(e,n,a);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(La(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},a),(a=mn.get(h))&&sh(e,a);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,ko(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function v1(e,n){fs.X(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(Ia(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w1(e,n){fs.M(e,n);var a=vr;if(a&&e){var c=Ki(a).hoistableScripts,f=br(e),h=c.get(f);h||(h=a.querySelector(Ia(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&ih(e,n),h=a.createElement(`script`),ge(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function i0(e,n,a,c){var f=(f=it.current)?Mo(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(n=wr(a.href),a=Ki(f).hoistableStyles,c=a.get(n),c||(c={type:`style`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=wr(a.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(La(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},mn.set(e,a),h||b1(f,e,a,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=a.async,a=a.src,typeof a==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(a),a=Ki(f).hoistableScripts,c=a.get(n),c||(c={type:`script`,instance:null,count:0,state:null},a.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function La(e){return`link[rel="stylesheet"][`+e+`]`}function r0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function b1(e,n,a,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,a),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function Ia(e){return`script[async]`+e}function a0(e,n,a){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(a.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),ko(c,a.precedence,e),n.instance=c;case`stylesheet`:f=wr(a.href);var h=e.querySelector(La(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=r0(a),(f=mn.get(f))&&sh(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,ko(h,a.precedence,e),n.instance=h;case`script`:return h=br(a.src),(f=e.querySelector(Ia(h)))?(n.instance=f,ge(f),f):(c=a,(f=mn.get(h))&&(c=y({},a),ih(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,ko(c,a.precedence,e));return n.instance}function ko(e,n,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function E1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;switch(n.rel){case`stylesheet`:return e=n.disabled,typeof n.precedence==`string`&&e==null;default:return!0}case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function c0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function C1(e,n,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wr(c.href),h=n.querySelector(La(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=zo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ge(h);return}h=n.ownerDocument||n,c=r0(c),(f=mn.get(f))&&sh(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=zo.bind(e),n.addEventListener(`load`,a),n.addEventListener(`error`,a))}}var rh=0;function x1(e,n){return e.stylesheets&&e.count===0&&No(e,e.stylesheets),0rh?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function zo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)No(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var jo=null;function No(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,jo=new Map,n.forEach(_1,e),jo=null,zo.call(e))}function _1(e,n){if(!(n.state.loading&4)){var a=jo.get(e);if(a)var c=a.get(null);else{a=new Map,jo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),dh.exports=K1(),dh.exports}var G1=V1(),W=jd();const $1=`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`,Y1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0NjI2MTIxfQ.2fYxPAYFGkKh-5N41Auj9RIqSCJ8g9UQy1QxJoKzNl0`,Q1=`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,F1=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDYyNjE2Mn0.k2GHVroWJH69qAyVGot8Oc2kiXeYFAocSxRUojz5GmY`,cv=W.createContext(null);function Nd(){const s=W.useContext(cv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function J1(){return $1}function X1(){return Q1}function Z1(){return{Authorization:`Bearer ${Y1}`}}function W1(){return{Authorization:`Bearer ${F1}`}}function P1({children:s}){const t=J1(),i=X1(),r=W.useMemo(()=>Z1(),[]),l=W.useMemo(()=>W1(),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Q.jsx(cv.Provider,{value:o,children:s})}var Go={exports:{}},Sh,U0;function tC(){if(U0)return Sh;U0=1;function s(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Sh=s,Sh}var z0;function eC(){if(z0)return Go.exports;z0=1;var s=tC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=st,m=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function L(J,nt){var st=p.get();st.context=o,st.release=I,st.value=J,st.callback=nt||i,st.errorHandler=v,y>=d||b.paused?g?(st.next=g,g=st):(g=st,m=st,b.saturated()):(y++,u.call(o,st.value,st.worked))}function I(J){J&&p.release(J);var nt=g;nt&&y<=d?b.paused?y--:(m===g&&(m=null),g=nt.next,nt.next=null,u.call(o,nt.value,nt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Go.exports=t,Go.exports.promise=l,Go.exports}var nC=eC();const uv=z1(nC),Dn=`Stream-Next-Offset`,zc=`Stream-Cursor`,jc=`Stream-Up-To-Date`,qn=`Stream-Closed`,vh=`Stream-Seq`,sC=`Stream-TTL`,iC=`Stream-Expires-At`,j0=`Producer-Id`,$o=`Producer-Epoch`,N0=`Producer-Seq`,rC=`Producer-Expected-Seq`,aC=`Producer-Received-Seq`,wh=`offset`,Yo=`live`,lC=`stream-sse-data-encoding`;var ti=class fv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new fv(r,o,u,l,i)}},Bd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class nd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=B0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new nd(d,u,r,l)}static fromFetchError(t){const i=B0(t.status);return new nd(t.message,i,t.status,t.json??t.text)}};function B0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var oC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},hv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},cC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const uC=[429,503],Ld={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function fC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function dv(s,t=Ld){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Bd;if(b instanceof ti&&!uC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?fC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*l,r)}}}}const hC=[201,204,205];function dC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||hC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Bd:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function pC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function gC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function bh(s){return pC(s)||gC(s),s}async function*L0(s,t){const i=s.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` -`).replace(/\r/g,` -`);const g=l.split(` -`);l=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Id=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},pv=class sd extends Id{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new sd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new sd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Hd(this)}},Eh=class Tr extends Id{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new Tr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Tr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new pv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Hd(this)}},Hd=class id extends Id{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new id(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new id(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const I0=`PAUSE_STREAM`;var yC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Eh(t):new pv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#a=!1,this.#c=s.isJsonMode,this.#l=s.abortController,this.#p=s.fetchNext,this.#d=s.startSSE,this.#v={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#E=s.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(s.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(s=>{this.#S=s}),this.#u?.abort(I0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Hd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(s){this.#b?.(),this.#f(s)}#w(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(zc)||void 0,upToDate:s.headers.has(jc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Eh||(this.#i=new Eh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=s.state,s.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?L0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:SC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:l}=await t.next();if(r){const o=rd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:rd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=L0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===I0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const s=this.#C(),t=[];try{let r=await s.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await s.read()}}finally{s.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const s=this.#C(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#w(`bodyStream`),bh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const s=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await s.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await s.read()}this.#r(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return bh(i)}textStream(){this.#w(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return bh(t)}subscribeJson(s){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Ch(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#l.abort(s),this.#b?.(),this.#r()}get closed(){return this.#g}};function Ch(s,t,i,r){const l=s.headers.get(Dn),o=s.headers.get(zc),u=s.headers.has(jc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function mC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>mC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function Pa(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new hv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function tc(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const H0=new Set;function vC(){if(!(typeof process>`u`))return`production`}function wC(){return typeof globalThis.window<`u`}function bC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function EC(s){try{return new URL(s)}catch{const t=bC();if(t)try{return new URL(s,t)}catch{return}return}}function gv(s,t){if(t===!1||vC()===`test`||!wC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,l=EC(r);l&&l.protocol===`http:`&&(H0.has(l.origin)||(H0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function CC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await xC({...s,headers:t,params:i})}catch(r){if(s.onError){const l=await s.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function xC(s){const t=s.url instanceof URL?s.url.toString():s.url;gv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(wh,r);const l=s.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Yo,l);const o=await tc(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await Pa(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Ld,m=dv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Bd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(zc)??void 0,E=y.headers.has(jc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(lC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const J=new URL(t);J.searchParams.set(wh,I),tt||(l===`sse`?J.searchParams.set(Yo,`sse`):(l===!0||l===`long-poll`)&&J.searchParams.set(Yo,`long-poll`)),K&&J.searchParams.set(`cursor`,K);const nt=await tc(s.params);for(const[Kt,ht]of Object.entries(nt))J.searchParams.set(Kt,ht);const st=await Pa(s.headers),Ct=await m(J.toString(),{method:`GET`,headers:st,signal:X});return Ct.ok||await ps(Ct,t),Ct},L=l===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(wh,I),tt.searchParams.set(Yo,`sse`),K&&tt.searchParams.set(`cursor`,K);const J=await tc(s.params);for(const[Ct,Kt]of Object.entries(J))tt.searchParams.set(Ct,Kt);const nt=await Pa(s.headers),st=await m(tt.toString(),{method:`GET`,headers:nt,signal:X});return st.ok||await ps(st,t),st}:void 0;return new yC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var q0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},_C=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function K0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var yv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(s,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=uv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(s){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=s,await this.flush();const t=await this.#v(s);return this.#u=t,t}async#v(s){const t=this.#t.contentType??`application/octet-stream`,i=K0(t)===`application/json`;let r;if(s!==void 0){const g=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[j0]:this.#e,[$o]:this.#n.toString(),[N0]:l.toString(),[qn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(Dn)??``};if(d.status===403){const g=d.headers.get($o),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(s)}throw new q0(m)}throw await ti.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const s=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:s,seq:t}).catch(()=>{})}):this.#y.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(s,t,i){let r=this.#S.get(s);r||(r=new Map,this.#S.set(s,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,l=K0(r)===`application/json`;let o;if(l)o=`[${s.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=s.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of s)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[j0]:this.#e,[$o]:i.toString(),[N0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(Dn)??``,duplicate:!1};if(g.status===403){const y=g.headers.get($o),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(s,0,b)}throw new q0(v)}if(g.status===409){const y=g.headers.get(rC),v=y?parseInt(y,10):0;if(v0&&this.#d(s),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function xh(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function TC(s){return s!=null&&typeof s.then==`function`}var Hn=class Qa{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){RC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=uv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Ld},l=dv(this.#n,r);this.#e=dC(l)}static async create(t){const i=new Qa(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Qa(t);return await i.head(),i}static async head(t){return new Qa(t).head()}static async delete(t){return new Qa(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(Dn)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[sC]=String(t.ttlSeconds)),t?.expiresAt&&(i[iC]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=AC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[qn]=`true`;let o;t?.body!==void 0&&(xh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new hv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=TC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=xh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[vh]=o);const u=xh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[vh]=i.seq);const u=OC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new yv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return CC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Pa(this.#t.headers)}async#f(){const t=await Pa(this.#t.headers),i=new URL(this.url),r=await tc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function AC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function OC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function RC(s){if(!s.url)throw new oC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new cC;gv(s.url,s.warnOnHttp)}const DC=`__includes_scalar__`;class Mi{}class Br extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class mv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Lr(s){return s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function qd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function V0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function MC(s){return{expression:s,residual:!0}}function kC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function il(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const l=s.select[r];if(l&&l.type===`ref`)return il(s,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=kC(s,r);return o?o.type===`queryRef`?il(o.query,new Me(l),i):{collection:o.collection,path:l}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class $0 extends En{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class UC extends Ui{constructor(){super(`Collection requires a config`)}}class zC extends Ui{constructor(){super(`Collection requires a sync config`)}}class jC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class Y0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class Sl extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class NC extends Sl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class BC extends Sl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class LC extends Sl{constructor(){super(`Collection is in error state`)}}class IC extends Sl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class HC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class qC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class KC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class VC extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class GC extends Yn{constructor(){super(`The first argument to update is missing`)}}class $C extends Yn{constructor(){super(`No keys were passed to update`)}}class YC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class QC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class FC extends Yn{constructor(){super(`No keys were passed to delete`)}}class JC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Kd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class XC extends Kd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class ZC extends Kd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class WC extends Kd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class PC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class tx extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class ex extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class nx extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class sx extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class _h extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Th extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class ix extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class rx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class ax extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class lx extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class ox extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Qo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class cx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ux extends zi{constructor(){super(`Query must have a from clause`)}}class Q0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: - - ❌ .where(({ user }) => user.id === 'abc') - ✅ .where(({ user }) => eq(user.id, 'abc')) - -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class fx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class hx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class dx extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class px extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class gx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Sv extends Le{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class yx extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class mx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Sx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class vx extends Le{constructor(){super(`Reference path cannot be empty`)}}class wx extends Le{constructor(t){super(`Unknown function: ${t}`)}}class F0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class bx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class Ex extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Cx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class xx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class _x extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Tx extends ji{constructor(){super(`Invalid join condition`)}}class Ax extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Nc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ox extends Nc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Rx extends Nc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Dx extends Nc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class Mx extends Nc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class J0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class kx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ux extends kx{constructor(){super(`Cannot combine empty expression list`)}}class zx extends Le{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class jx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Nx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return ec(s,t,new Map)}function ec(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const l=Array.from(s.entries()).every(([o,u])=>t.has(o)&&ec(u,t.get(o),i));return i.delete(s),l}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,l=t;if(r.length!==l.length)return!1;for(let o=0;oec(l,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),l=Object.keys(t);if(r.length!==l.length)return i.delete(s),!1;const o=r.every(u=>u in t&&ec(s[u],t[u],i));return i.delete(s),o}return!1}const Bx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Bx.has(t)}const vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Ah=new WeakMap;let Lx=1;function X0(s){if(Ah.has(s))return Ah.get(s);const t=Lx++;return Ah.set(s,t),t}const Vd=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof s==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=X0(s),d=X0(t);return u-d}if(l)return 1;if(o)return-1}return st?1:0},Ix=(s,t,i)=>Vd(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function tl(s){return(t,i)=>s.direction===`asc`?Vd(t,i,s):Ix(t,i,s)}const Hx=tl({direction:`asc`,nulls:`first`,stringSort:`locale`});function qx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Yx(s):$x(s);case`func`:return Qx(s,t);default:throw new Sx(s.type)}}function $x(s){const[t,...i]=s.path;if(!t)throw new vx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Yx(s){const t=s.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function Qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Or(r(o)),d=Or(l(o));return me(u)||me(d)?null:Vx(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:u{const u=r(o),d=l(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return me(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Or(r(o)),d=l(o);return me(u)?null:Array.isArray(d)?d.some(p=>Or(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return me(u)||me(d)?null:Z0(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Oh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Oh(d);return p?Gx(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new wx(s.name)}}function Z0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Fx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function W0(s,t,i,r,l){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Jx(s){return ad.includes(s)}function bv(s){return s.some(t=>Jx(t))}function vl(s,t,i){if(bv(t))return;const r=i??{...vv,...s.compareOptions};for(const l of s.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Fx(l)}function Xx(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=vl(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:Xx(l)}}return{canOptimize:!1,matchingKeys:new Set}}function n_(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const l=$d(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Zx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function s_(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=vl(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Ev(s){return s.config.autoIndex===`eager`}function Bc(s,t,i,r,l){if(bv(t)||!Ev(i))return;const o=r??{...vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function i_(s,t){if(!Ev(t))return;const i=r_(s);for(const{fieldName:r,fieldPath:l}of i)Bc(r,l,t)}function r_(s){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class a_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Rh=3e4;function Dh(s,t){if(t.length<=Rh)s.push(...t);else for(let i=0;i0)l=o;else return o}return r}class o_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof s==`string`?-1:1}function rl(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we();function we(){return Math.random()*(2**31-1)>>>0}const Cv=new ArrayBuffer(8),g_=new DataView(Cv),Xs=new Uint8Array(Cv);class wl{constructor(){this.hash=u_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(p_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(f_);for(let i=0;i>>8&255)}return;case`number`:g_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(d_)):this.update(h_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=we(),x_=we(),__=we(),T_=we(),A_=we(),O_=we(),R_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function D_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&R_.has(t)}const M_=128,al=new WeakMap;function Ne(s){const t=new wl;return xv(t,s),t.digest()}function k_(s){const t=al.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=U_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=M_)i=z_(s);else return od(s);else{if(s instanceof File)return od(s);if(D_(s))i=j_(s);else{let r=s,l=C_;s instanceof Array&&(l=x_),s instanceof Map&&(l=__,r=[...s.entries()]),s instanceof Set&&(l=T_,r=[...s.entries()]),i=N_(r,l)}}return al.set(s,i),i}function U_(s){const t=new wl;return t.update(E_),t.update(s.getTime()),t.digest()}function z_(s){const t=new wl;t.update(A_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Dh(i,this.#t),Dh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Mh.getStringId(u)}|${Mh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Mh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new se(l)}#n(){const t=new a_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Dh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class I_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new I_(t)}}class _v{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends _v{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class H_ extends _v{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Yd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class q_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new K_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class K_ extends zn{sendData(t){this.writer.sendData(t)}}class V_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Tv(){return s=>{const t=new zn(s.graph,new Un),i=new V_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class tS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=el(t),l=this.get(r);if(nc(l)){const[o,u]=l;if(el(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(Ne(o),l),p.set(Ne(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(nc(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(nc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(nc(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=el(r);if(d!==Fa){const p=new tS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=el(r),p=el(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Ja;g.set(Ne(o),i),g.set(Ne(r),[r,l]),this.#t.set(t,g)}else{const g=new tS;if(p===d){const m=new Ja;m.set(Ne(o),i),m.set(Ne(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function el(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fa}function nc(s){return Array.isArray(s)}class G_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Av(s){return t=>{const i=new zn(t.graph,new Un),r=new G_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class $_ extends Ni{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Ne(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function Y_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new $_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class Q_ extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new Q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const F_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Rr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Rr(s.slice(u),t.slice(u),i)}const l=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Rr(s.slice(1),null,i)}function Ov(s){if(s.length!==Rv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Rv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xa(s){const t=Rv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function eS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xa(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function nS(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function J_(s,t){Ov(s);const[i,...r]=s.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function X_(s,t,i=F_){if(s!=null&&eS(s,i),t!=null&&eS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Rr(``,g,i);if(p{const o=s(i,l);return o!==0?o:ld(t,r)}}class Qd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=c_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:rS(this.#t[r-1]),o=r===this.#t.length?null:rS(this.#t[r]),u=X_(l,o),d=sS(t,u);if(this.#t.splice(r,0,d),rthis.#e(iS(i),iS(r)))}}class Mv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Qd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function hc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],1])}}function dc(s,t){if(s){const[[i,r],l]=s;t.push([[i,[r,l]],-1])}}class Z_ extends Ni{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Dv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Mv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>hc(d,r)),u.moveOuts.forEach(d=>dc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);hc(d.moveIn,l),dc(d.moveOut,l),this.#l(o,u)}}function W_(s,t){return i=>{const r=new zn(i.graph,new Un),l=new Z_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(l),r}}class P_ extends H_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function kv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),l=new P_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class tT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new tT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class eT extends Ni{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function cd(s){return t=>{const i=new zn(t.graph,new Un),r=new eT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class nT extends Yd{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function sT(s){return t=>{const i=new zn(t.graph,new Un),r=new nT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class iT extends Ni{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Dv(l));this.#t=new Mv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Qd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>hc(o,r)),l.moveOuts.forEach(o=>dc(o,r)),l.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);hc(o.moveIn,l),dc(o.moveOut,l)}}function rT(s,t){const i=t||{};return r=>{const l=new zn(r.graph,new Un),o=new iT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,s,i);return r.graph.addOperator(o),l}}function aS(s){return`pipe`in s}function lS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!aS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>aS(l))),r=>{const l=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=rl(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Av(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function aT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function lT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function oT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function cT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const fT={sum:aT,count:lT,avg:oT,min:cT,max:uT};function hT(s,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(W_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Tv())}function dT(s,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Tv())}function pT(s,t){return dT(rT,s,t)}const kh=`__virtual_synced__`,Uh=`__virtual_has_local__`;function oS(s){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(s)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:gT,count:yT,avg:mT,min:ST,max:vT}=fT;function wT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Ir(o))continue;const u=r.findIndex(d=>pc(o,d));if(u===-1)throw new Ox(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function cS(s,t,i,r,l,o,u){const d={[kh]:{preMap:([,w])=>oS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Uh]:{preMap:([,w])=>oS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Jo(A);else if(Ir(A)){const{transformed:z,extracted:L}=ud(A,T);for(const[I,K]of Object.entries(L))w[I]=Jo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(lS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[J,nt]of Object.entries(r))nt.type===`agg`&&(z[J]=D[J]);uS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${rl(L)}`:`single_group`,K={...D,$selected:z},X=D[kh],tt=D[Uh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=V0(D),z=gc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Mr(L(K))}))}if(l&&l.length>0)for(const D of l)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Mr(D(z))}));return s}const p=wT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}uS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=V0(w),T=gc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(l&&l.length>0)for(const w of l)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Mr(w(T))}));return s}function pc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>pc(i,t.args[r]));default:return!1}}function Jo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return gT(i);case`count`:return yT(l);case`avg`:return mT(i);case`min`:return ST(r);case`max`:return vT(r);default:throw new Rx(s.name)}}function gc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&bT(r,o))return new Me([i,l]);throw new Dx(r.name)}case`func`:{const r=s,l=r.args.map(o=>gc(o,t));return new Je(r.name,l)}case`ref`:return s;case`val`:return s;default:throw new Mx(s.type)}}function uS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,l]of Object.entries(i))s[r]=l({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Ir(s){return Lr(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Ir(t)):!1:!1}function ud(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(l=>{const o=ud(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function bT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>pc(i,t.args[r]))}function ET(s,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=gc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:fd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(J=>J.expression.type===`ref`)?i.map(J=>{const nt=J.expression,st=il(s,nt,l);return he(st?new Me(st.path):J.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(J,nt)=>{if(i.length===1){const st=J&&N(J),Ct=nt&&N(nt);return v(st,Ct)}if(I){const st=Ct=>Ct&&I.map(Kt=>Kt(Ct));return v(st(J),st(nt))}return 0},valueExtractorForRawRow:J=>{if(i.length===1)return N(J);if(I)return I.map(nt=>nt(J))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=J=>{o[tt].dataNeeded=()=>{const nt=J();return Math.max(0,w.limit-nt)}}}}return g?t.pipe(hT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(pT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function fd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function CT(s,t={}){const i=r=>{const l=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?nl(t.where):void 0,l=_T(s,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Wx(r,s);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=nl(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=nl(t.where);return t.optimizedOnly?void 0:i(l)}}function nl(s){const t=wv(s);return i=>{try{const r=t(i);return Mr(r)}catch{return!1}}}function xT(s,t){const i=nl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&s(l)}}function _T(s,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=fd(p,s);Bc(y[0],y,s,v);const b=vl(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=tl(m.compareOptions),v=fS(p.value,m.expression),b=fS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function fS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:wv(t)(s)}class hS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=ld(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const sc=`__tanstack_db_direct`;class TT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?W0(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let J=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(J=!0);const nt=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(J&&!nt))if(A===void 0&&z!==void 0){const st=N.get(D);if(st){const Ct=st.value,Kt=W0(Ct,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Kt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||nt)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new hS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new hS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[sc]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Uv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,l),l}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function dS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return ic(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function ic(s){return s&&typeof s==`object`&&s.__refProxy===!0}function hd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function pS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function AT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function dd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function pd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(l=>ie(l)))}function OT(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(l=>ie(l)))}function RT(s,t){return new Je(`in`,[ie(s),ie(t)])}class DT{constructor(t){this.query=t}}class MT{constructor(t){this.query=t}}class zv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function kT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:l}=s[0];return(l.direction===`asc`?pS:dd)(r,new Be(t[0]))}const i=[];for(let r=0;rpd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>OT(r,l))}class UT extends zv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&i_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?xT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=pd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?nl(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const J=this.collection.get(tt);return J===void 0?!1:v?.(J)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],J=this.collection.currentStateAsChanges({where:hd(tt,new Be(g))});if(J){const nt=J.map(Ct=>Ct.key).filter(Ct=>!this.sentKeys.has(Ct)&&b(Ct));T.push(...nt);const st=m.take(i-T.length,g,b);T.push(...st)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const J of T){const nt=this.collection.get(J);E.push({type:`insert`,key:J,value:nt}),w=z?z(nt):nt,tt.add(J)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=kT(t,r);if(tt){const{expression:J}=t[0],nt=r[0];let st;if(nt instanceof Date){const Ct=new Date(nt.getTime()+1);st=pd(AT(J,new Be(nt)),dd(J,new Be(Ct)))}else st=hd(J,new Be(nt));I={whereFrom:tt,whereCurrent:st,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:l??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class zT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Uv(),p=r(d);o=ie(p)}const u=new UT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new IC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const jT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),NT=s=>{clearTimeout(s)},BT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>jT(s),zh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):NT,jv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};jv.instance=null;let jh=jv;class LT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new BC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new Sl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new NC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||jh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){jh.getInstance().cancel(this),this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&zh(this.idleCallbackId),this.idleCallbackId=BT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),jh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(zh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Fd=Symbol(`liveQueryInternal`);class IT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=HT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new _h;if(r.committed)throw new Th;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Fd];throw new VC(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new ix;if(i.committed)throw new rx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new _h;if(i.committed)throw new Th;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new _h;if(t.committed)throw new Th;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new LC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new J0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new J0(this.id,t)})}this.preloadPromise=null}}function HT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const gS=1;function rc(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(l=>Zs(l)??null).sort((l,o)=>rc(xi(l),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([l,o])=>({key:Zs(l)??null,value:Zs(o)??null})).sort((l,o)=>rc(xi(l.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[l])=>rc(r,l));for(const[r,l]of i){const o=Zs(l);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,l)=>rc(r,l)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function KT(s,t,i,r,l){const o=qT(r),u=Zs(t)??null,d=Zs(l),g=Zs({signatureVersion:gS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:gS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function gd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>gd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=gd(r);return t}function VT(s){return JSON.parse(JSON.stringify(s))}class GT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=Uv(),o=t(l),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=KT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:VT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:gd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var $T={};const YT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),QT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),FT=new Set([`set`,`delete`,`clear`,`add`]),JT=new Set([`entries`,`keys`,`values`,`forEach`]);function Jd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function XT(s,t,i,r){if(YT.has(s))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(Jd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function ZT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(Jd(l)){const u={tracker:s,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function yS(s,t,i){return function(...r){const l=s.apply(t.copy_,r);return i(t),l}}function WT(s,t,i,r,l,o,u){if(JT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&$T.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const l=[];return t.set(s,l),s.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const l=Object.getPrototypeOf(s).constructor,o=new l(s.length);t.set(s,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(s instanceof Set){const l=new Set;return t.set(s,l),s.forEach(o=>{l.add(gs(o,t))}),l}if(ei(s))return s;const i={};t.set(s,i);for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=gs(s[l],t));const r=Object.getOwnPropertySymbols(s);for(const l of r)i[l]=gs(s[l],t);return i}let mS=0;function PT(){return mS+=1,mS}function Xd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Xd(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:PT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),l.has(y))return Tt(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(QT.has(D))return yS(E,o,u);const A=XT(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return ZT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(FT.has(D))return yS(E,o,u);const A=WT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Jd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return l.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function tA(s){const t=s.map(i=>Xd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function eA(s,t){const{proxy:i,getChanges:r}=Xd(s);return t(i),r()}function nA(s,t){const{proxies:i,getChanges:r}=tA(s);return t(i),r()}function sA(){let s,t,i=!0;return{promise:new Promise((l,o)=>{s=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function iA(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class rA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const yc=new rA,mc=[];let ll=[],aA=0;function lA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Za(s){const t=new fA(s);return mc.push(t),t}function ac(){if(ll.length>0)return ll.slice(-1)[0]}function oA(s){yc.clear(s.id),ll.push(s)}function cA(s){try{yc.flush(s.id)}finally{ll=ll.filter(t=>t.id!==s.id)}}function uA(s){const t=mc.findIndex(i=>i.id===s.id);t!==-1&&mc.splice(t,1)}let fA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new PC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=sA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=aA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&uA(this)}mutate(t){if(this.state!==`pending`)throw new ex;oA(this);try{t()}finally{cA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=lA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new nx;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of mc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new sx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class hA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=ac();if(!u&&!this.config.onInsert)throw new XC;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new KC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Za({metadata:{[sc]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=ac();if(!u&&!this.config.onDelete)throw new WC;if(Array.isArray(r)&&r.length===0)throw new FC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new JC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Za({autoCommit:!0,metadata:{[sc]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new jC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new Y0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new $0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new Y0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new $0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new HC(i):new qC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new GC;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=ac();if(!o&&!this.config.onUpdate)throw new ZC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new $C;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new YC(w);return E});let y;u?y=nA(m,p):y=[eA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new QC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Za({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Za({metadata:{[sc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class dA extends zv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Zd(s){const t=new Wd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Wd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new UC;if(!t.sync)throw new zC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new zT,this._events=new dA,this._indexes=new GT,this._lifecycle=new LT(t,this.id),this._mutations=new hA(t,this.id),this._state=new TT(t),this._sync=new IT(t,this.id),this.comparisonOpts=pA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return CT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function pA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function gA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function yA(s){const{mutationFn:t,onMutate:i,...r}=s;return l=>{const o=Za({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(gA(u))throw new tx}),o}}function mA(s){const t=SA(s);let i=s,r,l=0;const o=10;for(;lLv(u)),l=Iv(r),o=Nv(s);for(const[u,d]of l.singleSource)vA(s,u)&&!o.has(u)&&t.set(u,d);return t}function vA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Nv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function yd(s){const t={...s,from:s.from.type===`queryRef`?new Sn(yd(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(yd(i.from.query),i.from.alias):i.from}))};return wA(t)}function wA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=Sd(s.where),p=Sc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!G0(d)),r=Sd(t).map(d=>Lv(d)),l=Iv(r),o=EA(s,l),u=s.where.filter(d=>G0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Bv(s){return{...s,from:md(s.from),join:s.join?.map(t=>({...t,from:md(t.from)}))}}function md(s){if(s.type===`collectionRef`)return s;const t=Bv(s.query);if(bA(t)){const i=md(t.from);return i.type===`collectionRef`?new Br(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function bA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function Sd(s){const t=[];for(const i of s){const r=qd(i);t.push(...Pd(r))}return t}function Pd(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...Pd(i));return t}else return[s]}function Lv(s){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function Iv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Sc(u));const l=i.length>0?Sc(i):void 0;return{singleSource:r,multiSource:l}}function EA(s,t){const i=new Set,r=Nv(s),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=SS(s.from,l,i),u=s.join?s.join.map(y=>({...y,from:SS(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(MC(v)):d.push(v);const g=d.length>1?[Sc(d.flatMap(y=>Pd(qd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Dr(s){return{from:s.from.type===`collectionRef`?new Br(s.from.collection,s.from.alias):new Sn(Dr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Br(t.from.collection,t.from.alias):new Sn(Dr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function SS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Br(s.collection,s.alias):new Sn(Dr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Br(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!OA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);if(DA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);const l=s.query.where||[],o={...Dr(s.query),where:[...l,r]};return i.add(s.alias),new Sn(o,s.alias)}function CA(s,t,i){return s.select?Hv(s.select)||RA(s.select,t,i):!1}function xA(s){return s.groupBy&&s.groupBy.length>0}function _A(s){return s.having&&s.having.length>0}function TA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function AA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function OA(s,t,i){return!(CA(s,t,i)||xA(s)||_A(s)||TA(s)||AA(s))}function Hv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Hv(i))return!0}return!1}function tp(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...tp(i));break}return t}function RA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const l=tp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function DA(s,t,i){const r=tp(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const l=s.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function Sc(s){if(s.length===0)throw new Ux;return s.length===1?s[0]:new Je(`and`,s)}function MA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=kA(A,z,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function kA(s,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=zA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new F0(r);if(!X)throw new F0(I);const{activeSource:tt,lazySource:J}=NA(t.type,K,X),nt=Object.keys(i),{mainExpr:st,joinedExpr:Ct}=UA(t.left,t.right,nt,z),Kt=he(st),ht=he(Ct);let M=s.pipe(ce(([Z,at])=>[Or(Kt(at)),[Z,at]])),q=L.pipe(ce(([Z,at])=>{const ut={[z]:at};return[Or(ht(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new bx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,at=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=st.type===`func`||Ct.type===`func`;if(!at&&!ut){const _=tt===`main`?z:l;y.add(_);const H=tt===`main`?M:q,F=il(w,tt===`main`?Ct:st,J),ot=F.collection,it=F.path[0];it&&Bc(it,F.path,ot);const gt=H.pipe(sT(Dt=>{const vt=N[_]||_,ln=g[vt];if(!ln)throw new zx(vt,_,J.id,Object.keys(g));if(ln.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[dt]])=>dt),et=new Me(F.path);ln.requestSnapshot({where:RT(et,Es),optimizedOnly:!0})||ln.requestSnapshot()}));tt===`main`?M=gt:q=gt}}return M.pipe(kv(q,t.type),jA(t.type))}function UA(s,t,i,r){const l=i.filter(d=>d!==r),o=vd(s),u=vd(t);if(o&&l.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new Cx:o===u?new Ex(o):l.includes(o)?u!==r?new _x(r):new Tx:new xx(o)}function vd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=vd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function zA(s,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new Sv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new Ax(s.type)}}function jA(s){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function NA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeIA(l,r)))}function qA(s){return s.type===`agg`}function KA(s){return s&&typeof s==`object`&&!Lr(s)}function qv(s,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?l:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(KA(o)){qv([...s,r],o,i);continue}if(qA(o)||Ir(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Lr(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const kr=Symbol(`includesRouting`);function vc(s,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;bd(s);const{optimizedQuery:b,sourceWhereClauses:w}=mA(s);let E=b;g.set(E,s),Cd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=GA(E.from,T,i,r,l,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,at])=>[FA(at,ht),[Z,at]])).pipe(kv(m,`inner`)).pipe(ys(([Z,[at]])=>at!=null),ce(([Z,[at,ut]])=>{const[_,H]=at,Y={...H,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,at={[z]:Z};return q&&(Object.assign(at,q),at.__parentContext=q),[ht,at]}));if(E.join&&E.join.length>0&&(X=MA(X,E.join,A,I,z,T,p,g,i,r,l,o,u,d,s,vc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=qd(ht),q=he(M);X=X.pipe(ys(([Z,at])=>Mr(q(at))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Mr(ht(q))));const tt=[],J=[];if(E.select){const ht=YA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let at;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));at=X.pipe(ce(([Y,F])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(F);let Dt=ot[it.alias];for(let vt=0;vt[Z(Y),null]));at=at.pipe(Av(H=>H.map(([Y,F])=>[Y,F>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=vc(ut,T,i,r,l,o,u,d,p,g,at,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:he(F)})),Y=Z;J.push({fieldName:q.fieldName,getRouting:F=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const gt=it.compiled(F);let Dt=ot[it.alias];for(let vt=0;vt({correlationKey:Z(H),parentContext:null})});QA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new fx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new hx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=HA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),J.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:at}of J)q[Z]=at(M);return M.$selected[kr]=q,[ht,M]})));const nt=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=cS(X,E.groupBy,E.having,E.select,E.fnHaving,I,nt):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Ir(M))&&(X=cS(X,[],E.having,E.select,E.fnHaving,I,nt)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new px;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(Y_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=ET(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ut,[_,H]])=>{const Y=_.$selected,F=vS(Ed(Y),_);if(m){const ot=_[z]?.__correlationKey,it=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ut,[F,H,ot,it]]}return[ut,[F,H]]})),at={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,at),at}else if(E.limit!==void 0||E.offset!==void 0)throw new gx;const Ct=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=vS(Ed(q),M);if(m){const at=M[z]?.__correlationKey,ut=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,at,ut]]}return[ht,[Z,void 0]]})),Kt={collectionId:I,pipeline:Ct,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Kt),Kt}function VA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function bd(s,t=new Set){const i=VA(s);for(const l of i)if(t.has(l))throw new yx(l,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&bd(s.from.query,r),s.join)for(const l of s.join)l.from.type===`queryRef`&&bd(l.from.query,r)}function GA(s,t,i,r,l,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new Sv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=vc(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Ed(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new mx(s.type)}}function $A(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Ed(s){return $A(s)?s.value:s}function vS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function Cd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),Cd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of s.args){const o=ep(l,t);r.push(o)}return new Je(s.name,r)}}function np(s,t){return s.map(r=>{const l=ep(r.expression,t);return{...r,expression:l}})}const Gv=new WeakMap;function JA(s){return s.utils?.[Fd]?.getBuilder?.()}function XA(s,t){Gv.set(s,t)}function ZA(s){return Gv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Qo(i,d)}if(Array.isArray(t))throw new Qo(i,`array`);if(r.length!==1)throw r.length===0?new Qo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Qo(i,`string`):new ax(i);const l=r[0],o=t[l];let u;if(o instanceof Wd)u=new Br(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new lx(i);u=new Sn(d,l)}else throw new ox(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new cx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=ic(l)?ie(l):l;if(!Lr(o))throw new Q0(wS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?dS(i):Ei(i),l=t(r),o=ic(l)?ie(l):l;if(!Lr(o))throw new Q0(wS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let l=t(r);ic(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=Yv(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?dS(r):Ei(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),l=t(r),o=Array.isArray(l)?l.map(d=>ie(d)):[ie(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ux;return this.query}}function wS(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function WA(s){return s===void 0?ie(null):s instanceof mv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function $v(s){return s!==null&&typeof s==`object`&&!Lr(s)&&!s.__refProxy}function Yv(s,t=[]){if(!$v(s))return WA(s);const i={};for(const[r,l]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Nh(l,r,t,`collection`);continue}if(l instanceof DT){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`array`);continue}if(l instanceof MT){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Nh(l.query,r,t,`concat`);continue}i[r]=Yv(l,t)}return i}function sp(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...sp(i));break}return t}function PA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return sp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Nh(s,t,i,r){const l=s._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)PA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of sp(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||$v(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=DC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function bS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const l=s.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:s,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:s}}}function tO(s){const t=s(new Wt);return Qv(t)}function Qv(s){return s._getQuery()}function eO(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):ip(d)&&l(d))}return r(s),t}function Fv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Fv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function nO(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?l(d.query):ip(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(s),t}function ip(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function sO(s){const t=typeof s.query==`function`?tO(s.query):Qv(s.query);if(t.select&&!ip(t.select))throw new dx;return t}function iO(s,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*rO(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function aO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function lO(s,t,i,r){let l=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function oO(s,t){const{orderBy:i,limit:r,offset:l}=s,o=r!==void 0&&l!==void 0?r+l:r,u=i?np(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function cO(s,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=rl({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=np(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const ES=Symbol.for(`@tanstack/db.collection-config-builder`);class uO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=ep(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=aO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=iO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=oO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=rO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=np(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[ES]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[ES])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=cO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=lO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let fO=0;class hO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++fO}`,this.query=sO({query:t.query}),this.collections=eO(this.query);const i=nO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Jv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Fv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Fd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Nx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ac()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;yc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=yc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new q_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=vc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new jx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(cd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(vO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=mO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,xd(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(cd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Xv(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=ZA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new uO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Jv(s){return(t,i)=>{const r=s.get(t),l=s.get(i);return r&&l?rl?1:0:0}}function CS(s){return s.materialization!==`collection`}function xS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(l=>l?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Xv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(cd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Xv(i.childCompilationResult.includes,t)),l})}function dO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function pO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function gO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function yO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Zv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function Hr(s,t){return t==null?s:JSON.stringify([s,t])}function _S(s,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Jv(u):void 0,m={collection:Zd({id:`__child-collection:${s}-${t}-${rl(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=dO(l)),m}function xd(s,t,i,r,l){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[kr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Hr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=_S(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=xS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=CS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=_S(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&SO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}gO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=pO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&xd(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&xd(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=CS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=xS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[kr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Hr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(yO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[kr]}function mO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Zv(t.nestedSetups))return!0;return!1}function SO(s,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=l)}}function vO(s,[[t,i],r]){const[l,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function TS(s){return new hO(s).getConfig()}function Bh(s){if(typeof s==`function`){const i=TS({query:s});return AS(i)}else{const t=s,i=TS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),AS(i)}}function AS(s){const t=Zd(s),i=JA(s);return i&&XA(t,i),t}function Wv(s){return s!=null&&`operation`in s.headers}function Pv(s){return s!=null&&`control`in s.headers}var wO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!Wv(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const l={...s.value??{}};l[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(Pv(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:l})})}};function bO(s,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const OS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function EO(s,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function tw(s){for(const r of Object.keys(s))if(OS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(OS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(s)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(s))i[r]={...l,...EO(l.type,l.primaryKey,l.schema)};return i}function ew(s){const{streamOptions:t,state:i,actions:r}=s,l=new Hn(t),o=new wO,u={};for(const[b,w]of Object.entries(i)){const E=Zd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:bO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Wv(N)?o.dispatchChange(N):Pv(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=yA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const rp=600,CO=rp/2*1e3,xO=3600*24,_O={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Lh=tw({rooms:{schema:_O,type:`stream`,primaryKey:`roomId`}}),TO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},RS=tw({scores:{schema:TO,type:`stream`,primaryKey:`playerName`}});function AO(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Lh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Lh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const nw=W.createContext(null);function sw(){const s=W.useContext(nw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function OO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Nd(),[r,l]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:xO}),o=await AO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):Q.jsx(nw.Provider,{value:{registryDB:r.registryDB},children:s})}const Ih=1;function RO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),l=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. - -Instead, use a query builder function: - const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) - -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Wd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Bh({query:s,startSync:!0,gcTime:Ih});else if(E&&typeof E==`object`)r.current=Bh({startSync:!0,gcTime:Ih,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Bh({startSync:!0,gcTime:Ih,...s}),l.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Ft={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Hh=[{label:`30x25`,cols:30,rows:25}];function qh(s,t){return`${s}__${t.cols}x${t.rows}`}function DO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function MO({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=sw(),[l,o]=W.useState(DO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=RO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=Hh[u],K=qh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+rp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return Q.jsxs(`div`,{style:Ae.container,children:[Q.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),Q.jsx(`div`,{style:{fontSize:7,color:Ft.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),Q.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),Q.jsx(`input`,{style:Ae.input,value:l,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&Q.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:Q.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),Q.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:qh(b.trim(),Hh[u]))}}}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:qh(b.trim(),Hh[u]))}},children:`JOIN`})]})]})}),A.length>0&&Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>Q.jsx(kO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),Q.jsxs(`span`,{style:{fontSize:7,color:Ft.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function kO({room:s,onJoin:t}){const[i,r]=W.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:Q.jsx(`span`,{style:{fontSize:8,color:i?Ft.accent:Ft.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),Q.jsx(`button`,{className:`lobby-btn`,style:{background:Ft.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Ft.accent,marginBottom:6},card:{background:Ft.card,border:`1px solid ${Ft.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Ft.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 10px`,color:Ft.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Ft.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Ft.accent,border:`1px solid ${Ft.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,_d=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},UO=(s,t)=>{const i=[];for(const[r,l]of s)i.push(t(l,r));return i},zO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Kh=s=>s[s.length-1],jO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class BO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,lc=Math.abs,aw=(s,t)=>ss>t?s:t,lw=s=>s!==0?s<0:1/s<0,DS=1,MS=2,Vh=4,Gh=8,ol=32,ms=64,an=128,Ic=31,Td=63,_i=127,LO=2147483647,wc=Number.MAX_SAFE_INTEGER,kS=Number.MIN_SAFE_INTEGER,IO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),HO=String.fromCharCode,qO=s=>s.toLowerCase(),KO=/^\s*/g,VO=s=>s.replace(KO,``),GO=/([A-Z])/g,US=(s,t)=>VO(s.replace(GO,i=>`${t}${qO(i)}`)),$O=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let l=0;lcl.encode(s),QO=cl?YO:$O;let sl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});sl&&sl.decode(new Uint8Array).length===1&&(sl=null);const FO=(s,t)=>NO(t,()=>s).join(``);class bl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Fr=()=>new bl,JO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(JO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Ad=Se,At=(s,t)=>{for(;t>_i;)Se(s,an|_i&t),t=kn(t/128);Se(s,_i&t)},lp=(s,t)=>{const i=lw(t);for(i&&(t=-t),Se(s,(t>Td?an:0)|(i?ms:0)|Td&t),t=kn(t/64);t>0;)Se(s,(t>_i?an:0)|_i&t),t=kn(t/128)},Od=new Uint8Array(3e4),ZO=Od.length/3,WO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let l=0;l{const i=s.cbuf.length,r=s.cpos,l=aw(i-r,t.length),o=t.length-l;s.cbuf.set(t.subarray(0,l),r),s.cpos+=l,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Qr(i*2,o)),s.cbuf.set(t.subarray(l)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),Hc(s,t)},op=(s,t)=>{XO(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},tR=(s,t)=>op(s,4).setFloat32(0,t,!1),eR=(s,t)=>op(s,8).setFloat64(0,t,!1),nR=(s,t)=>op(s,8).setBigInt64(0,t,!1),zS=new DataView(new ArrayBuffer(4)),sR=s=>(zS.setFloat32(0,s),zS.getFloat32(0)===s),ul=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:IO(t)&&lc(t)<=LO?(Se(s,125),lp(s,t)):sR(t)?(Se(s,124),tR(s,t)):(Se(s,123),eR(s,t));break;case`bigint`:Se(s,122),nR(s,t);break;case`object`:if(t===null)Se(s,126);else if(Lc(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const NS=s=>{s.count>0&&(lp(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class oc{constructor(){this.encoder=new bl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(NS(this),this.count=1,this.s=t)}toUint8Array(){return NS(this),wn(this.encoder)}}const BS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);lp(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class $h{constructor(){this.encoder=new bl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(BS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return BS(this),wn(this.encoder)}}class iR{constructor(){this.sarr=[],this.s=``,this.lensE=new oc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new bl;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),Hc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},ow=Vn(`Unexpected end of array`),cw=Vn(`Integer out of Range`);class qc{constructor(t){this.arr=t,this.pos=0}}const qr=s=>new qc(s),Rd=s=>s.pos!==s.arr.length,rR=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>rR(s,wt(s)),Kr=s=>s.arr[s.pos++],wt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.poswc)throw cw}throw ow},cp=s=>{let t=s.arr[s.pos++],i=t&Td,r=64;const l=(t&ms)>0?-1:1;if((t&an)===0)return l*i;const o=s.arr.length;for(;s.poswc)throw cw}throw ow},aR=s=>{let t=wt(s);if(t===0)return``;{let i=String.fromCodePoint(Kr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Kr(s));else for(;t>0;){const r=t<1e4?t:1e4,l=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},lR=s=>sl.decode(je(s)),Ai=sl?lR:aR,up=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},oR=s=>up(s,4).getFloat32(0,!1),cR=s=>up(s,8).getFloat64(0,!1),uR=s=>up(s,8).getBigInt64(0,!1),fR=[s=>{},s=>null,cp,oR,cR,uR,s=>!1,s=>!0,Ai,s=>{const t=wt(s),i={};for(let r=0;r{const t=wt(s),i=[];for(let r=0;rfR[127-Kr(s)](s);class LS extends qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Rd(this)?this.count=wt(this)+1:this.count=-1),this.count--,this.s}}class cc extends qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=cp(this);const t=lw(this.s);this.count=1,t&&(this.s=-this.s,this.count=wt(this)+2)}return this.count--,this.s}}class Yh extends qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=cp(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=wt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class hR{constructor(t){this.decoder=new cc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const dR=crypto.getRandomValues.bind(crypto),uw=()=>dR(new Uint32Array(1))[0],pR=`10000000-1000-4000-8000`+-1e11,gR=()=>pR.replace(/[018]/g,s=>(s^uw()&15>>s/4).toString(16)),bc=Date.now,IS=s=>new Promise(s);Promise.all.bind(Promise);const HS=s=>s===void 0?null:s;class yR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let fw=new yR,mR=!0;try{typeof localStorage<`u`&&localStorage&&(fw=localStorage,mR=!1)}catch{}const SR=fw,hl=Symbol(`Equality`),hw=(s,t)=>s===t||s[hl]?.(t)||!1,vR=s=>typeof s==`object`,wR=Object.assign,bR=Object.keys,ER=(s,t)=>{for(const i in s)t(s[i],i)},Ec=s=>bR(s).length,CR=s=>{for(const t in s)return!1;return!0},El=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},fp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),xR=(s,t)=>s===t||Ec(s)===Ec(t)&&El(s,(i,r)=>(i!==void 0||fp(t,r))&&hw(t[r],i)),_R=Object.freeze,dw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&dw(s[t])}return _R(s)},hp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[hl]!=null)return s[hl](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var pw={};const dl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const AR=()=>{if(In===void 0)if(dl){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${US(t,`-`)}`,i),In.set(`-${US(t,`-`)}`,i)}})):In=Fe();return In},Dd=s=>AR().has(s),Cc=s=>HS(dl?pw[s.toUpperCase().replaceAll(`-`,`_`)]:SR.getItem(s)),gw=s=>Dd(`--`+s)||Cc(s)!==null,OR=gw(`production`),RR=dl&&TR(pw.FORCE_COLOR,[`true`,`1`,`2`]),DR=RR||!Dd(`--no-colors`)&&!gw(`no-color`)&&(!dl||process.stdout.isTTY)&&(!dl||Dd(`--color`)||Cc(`COLORTERM`)!==null||(Cc(`TERM`)||``).includes(`color`)),MR=s=>new Uint8Array(s),kR=s=>{const t=MR(s.byteLength);return t.set(s),t};class UR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new UR(s,t),qS=s=>s.next()>=.5,Qh=(s,t,i)=>kn(s.next()*(i+1-t)+t),yw=(s,t,i)=>kn(s.next()*(i+1-t)+t),dp=(s,t,i)=>yw(s,t,i),zR=s=>HO(dp(s,97,122)),jR=(s,t=0,i=20)=>{const r=dp(s,t,i);let l=``;for(let o=0;ot[dp(s,0,t.length-1)],NR=Symbol(`0schema`);class BR{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(FO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Md=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[hl]?hw(s,t):Lc(s)?ap(s,i=>iw(t,r=>Md(i,r))):vR(s)?El(s,(i,r)=>Md(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Md(i,r)}equals(t){return this.constructor===t.constructor&&Ur(this.shape,t.shape)}[NR](){return!0}[hl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Jr(this,Yc)}get optional(){return new vw(this)}cast(t){return KS(t,this),t}expect(t){return KS(t,this),t}}class pp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new pp(s,t);ue(pp);class gp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new gp(s);ue(gp);class Kc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Vc=(...s)=>new Kc(s),mw=ue(Kc),LR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Sw=s=>{if(Vr.check(s))return[LR(s)];if(mw.check(s))return s.shape.map(t=>t+``);if(Ow.check(s))return[`[+-]?\\d+.?\\d*`];if(Rw.check(s))return[`.*`];if(xc.check(s))return s.shape.map(Sw).flat(1);bn()};class IR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Sw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(IR);const HR=Symbol(`optional`);class vw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[HR](){return!0}}const qR=ue(vw);class KR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(KR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):El(this.shape,(r,l)=>{const o=this._isPartial&&!fp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const VR=s=>new Gc(s),GR=ue(Gc),$R=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class ww extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&El(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const bw=(s,t)=>new ww(s,t),YR=ue(ww);class Ew extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&El(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const QR=(...s)=>new Ew(s);ue(Ew);class Cw extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new yp(t)}check(t,i){const r=Lc(t)&&ap(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const xw=(...s)=>new Cw(s),FR=ue(Cw),JR=be(s=>Lc(s));class _w extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const XR=(s,t=null)=>new _w(s,t);ue(_w);const ZR=XR(Ie);class WR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=QR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const PR=ue(WR),tD=be(s=>typeof s==`function`);class eD extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(eD,s=>s.shape.length>0);class yp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=iw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Jr=(...s)=>s.findIndex(t=>xc.check(t))>=0?Jr(...s.map(t=>pl(t)).map(t=>xc.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new yp(s),xc=ue(yp),Tw=()=>!0,_c=be(Tw),nD=ue(gp,s=>s.shape===Tw),mp=be(s=>typeof s==`bigint`),sD=be(s=>s===mp),Aw=be(s=>typeof s==`symbol`);be(s=>s===Aw);const zr=be(s=>typeof s==`number`),Ow=be(s=>s===zr),Vr=be(s=>typeof s==`string`),Rw=be(s=>s===Vr),$c=be(s=>typeof s==`boolean`),iD=be(s=>s===$c),Dw=Vc(void 0);ue(Kc,s=>s.shape.length===1&&s.shape[0]===void 0);Vc(void 0);const Yc=Vc(null),rD=ue(Kc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(pp,s=>s.shape===Uint8Array);const aD=Jr(zr,Vr,Yc,Dw,mp,$c,Aw);(()=>{const s=xw(_c),t=bw(Vr,_c),i=Jr(zr,Vr,Yc,$c,s,t);return s.shape=i,t.shape.values=i,i})();const pl=s=>{if(ZR.check(s))return s;if($R.check(s)){const t={};for(const i in s)t[i]=pl(s[i]);return VR(t)}else{if(JR.check(s))return Jr(...s.map(pl));if(aD.check(s))return Vc(s);if(tD.check(s))return ue(s)}bn()},KS=OR?()=>{}:(s,t)=>{const i=new BR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class lD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:pl(t),h:i}),this}else(t){return this.if(_c,t)}done(){return(t,i)=>{for(let r=0;rnew lD(s),Mw=oD(_c).if(Ow,(s,t)=>Qh(t,kS,wc)).if(Rw,(s,t)=>jR(t)).if(iD,(s,t)=>qS(t)).if(sD,(s,t)=>BigInt(Qh(t,kS,wc))).if(xc,(s,t)=>Cr(t,Fh(t,s.shape))).if(GR,(s,t)=>{const i={};for(const r in s.shape){let l=s.shape[r];if(qR.check(l)){if(qS(t))continue;l=l.shape}i[r]=Mw(l,t)}return i}).if(FR,(s,t)=>{const i=[],r=yw(t,0,42);for(let l=0;lFh(t,s.shape)).if(rD,(s,t)=>null).if(PR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(nD,(s,t)=>Cr(t,Fh(t,[zr,Vr,Yc,Dw,mp,$c,xw(zr),bw(Jr(`a`,`b`,`c`),zr)]))).if(YR,(s,t)=>{const i={},r=Qh(t,0,3);for(let l=0;lMw(pl(t),s),Qc=typeof document<`u`?document:{};be(s=>s.nodeType===dD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===uD);be(s=>s.nodeType===fD);const cD=s=>UO(s,(t,i)=>`${i}:${t};`).join(``),uD=Qc.ELEMENT_NODE,fD=Qc.TEXT_NODE,hD=Qc.DOCUMENT_NODE,dD=Qc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===hD);const ws=Symbol,kw=ws(),Uw=ws(),pD=ws(),gD=ws(),yD=ws(),zw=ws(),mD=ws(),Sp=ws(),SD=ws(),vD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...jw(s)),Nw.forEach(t=>t.print(s))},CD=(...s)=>{console.warn(...jw(s)),s.unshift(Sp),Nw.forEach(t=>t.print(s))},Nw=Oi(),Bw=s=>({[Symbol.iterator](){return this},next:s}),xD=(s,t)=>Bw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Jh=(s,t)=>Bw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class Lw{constructor(t,i){this.clock=t,this.len=i}}class Fc{constructor(){this.clients=new Map}}const Iw=(s,t,i)=>t.clients.forEach((r,l)=>{const o=s.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const l=kn((i+r)/2),o=s[l],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&_D(i,t.clock)!==null},vp=s=>{s.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?l.len=Qr(l.len,o.clock+o.len-l.clock):(r{const t=new Fc;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new Lw(i,r))},wp=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const l=r.length;At(s.restEncoder,l);for(let o=0;o{const t=new Fc,i=wt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,l,()=>[]);for(let d=0;d{const r=new Fc,l=wt(s.restDecoder);for(let o=0;o0){const o=new Jc;return At(o.restEncoder,0),wp(o,r),o.toUint8Array()}return null},qw=uw;class Xr extends rw{constructor({guid:t=gR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=qw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new $w,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=IS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>IS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&Gt(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return Gt(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Oe&&l!==i)if(l===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Nr)}getText(t=``){return this.get(t,$r)}getMap(t=``){return this.get(t,Gr)}getXmlElement(t=``){return this.get(t,Yr)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Xr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,Gt(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class OD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return wt(this.restDecoder)}readDsLen(){return wt(this.restDecoder)}}class RD extends OD{readLeftID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readRightID(){return Rt(wt(this.restDecoder),wt(this.restDecoder))}readClient(){return wt(this.restDecoder)}readInfo(){return Kr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return wt(this.restDecoder)===1}readTypeRef(){return wt(this.restDecoder)}readLen(){return wt(this.restDecoder)}readAny(){return fl(this.restDecoder)}readBuf(){return kR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class DD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=wt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=wt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Ac extends DD{constructor(t){super(t),this.keys=[],wt(t),this.keyClockDecoder=new Yh(je(t)),this.clientDecoder=new cc(je(t)),this.leftClockDecoder=new Yh(je(t)),this.rightClockDecoder=new Yh(je(t)),this.infoDecoder=new LS(je(t),Kr),this.stringDecoder=new hR(je(t)),this.parentInfoDecoder=new LS(je(t),Kr),this.typeRefDecoder=new cc(je(t)),this.lenDecoder=new cc(je(t))}readLeftID(){return new jr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new jr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return fl(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return fl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Qr(r,t[0].id.clock);const l=Gn(t,r);At(s.restEncoder,t.length-l),s.writeClient(i),At(s.restEncoder,r);const o=t[l];o.write(s,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),bp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{zD(s,t.clients.get(l),l,o)})},jD=(s,t)=>{const i=Fe(),r=wt(s.restDecoder);for(let l=0;l{const r=[];let l=ni(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new $w,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Jc;return Kw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},BD=(s,t)=>Kw(s,t.doc.store,t.beforeState),LD=(s,t,i,r=new Ac(s))=>Gt(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=jD(r,u),g=ND(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=ZS([m.update,g.update])}}else d.pendingStructs=g;const y=VS(r,l,d);if(d.pendingDs){const v=new Ac(qr(d.pendingDs));wt(v.restDecoder);const b=VS(v,l,d);y&&b?d.pendingDs=ZS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,Vw(l.doc,v)}},i,!1),Vw=(s,t,i,r=Ac)=>{const l=qr(t);LD(l,s,i,new r(l))},GS=(s,t,i)=>Vw(s,t,i,RD);class ID{constructor(){this.l=[]}}const $S=()=>new ID,YS=(s,t)=>s.l.push(t),QS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(l=>t!==l),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>hp(s.l,[t,i]);class jr{constructor(t,i){this.client=t,this.clock=i}}const Xo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new jr(s,t),HD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Ar=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!Hw(t.ds,s.id),kd=(s,t)=>{const i=vs(s.meta,kd,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class $w{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const bp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Yw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Gn=(s,t)=>{let i=0,r=s.length-1,l=s[r],o=l.id.clock;if(o===t)return r;let u=kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=s[u],o=l.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[Gn(i,t.clock)]},Xh=qD,Ud=(s,t,i)=>{const r=Gn(t,i),l=t[r];return l.id.clock{const i=s.doc.store.clients.get(t.client);return i[Ud(s,i,t.clock)]},FS=(s,t,i)=>{const r=t.clients.get(i.client),l=Gn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Uc(s,o,i.clock-o.id.clock+1)),o},KD=(s,t,i)=>{const r=s.clients.get(t.id.client);r[Gn(r,t.id.clock)]=i},Qw=(s,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ud(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!zO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(vp(t.deleteSet),BD(s,t),wp(s,t.deleteSet),!0),XS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},uc=(s,t)=>{let i=s[t],r=s[t-1],l=t;for(;l>0;i=r,r=s[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&s.splice(t+1-o,o),o},GD=(s,t,i)=>{for(const[r,l]of s.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Gn(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=aw(l.length-1,1+Gn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+uc(l,p)}})},Fw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),Gw(g._dEH,p,i))})}),d.push(()=>r.emit(`afterTransaction`,[i,r])),hp(d,[]),i._needFormattingCleanup&&uM(i)}finally{r.gc&&GD(o,l,r.gcFilter),$D(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Qr(Gn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+uc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=Gn(b,v);w+11||w>0&&uc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(ED(Sp,kw,`[yjs] `,Uw,zw,`Changed the client-id because another client seems to be using it.`),r.clientID=qw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new kD;JS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Jc;JS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Fw(s,t+1)}}},Gt=(s,t,i=null,r=!0)=>{const l=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new VD(s,i,r),l.push(s._transaction),l.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===l[0];s._transaction=null,d&&Fw(l,0)}}return u};function*YD(s){const t=wt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:l}=i.id;return new de(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},ZS=(s,t=Ac,i=Jc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(qr(m)));let l=r.map(m=>new QD(m,!0)),o=null;const u=new i,d=new FD(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Ya(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=JD(v,w)),o.struct.mergeWith(v)||(Ya(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())Ya(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ya(d,o.struct,o.offset),o=null),XD(d);const p=r.map(m=>AD(m)),g=TD(p);return wp(u,g),u.toUint8Array()},Jw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Fr(),s.written=0)},Ya=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Jw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},XD=s=>{Jw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Kh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Kh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Kh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(WS);const i=this.target,r=Oi(),l=Oi(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const ZD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{CD(`Invalid access: Add Yjs type to a document before reading data.`)},Xw=80;let Ep=0;class WD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ep++}}const PD=s=>{s.timestamp=Ep++},Zw=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=Ep++},tM=(s,t,i)=>{if(s.length>=Xw){const r=s.reduce((l,o)=>l.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>lc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&lc(i.index-l){for(let r=s.length-1;r>=0;r--){const l=s[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Qr(t,l.index+i))}},Wc=(s,t,i)=>{const r=s,l=t.changedParentTypes;for(;vs(l,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=$S(),this._dEH=$S(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){YS(this._eH,t)}observeDeep(t){YS(this._dEH,t)}unobserve(t){QS(this._eH,t)}unobserveDeep(t){QS(this._dEH,t)}toJSON(){}}const Ww=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const l=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},Pw=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return yl(s,(r,l)=>{i.push(t(r,l,s))}),i},eM=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},eb=(s,t)=>{s.doc??ke();const i=Zc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Di(g)),l.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Cl(new Uint8Array(y))),l.integrate(s,0);break;case Xr:l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new xl(y)),l.integrate(s,0);break;default:if(y instanceof Oe)l=new de(Rt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new bs(y)),l.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},nb=()=>Vn(`Length exceeded!`),sb=(s,t,i,r)=>{if(i>t._length)throw nb();if(i===0)return t._searchMarker&&gl(t._searchMarker,i,r.length),Oc(s,t,null,r);const l=i,o=Zc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Oc(s,t,l,i)},ib=(s,t,i,r)=>{if(r===0)return;const l=i,o=r,u=Zc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw nb();t._searchMarker&&gl(t._searchMarker,l,-o+r)},Rc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},Cp=(s,t,i,r)=>{const l=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new Cl(r);break;case Xr:d=new xl(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(s,0)},xp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},rb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},sM=(s,t)=>{const i={};return s._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Ar(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},Zo=s=>(s.doc??ke(),xD(s._map.entries(),t=>!t[1].deleted));class iM extends Xc{}class Nr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Nr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Nr}clone(){const t=new Nr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Wc(this,t,new iM(this,t))}insert(t,i){this.doc!==null?Gt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?Gt(this.doc,i=>{nM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?Gt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return eb(this,t)}toArray(){return Pw(this)}slice(t=0,i=this.length){return Ww(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return tb(this,t)}forEach(t){yl(this,t)}[Symbol.iterator](){return eM(this)}_write(t){t.writeTypeRef(RM)}}const rM=s=>new Nr;class aM extends Xc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Gr extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Gr}clone(){const t=new Gr;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Wc(this,t,new aM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Oe?l.toJSON():l}}),t}get size(){return[...Zo(this)].length}keys(){return Jh(Zo(this),t=>t[0])}values(){return Jh(Zo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Jh(Zo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return xp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?Gt(this.doc,t=>{this.forEach(function(i,r,l){Rc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(DM)}}const lM=s=>new Gr,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&xR(s,t);class zd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case pe:this.right.deleted||Zr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const PS=(s,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case pe:t.right.deleted||Zr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?Zc(t,i):null;if(o){const u=new zd(o.p.left,o.p,o.index,l);return PS(s,u,i-o.index)}else{const u=new zd(null,t._start,0,l);return PS(s,u,i)}},lb=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=s.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Zr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},ob=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},cb=(s,t,i,r)=>{const l=s.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Zh=(s,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l),p=r.constructor===String?new $n(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&gl(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),lb(s,t,i,d)},tv=(s,t,i,r,l)=>{const o=s.doc,u=o.clientID;ob(i,l);const d=cb(s,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` -`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new $n(p)),i.right.integrate(s,0),i.forward()}lb(s,t,i,d)},ub=(s,t,i,r,l)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case pe:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Zr(l,g);break}}}t=t.right}return d},oM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},cM=s=>{let t=0;return Gt(s.doc,i=>{let r=s._start,l=s._start,o=Fe();const u=_d(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case pe:Zr(u,l.content);break;default:t+=ub(i,r,l,o,u),o=_d(u),r=l;break}l=l.right}}),t},uM=s=>{const t=new Set,i=s.doc;for(const[r,l]of s.afterState.entries()){const o=s.beforeState.get(r)||0;l!==o&&Qw(s,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}Gt(i,r=>{Iw(s,s.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===pe?t.add(o):oM(r,l)});for(const l of t)cM(l)})},ev=(s,t,i)=>{const r=i,l=_d(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case $n:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];Gt(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},CR(p)||(b.attributes=wR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case $n:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Zr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class $r extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new $r}clone(){const t=new $r;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new fM(this,t,i);Wc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===$n&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?Gt(this.doc,r=>{const l=new zd(null,this._start,0,new Map);for(let o=0;o0)&&Zh(r,this,l,d,u.attributes||{})}else u.retain!==void 0?tv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&ev(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Ar(p,t)||i!==void 0&&Ar(p,i))switch(p.content.constructor){case $n:{const y=o.get(`ychange`);t!==void 0&&!Ar(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Ar(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case pe:Ar(p,t)&&(g(),Zr(o,p.content));break}p=p.right}g()};return t||i?Gt(u,y=>{t&&kd(y,t),i&&kd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Zh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!r);Zh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?Gt(r,l=>{ev(l,Wo(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?Gt(l,o=>{const u=Wo(o,this,t,!1);u.right!==null&&tv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return xp(this,t)}getAttributes(){return rb(this)}_write(t){t.writeTypeRef(MM)}}const hM=s=>new $r;class Wh{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Yr||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Wh(this,t)}querySelector(t){t=t.toUpperCase();const r=new Wh(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Wh(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Wc(this,t,new gM(this,i,t))}toString(){return tb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),yl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?Gt(this.doc,r=>{sb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)Gt(this.doc,r=>{const l=t&&t instanceof Oe?t._item:t;Oc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?Gt(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return Pw(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return eb(this,t)}slice(t=0,i=this.length){return Ww(this,t,i)}forEach(t){yl(this,t)}_write(t){t.writeTypeRef(UM)}}const dM=s=>new Ri;class Yr extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new Yr(this.nodeName)}clone(){const t=new Yr(this.nodeName),i=this.getAttributes();return ER(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?Gt(this.doc,i=>{Rc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?Gt(this.doc,r=>{Cp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return xp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?sM(this,t):rb(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return yl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(kM),t.writeKey(this.nodeName)}}const pM=s=>new Yr(s.readKey());class gM extends Xc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Dc extends Gr{constructor(t){super(),this.hookName=t}_copy(){return new Dc(this.hookName)}clone(){const t=new Dc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(zM),t.writeKey(this.hookName)}}const yM=s=>new Dc(s.readKey());class Mc extends $r{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Mc}clone(){const t=new Mc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(jM)}}const mM=s=>new Mc;class _p{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const SM=0;class vn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Yw(t.doc.store,this)}write(t,i){t.writeInfo(SM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Cl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Cl(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const vM=s=>new Cl(s.readBuf());class ml{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new ml(this.len)}splice(t){const i=new ml(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Tc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const wM=s=>new ml(s.readLen()),fb=(s,t)=>new Xr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class xl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new xl(fb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const bM=s=>new xl(fb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const EM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const CM=s=>new pe(s.readKey(),s.readJSON());class kc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new kc(this.arr)}splice(t){const i=new kc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const AM=s=>new $n(s.readString()),OM=[rM,lM,hM,pM,dM,yM,mM],RM=0,DM=1,MM=2,kM=3,UM=4,zM=5,jM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const NM=s=>new bs(OM[s.readTypeRef()](s)),Uc=(s,t,i)=>{const{client:r,clock:l}=t.id,o=new de(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends _p{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?MS:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&DS)>0}set keep(t){this.keep!==t&&(this.info^=DS)}get countable(){return(this.info&MS)>0}get deleted(){return(this.info&Vh)>0}set deleted(t){this.deleted!==t&&(this.info^=Vh)}markDeleted(){this.info|=Vh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===jr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=FS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===jr){const r=Xh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=FS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Xo(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Tc(t.deleteSet,this.id.client,this.id.clock,this.length),XS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?KD(t,this,new vn(this.id,this.length)):this.content=new ml(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Ic|(r===null?0:an)|(l===null?0:ms)|(o===null?0:ol);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=HD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===jr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const hb=(s,t)=>BM[t&Ic](s),BM=[()=>{bn()},wM,xM,vM,AM,EM,CM,NM,TM,bM,()=>{bn()}],LM=10;class Rn extends _p{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(LM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const db=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},pb=`__ $YJS$ __`;db[pb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);db[pb]=!0;const Ph=3e4;class IM extends BO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=bc();this.getLocalState()!==null&&Ph/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&Ph<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&HM(this,r,`timeout`)},kn(Ph/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:bc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Ur(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const HM=(s,t,i)=>{const r=[];for(let l=0;l0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},nv=(s,t,i=s.states)=>{const r=t.length,l=Fr();At(l,r);for(let o=0;o{const r=qr(t),l=bc(),o=[],u=[],d=[],p=[],g=wt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},KM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},VM=15e3;var GM=class fc extends rw{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return KM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&GS(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new yv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Fr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=qr(t);for(;Rd(i);){const r=je(i);GS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qr(t);for(;Rd(i);){const r=je(i);try{qM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(fc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},VM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=nv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(fc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=nv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(fc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const gb=W.createContext(null);function $M(){const s=W.useContext(gb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function YM(s,t){return ew({streamOptions:{url:s,headers:t,contentType:`application/json`},state:RS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(RS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const sv=W.createContext(null);function QM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Nd(),[l,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await YM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?Q.jsx(sv.Provider,{value:{scoresDB:l},children:t}):Q.jsx(sv.Provider,{value:null,children:t})}const Qt=14,FM=30,JM=25,iv=120,XM=1500,Po=.5,ZM=1,xr=8,rv=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function WM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:FM,rows:JM}}const _r={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function Wa(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function td(s,t){const i=Ci(s),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function PM(s){const t=Wa(s),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function t2(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function e2(s,t,i,r,l){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):l.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mWM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),J=W.useRef(null),nt=W.useRef({x:0,y:0,stunnedUntil:0}),st=W.useMemo(()=>t2(m,l)*ZM,[m,l]),Ct=W.useMemo(()=>Math.round(st/g*100),[st,g]),Kt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P=``;if(Kt.forEach((Mt,kt)=>{Mt>et&&(et=Mt,P=kt)}),!P||et===0)return null;const dt=Math.round(et/g*100);if(P===l)return{name:o,pct:dt};const pt=v.get(P);return pt?{name:pt.name,pct:dt}:null},[Kt,g,l,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);nt.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const dt=Ci(t);dt.set(l,{x:et,y:P,name:o,color:u});const pt=Wa(t);return t.transact(()=>{pt.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),()=>{dt.delete(l)}},[t,l,o,u,d,p]),W.useEffect(()=>{const et=Wa(t),P=()=>{const dt=PM(t);y(dt);const pt=new Map;dt.forEach(kt=>{pt.set(kt.owner,(pt.get(kt.owner)||0)+1)});const Mt=Po*g;pt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===l&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,l,o]),W.useEffect(()=>{const et=Ci(t),P=()=>{b(td(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),W.useEffect(()=>{const et=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&dt.add(te)}}),N(Mt=>{const kt=dt.size;return Mt===kt?Mt:kt});const pt=Ci(t);pt.forEach((Mt,kt)=>{kt!==l&&!P.has(kt)&&pt.delete(kt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,l,o]),W.useEffect(()=>{const et=new Set,P=pt=>{if(pt.key in _r){pt.preventDefault();const Mt=!J.current;et.add(pt.key),J.current=_r[pt.key],Mt&&F.current?.(_r[pt.key])}},dt=pt=>{if(et.delete(pt.key),pt.key in _r){let Mt=!1;for(const kt of et)if(kt in _r){J.current=_r[kt],Mt=!0;break}Mt||(J.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),at=10,ut=W.useCallback((et,P)=>{const dt=Date.now();if(dt-Z.currentMath.abs(Cs)?F.current?.({dx:Qn>0?1:-1,dy:0}):F.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=dt)},[]),_=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY},ut(P.clientX,P.clientY)},[ut]),H=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],dt=P.clientX-q.current.x,pt=P.clientY-q.current.y;Math.abs(dt){q.current=null},[]),F=W.useRef(void 0),ot=W.useCallback(et=>{const P=M.current;if(!P)return;const dt=P.createSVGPoint();dt.x=et.clientX,dt.y=et.clientY;const pt=P.getScreenCTM();if(!pt)return;const Mt=dt.matrixTransform(pt.inverse()),kt=Mt.x/Qt-.5,te=Mt.y/Qt-.5,Cn=nt.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?F.current?.({dx:Ue>0?1:-1,dy:0}):F.current?.({dx:0,dy:xn>0?1:-1}))},[]),it=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=dt=>{const pt=nt.current,Mt=Date.now();if(pt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+XM;pt.stunnedUntil=xs;const Tl=Ci(t);Tl.set(_n,{...Li,stunnedUntil:xs}),Tl.set(l,{x:pt.x,y:pt.y,name:o,color:u,stunnedUntil:xs});return}pt.x=kt,pt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(l,{x:kt,y:te,name:o,color:u});const Qn=Wa(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:l,claimedAt:Cs})});const Re=new Set([l]);td(t,l).forEach((_n,Li)=>Re.add(Li));const _l=e2(l,Qn,d,p,Re);_l.length>0&&t.transact(()=>{for(const _n of _l)Qn.set(`${_n.x},${_n.y}`,{owner:l,claimedAt:Cs})})};F.current=et;const P=setInterval(()=>{const dt=J.current;dt&&et(dt)},iv);return()=>clearInterval(P)},[t,l,o,u,d,p]);const gt=d*Qt,Dt=p*Qt,vt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const ln=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx(`line`,{x1:P*Qt,y1:0,x2:P*Qt,y2:Dt,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx(`line`,{x1:0,y1:P*Qt,x2:gt,y2:P*Qt,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,gt,Dt]),Es=W.useMemo(()=>{const et=new Map;return et.set(l,u),v.forEach((P,dt)=>{et.set(dt,P.color)}),et},[l,u,v]);return Q.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Q.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } - .live-dot { animation: blink 1.5s ease-in-out infinite; } - @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } - .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:xr},children:[Q.jsx(`button`,{onClick:it,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:xr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Q.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:vt,title:`Click to copy room name`,children:[Q.jsx(`span`,{style:{color:Vt.accent},children:o}),Q.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Q.jsx(`span`,{style:{color:D?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),Q.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(et=>!et),children:[T,` PLAYERS`,z&&Q.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Kt.get(et.id)||0,dt=Math.round(P/g*100);return Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Q.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Q.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:et.color,display:`inline-block`}}),et.name]}),Q.jsxs(`span`,{style:{color:Vt.accent},children:[dt,`%`]})]},et.id)})})]})]}),Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:gt,marginBottom:8,fontSize:xr},children:[Q.jsxs(`div`,{children:[Q.jsxs(`span`,{style:{fontSize:rv,color:Vt.accent},children:[Ct,`%`]}),` `,Q.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Q.jsxs(`div`,{style:{textAlign:`right`},children:[Q.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Po*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Po*100),`%`]}),ht&&Q.jsxs(`div`,{children:[Q.jsx(`span`,{style:{color:Vt.dim},children:ht.name}),` `,Q.jsxs(`span`,{style:{fontSize:rv,color:Vt.accent},children:[ht.pct,`%`]})]})]})]}),Q.jsxs(`svg`,{ref:M,viewBox:`0 0 ${gt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ot,style:{width:`100%`,maxWidth:gt,height:`auto`,background:Vt.grid,border:`1px solid ${Vt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[ln,Array.from(m.entries()).map(([et,P])=>{const[dt,pt]=et.split(`,`).map(Number),Mt=Es.get(P.owner)||Vt.accent;return Q.jsx(`rect`,{x:dt*Qt,y:pt*Qt,width:Qt,height:Qt,fill:Mt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const et=nt.current.stunnedUntil>0&&Date.now(){const et=Wa(t);t.transact(()=>{Array.from(et.keys()).forEach(dt=>et.delete(dt))}),K(null)},style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Q.jsx(`button`,{onClick:it,style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}const av=[`#00E5FF`,`#FF3D71`,`#6eeb83`,`#ffbc42`,`#ee6352`,`#9ac2c9`,`#8acb88`,`#1be7ff`,`#C77DFF`,`#72EFDD`,`#F72585`,`#4ECDC4`];function s2(s){return av[s%av.length]}function i2(s){let t=0;for(let i=0;i{const D=`player-${Math.random().toString(36).slice(2,10)}`,A=i2(r);return{playerId:D,playerColor:s2(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Xr,A=new IM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new GM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+rp*1e3})}catch{}},CO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs(`div`,{style:ed.center,children:[Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Q.jsx(`button`,{onClick:l,style:ed.btn,children:`BACK`})]}):m?Q.jsxs(`div`,{style:ed.center,children:[Q.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Q.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Q.jsx(gb.Provider,{value:N,children:Q.jsx(QM,{roomId:s,children:Q.jsx(n2,{onLeave:l})})})}const ed={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},lv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],ov=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function a2(){const s=lv[Math.floor(Math.random()*lv.length)],t=ov[Math.floor(Math.random()*ov.length)];return`${s} ${t}`}function l2(){return localStorage.getItem(`territory-player-name`)||a2()}function o2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function c2(){const s=o2(),{yjsEndpoint:t,yjsHeaders:i}=Nd(),[r,l]=W.useState(l2),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return s?Q.jsx(r2,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Q.jsx(MO,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function u2(){return Q.jsx(P1,{children:Q.jsx(OO,{children:Q.jsx(c2,{})})})}G1.createRoot(document.getElementById(`root`)).render(Q.jsx(u2,{})); diff --git a/website/public/demos/territory-wars/assets/index-DqJU4iAc.js b/website/public/demos/territory-wars/assets/index-DqJU4iAc.js deleted file mode 100644 index 4fcf5940c3..0000000000 --- a/website/public/demos/territory-wars/assets/index-DqJU4iAc.js +++ /dev/null @@ -1,42 +0,0 @@ -(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const a of document.querySelectorAll(`link[rel="modulepreload"]`))r(a);new MutationObserver(a=>{for(const o of a)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin===`use-credentials`?o.credentials=`include`:a.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function j1(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,`default`)?s.default:s}var dh={exports:{}},$l={};var _0;function N1(){if(_0)return $l;_0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,a,o){var u=null;if(o!==void 0&&(u=``+o),a.key!==void 0&&(u=``+a.key),`key`in a){o={};for(var d in a)d!==`key`&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:s,type:r,key:u,ref:a!==void 0?a:null,props:o}}return $l.Fragment=t,$l.jsx=i,$l.jsxs=i,$l}var T0;function B1(){return T0||(T0=1,dh.exports=N1()),dh.exports}var Q=B1(),ph={exports:{}},Gl={},gh={exports:{}},yh={};var A0;function L1(){return A0||(A0=1,(function(s){function t(M,q){var Z=M.length;M.push(q);t:for(;0>>1,ft=M[rt];if(0>>1;rt<_;){var H=2*(rt+1)-1,Y=M[H],F=H+1,ct=M[F];if(0>a(Y,Z))Fa(ct,Y)?(M[rt]=ct,M[F]=Z,rt=F):(M[rt]=Y,M[H]=Z,rt=H);else if(Fa(ct,Z))M[rt]=ct,M[F]=Z,rt=F;else break t}}return q}function a(M,q){var Z=M.sortIndex-q.sortIndex;return Z!==0?Z:M.id-q.id}if(s.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;s.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();s.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function z(M){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=M)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function L(M){if(E=!1,z(M),!w)if(i(p)!==null)w=!0,I||(I=!0,lt());else{var q=i(g);q!==null&&ht(L,q.startTime-M)}}var I=!1,K=-1,X=5,tt=-1;function nt(){return T?!0:!(s.unstable_now()-ttM&&nt());){var rt=y.callback;if(typeof rt==`function`){y.callback=null,v=y.priorityLevel;var ft=rt(y.expirationTime<=M);if(M=s.unstable_now(),typeof ft==`function`){y.callback=ft,z(M),q=!0;break e}y===i(p)&&r(p),z(M)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&ht(L,_.startTime-M),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?lt():I=!1}}}var lt;if(typeof A==`function`)lt=function(){A(J)};else if(typeof MessageChannel<`u`){var at=new MessageChannel,Nt=at.port2;at.port1.onmessage=J,lt=function(){Nt.postMessage(null)}}else lt=function(){N(J,0)};function ht(M,q){K=N(function(){M(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125rt?(M.sortIndex=Z,t(g,M),i(p)===null&&M===i(g)&&(E?(D(K),K=-1):E=!0,ht(L,Z-rt))):(M.sortIndex=ft,t(p,M),w||b||(w=!0,I||(I=!0,lt()))),M},s.unstable_shouldYield=nt,s.unstable_wrapCallback=function(M){var q=v;return function(){var Z=v;v=q;try{return M.apply(this,arguments)}finally{v=Z}}}})(yh)),yh}var O0;function I1(){return O0||(O0=1,gh.exports=L1()),gh.exports}var mh={exports:{}},mt={};var R0;function H1(){if(R0)return mt;R0=1;var s=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=N.prototype;function A(_,H,Y){this.props=_,this.context=H,this.refs=T,this.updater=Y||w}var z=A.prototype=new D;z.constructor=A,E(z,N.prototype),z.isPureReactComponent=!0;var L=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Y){var F=Y.ref;return{$$typeof:s,type:_,key:H,ref:F!==void 0?F:null,props:Y}}function nt(_,H){return tt(_.type,H,_.props)}function J(_){return typeof _==`object`&&_!==null&&_.$$typeof===s}function lt(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return H[Y]})}var at=/\/+/g;function Nt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?lt(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function M(_,H,Y,F,ct){var st=typeof _;(st===`undefined`||st===`boolean`)&&(_=null);var yt=!1;if(_===null)yt=!0;else switch(st){case`bigint`:case`string`:case`number`:yt=!0;break;case`object`:switch(_.$$typeof){case s:case t:yt=!0;break;case m:return yt=_._init,M(yt(_._payload),H,Y,F,ct)}}if(yt)return ct=ct(_),yt=F===``?`.`+Nt(_,0):F,L(ct)?(Y=``,yt!=null&&(Y=yt.replace(at,`$&/`)+`/`),M(ct,H,Y,``,function(an){return an})):ct!=null&&(J(ct)&&(ct=nt(ct,Y+(ct.key==null||_&&_.key===ct.key?``:(``+ct.key).replace(at,`$&/`)+`/`)+yt)),H.push(ct)),1;yt=0;var Dt=F===``?`.`:F+`:`;if(L(_))for(var wt=0;wt<_.length;wt++)F=_[wt],st=Dt+Nt(F,wt),yt+=M(F,H,Y,st,ct);else if(wt=b(_),typeof wt==`function`)for(_=wt.call(_),wt=0;!(F=_.next()).done;)F=F.value,st=Dt+Nt(F,wt++),yt+=M(F,H,Y,st,ct);else if(st===`object`){if(typeof _.then==`function`)return M(ht(_),H,Y,F,ct);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return yt}function q(_,H,Y){if(_==null)return _;var F=[],ct=0;return M(_,F,``,``,function(st){return H.call(Y,st,ct++)}),F}function Z(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var rt=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ft={map:q,forEach:function(_,H,Y){q(_,function(){H.apply(this,arguments)},Y)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!J(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return mt.Activity=y,mt.Children=ft,mt.Component=N,mt.Fragment=i,mt.Profiler=a,mt.PureComponent=A,mt.StrictMode=r,mt.Suspense=p,mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,mt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return K.H.useMemoCache(_)}},mt.cache=function(_){return function(){return _.apply(null,arguments)}},mt.cacheSignal=function(){return null},mt.cloneElement=function(_,H,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var F=E({},_.props),ct=_.key;if(H!=null)for(st in H.key!==void 0&&(ct=``+H.key),H)!X.call(H,st)||st===`key`||st===`__self`||st===`__source`||st===`ref`&&H.ref===void 0||(F[st]=H[st]);var st=arguments.length-2;if(st===1)F.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),Sh.exports=q1(),Sh.exports}var U0;function V1(){if(U0)return Gl;U0=1;var s=I1(),t=Nd(),i=K1();function r(e){var n=`https://react.dev/errors/`+e;if(1ft||(e.current=rt[ft],rt[ft]=null,ft--)}function Y(e,n){ft++,rt[ft]=e.current,e.current=n}var F=_(null),ct=_(null),st=_(null),yt=_(null);function Dt(e,n){switch(Y(st,n),Y(ct,e),Y(F,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Fm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Fm(n),e=Jm(n,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(F),Y(F,e)}function wt(){H(F),H(ct),H(st)}function an(e){e.memoizedState!==null&&Y(yt,e);var n=F.current,l=Jm(n,e.type);n!==l&&(Y(ct,e),Y(F,l))}function Es(e){ct.current===e&&(H(F),H(ct)),yt.current===e&&(H(yt),Hl._currentValue=Z)}var et,P;function pt(e){if(et===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);et=n&&n[1]||``,P=-1)`:-1f||x[c]!==U[f]){var V=` -`+x[c].replace(` at new `,` at `);return e.displayName&&V.includes(``)&&(V=V.replace(``,e.displayName)),V}while(1<=c&&0<=f);break}}}finally{gt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:``)?pt(l):``}function kt(e,n){switch(e.tag){case 26:case 27:case 5:return pt(e.type);case 16:return pt(`Lazy`);case 13:return e.child!==n&&n!==null?pt(`Suspense Fallback`):pt(`Suspense`);case 19:return pt(`SuspenseList`);case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return pt(`Activity`);default:return``}}function te(e){try{var n=``,l=null;do n+=kt(e,l),l=e,e=e.return;while(e);return n}catch(c){return` -Error generating stack: `+c.message+` -`+c.stack}}var Cn=Object.prototype.hasOwnProperty,Ue=s.unstable_scheduleCallback,xn=s.unstable_cancelCallback,Qn=s.unstable_shouldYield,Cs=s.unstable_requestPaint,Re=s.unstable_now,xa=s.unstable_getCurrentPriorityLevel,_n=s.unstable_ImmediatePriority,Li=s.unstable_UserBlockingPriority,xs=s.unstable_NormalPriority,_a=s.unstable_LowPriority,Op=s.unstable_IdlePriority,mb=s.log,Sb=s.unstable_setDisableYieldValue,Wr=null,Xe=null;function _s(e){if(typeof mb==`function`&&Sb(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Wr,e)}catch{}}var Ze=Math.clz32?Math.clz32:bb,vb=Math.log,wb=Math.LN2;function bb(e){return e>>>=0,e===0?32:31-(vb(e)/wb|0)|0}var Ta=256,Aa=262144,Oa=4194304;function ii(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,n,l){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ii(c):(S&=C,S!==0?f=ii(S):l||(l=C&~e,l!==0&&(f=ii(l))))):(C=c&~h,C!==0?f=ii(C):S!==0?f=ii(S):l||(l=c&~e,l!==0&&(f=ii(l)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,l=n&-n,h>=l||h===32&&(l&4194048)!==0)?n:f}function Pr(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Eb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rp(){var e=Oa;return Oa<<=1,(Oa&62914560)===0&&(Oa=4194304),e}function tu(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function tl(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cb(e,n,l,c,f,h){var S=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,U=e.hiddenUpdates;for(l=S&~l;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rb=/[\n"\\]/g;function cn(e){return e.replace(Rb,function(n){return`\\`+n.charCodeAt(0).toString(16)+` `})}function lu(e,n,l,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),n!=null?S===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+on(n)):e.value!==``+on(n)&&(e.value=``+on(n)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),n!=null?au(e,S,on(n)):l!=null?au(e,S,on(l)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+on(C):e.removeAttribute(`name`)}function Kp(e,n,l,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),n!=null||l!=null){if(!(h!==`submit`&&h!==`reset`||n!=null)){ru(e);return}l=l!=null?``+on(l):``,n=n!=null?``+on(n):l,C||n===e.value||(e.value=n),e.defaultValue=n}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),ru(e)}function au(e,n,l){n===`number`&&ka(e.ownerDocument)===e||e.defaultValue===``+l||(e.defaultValue=``+l)}function $i(e,n,l,c){if(e=e.options,n){n={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),hu=!1;if(Xn)try{var il={};Object.defineProperty(il,`passive`,{get:function(){hu=!0}}),window.addEventListener(`test`,il,il),window.removeEventListener(`test`,il,il)}catch{hu=!1}var As=null,du=null,za=null;function Jp(){if(za)return za;var e,n=du,l=n.length,c,f=`value`in As?As.value:As.textContent,h=f.length;for(e=0;e=al),eg=` `,ng=!1;function sg(e,n){switch(e){case`keyup`:return sE.indexOf(n.keyCode)!==-1;case`keydown`:return n.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ig(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Fi=!1;function rE(e,n){switch(e){case`compositionend`:return ig(n);case`keypress`:return n.which!==32?null:(ng=!0,eg);case`textInput`:return e=n.data,e===eg&&ng?null:e;default:return null}}function lE(e,n){if(Fi)return e===`compositionend`||!Su&&sg(e,n)?(e=Jp(),za=du=As=null,Fi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:l,offset:n-e};e=c}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=hg(l)}}function pg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?pg(e,n.parentNode):`contains`in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function gg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ka(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href==`string`}catch{l=!1}if(l)e=n.contentWindow;else break;n=ka(e.document)}return n}function bu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||n===`textarea`||e.contentEditable===`true`)}var pE=Xn&&`documentMode`in document&&11>=document.documentMode,Ji=null,Eu=null,fl=null,Cu=!1;function yg(e,n,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cu||Ji==null||Ji!==ka(c)||(c=Ji,`selectionStart`in c&&bu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fl&&ul(fl,c)||(fl=c,c=Oo(Eu,`onSelect`),0>=S,f-=S,jn=1<<32-Ze(n)+f|l<vt?(_t=ot,ot=null):_t=ot.sibling;var zt=j(R,ot,k[vt],$);if(zt===null){ot===null&&(ot=_t);break}e&&ot&&zt.alternate===null&&n(R,ot),O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt,ot=_t}if(vt===k.length)return l(R,ot),Ot&&Wn(R,vt),ut;if(ot===null){for(;vtvt?(_t=ot,ot=null):_t=ot.sibling;var Js=j(R,ot,zt.value,$);if(Js===null){ot===null&&(ot=_t);break}e&&ot&&Js.alternate===null&&n(R,ot),O=h(Js,O,vt),Ut===null?ut=Js:Ut.sibling=Js,Ut=Js,ot=_t}if(zt.done)return l(R,ot),Ot&&Wn(R,vt),ut;if(ot===null){for(;!zt.done;vt++,zt=k.next())zt=G(R,zt.value,$),zt!==null&&(O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt);return Ot&&Wn(R,vt),ut}for(ot=c(ot);!zt.done;vt++,zt=k.next())zt=B(ot,R,vt,zt.value,$),zt!==null&&(e&&zt.alternate!==null&&ot.delete(zt.key===null?vt:zt.key),O=h(zt,O,vt),Ut===null?ut=zt:Ut.sibling=zt,Ut=zt);return e&&ot.forEach(function(z1){return n(R,z1)}),Ot&&Wn(R,vt),ut}function qt(R,O,k,$){if(typeof k==`object`&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k==`object`&&k!==null){switch(k.$$typeof){case b:t:{for(var ut=k.key;O!==null;){if(O.key===ut){if(ut=k.type,ut===E){if(O.tag===7){l(R,O.sibling),$=f(O,k.props.children),$.return=R,R=$;break t}}else if(O.elementType===ut||typeof ut==`object`&&ut!==null&&ut.$$typeof===X&&gi(ut)===O.type){l(R,O.sibling),$=f(O,k.props),ml($,k),$.return=R,R=$;break t}l(R,O);break}else n(R,O);O=O.sibling}k.type===E?($=ui(k.props.children,R.mode,$,k.key),$.return=R,R=$):($=$a(k.type,k.key,k.props,null,R.mode,$),ml($,k),$.return=R,R=$)}return S(R);case w:t:{for(ut=k.key;O!==null;){if(O.key===ut)if(O.tag===4&&O.stateNode.containerInfo===k.containerInfo&&O.stateNode.implementation===k.implementation){l(R,O.sibling),$=f(O,k.children||[]),$.return=R,R=$;break t}else{l(R,O);break}else n(R,O);O=O.sibling}$=Du(k,R.mode,$),$.return=R,R=$}return S(R);case X:return k=gi(k),qt(R,O,k,$)}if(ht(k))return it(R,O,k,$);if(lt(k)){if(ut=lt(k),typeof ut!=`function`)throw Error(r(150));return k=ut.call(k),dt(R,O,k,$)}if(typeof k.then==`function`)return qt(R,O,Za(k),$);if(k.$$typeof===A)return qt(R,O,Qa(R,k),$);Wa(R,k)}return typeof k==`string`&&k!==``||typeof k==`number`||typeof k==`bigint`?(k=``+k,O!==null&&O.tag===6?(l(R,O.sibling),$=f(O,k),$.return=R,R=$):(l(R,O),$=Ru(k,R.mode,$),$.return=R,R=$),S(R)):l(R,O)}return function(R,O,k,$){try{yl=0;var ut=qt(R,O,k,$);return lr=null,ut}catch(ot){if(ot===rr||ot===Ja)throw ot;var Ut=Pe(29,ot,null,R.mode);return Ut.lanes=$,Ut.return=R,Ut}}}var mi=Ig(!0),Hg=Ig(!1),ks=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zs(e,n,l){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,n=Va(e),Cg(e,null,l),n}return Ka(e,c,n,l),Va(e)}function Sl(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var c=n.lanes;c&=e.pendingLanes,l|=c,n.lanes=l,Mp(e,l)}}function $u(e,n){var l=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var f=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,l=l.next}while(l!==null);h===null?f=h=n:h=h.next=n}else f=h=n;l={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Gu=!1;function vl(){if(Gu){var e=ir;if(e!==null)throw e}}function wl(e,n,l,c){Gu=!1;var f=e.updateQueue;ks=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,U=x.next;x.next=null,S===null?h=U:S.next=U,S=x;var V=e.alternate;V!==null&&(V=V.updateQueue,C=V.lastBaseUpdate,C!==S&&(C===null?V.firstBaseUpdate=U:C.next=U,V.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,V=U=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(xt&j)===j:(c&j)===j){j!==0&&j===sr&&(Gu=!0),V!==null&&(V=V.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var it=e,dt=C;j=n;var qt=l;switch(dt.tag){case 1:if(it=dt.payload,typeof it==`function`){G=it.call(qt,G,j);break t}G=it;break t;case 3:it.flags=it.flags&-65537|128;case 0:if(it=dt.payload,j=typeof it==`function`?it.call(qt,G,j):it,j==null)break t;G=y({},G,j);break t;case 2:ks=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},V===null?(U=V=B,x=G):V=V.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);V===null&&(x=G),f.baseState=x,f.firstBaseUpdate=U,f.lastBaseUpdate=V,h===null&&(f.shared.lanes=0),Is|=S,e.lanes=S,e.memoizedState=G}}function qg(e,n){if(typeof e!=`function`)throw Error(r(191,e));e.call(n)}function Kg(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eh?h:8;var S=M.T,C={};M.T=C,ff(e,!1,n,l);try{var x=f(),U=M.S;if(U!==null&&U(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var V=CE(x,c);Cl(e,n,V,rn(e))}else Cl(e,n,c,rn(e))}catch(G){Cl(e,n,{then:function(){},status:`rejected`,reason:G},rn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),M.T=S}}function RE(){}function cf(e,n,l,c){if(e.tag!==5)throw Error(r(476));var f=wy(e).queue;vy(e,f,n,Z,l===null?RE:function(){return by(e),l(c)})}function wy(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function by(e){var n=wy(e);n.next===null&&(n=e.alternate.memoizedState),Cl(e,n.next.queue,{},rn())}function uf(){return xe(Hl)}function Ey(){return ne().memoizedState}function Cy(){return ne().memoizedState}function DE(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=rn();e=Us(l);var c=zs(n,e,l);c!==null&&(Ye(c,n,l),Sl(c,n,l)),n={cache:Lu()},e.payload=n;return}n=n.return}}function ME(e,n,l){var c=rn();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},oo(e)?_y(n,l):(l=Au(e,n,l,c),l!==null&&(Ye(l,e,c),Ty(l,n,c)))}function xy(e,n,l){var c=rn();Cl(e,n,l,c)}function Cl(e,n,l,c){var f={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(oo(e))_y(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,C=h(S,l);if(f.hasEagerState=!0,f.eagerState=C,We(C,S))return Ka(e,n,f,0),Kt===null&&qa(),!1}catch{}if(l=Au(e,n,f,c),l!==null)return Ye(l,e,c),Ty(l,n,c),!0}return!1}function ff(e,n,l,c){if(c={lane:2,revertLane:Vf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(n)throw Error(r(479))}else n=Au(e,l,c,2),n!==null&&Ye(n,e,2)}function oo(e){var n=e.alternate;return e===St||n!==null&&n===St}function _y(e,n){or=eo=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Ty(e,n,l){if((l&4194048)!==0){var c=n.lanes;c&=e.pendingLanes,l|=c,n.lanes=l,Mp(e,l)}}var xl={readContext:xe,use:io,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};xl.useEffectEvent=Xt;var Ay={readContext:xe,use:io,useCallback:function(e,n){return ze().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:uy,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,lo(4194308,4,py.bind(null,n,e),l)},useLayoutEffect:function(e,n){return lo(4194308,4,e,n)},useInsertionEffect:function(e,n){lo(4,2,e,n)},useMemo:function(e,n){var l=ze();n=n===void 0?null:n;var c=e();if(Si){_s(!0);try{e()}finally{_s(!1)}}return l.memoizedState=[c,n],c},useReducer:function(e,n,l){var c=ze();if(l!==void 0){var f=l(n);if(Si){_s(!0);try{l(n)}finally{_s(!1)}}}else f=n;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=ME.bind(null,St,e),[c.memoizedState,e]},useRef:function(e){var n=ze();return e={current:e},n.memoizedState=e},useState:function(e){e=sf(e);var n=e.queue,l=xy.bind(null,St,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:af,useDeferredValue:function(e,n){var l=ze();return of(l,e,n)},useTransition:function(){var e=sf(!1);return e=vy.bind(null,St,e.queue,!0,!1),ze().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var c=St,f=ze();if(Ot){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Kt===null)throw Error(r(349));(xt&127)!==0||Fg(c,n,l)}f.memoizedState=l;var h={value:l,getSnapshot:n};return f.queue=h,uy(Xg.bind(null,c,h,e),[e]),c.flags|=2048,ur(9,{destroy:void 0},Jg.bind(null,c,h,l,n),null),l},useId:function(){var e=ze(),n=Kt.identifierPrefix;if(Ot){var l=Nn,c=jn;l=(c&~(1<<32-Ze(c)-1)).toString(32)+l,n=`_`+n+`R_`+l,l=no++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=n,h[He]=c;t:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break t;for(;S.sibling===null;){if(S.return===null||S.return===n)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(n)}}return Yt(n),_f(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==c&&is(n);else{if(typeof c!=`string`&&n.stateNode===null)throw Error(r(166));if(e=st.current,er(n)){if(e=n.stateNode,l=n.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=n,e=!!(e.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Ym(e.nodeValue,l)),e||Ds(n,!0)}else e=Ro(e).createTextNode(c),e[Ee]=n,n.stateNode=e}return Yt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(c=er(n),l!==null){if(e===null){if(!c)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),e=!1}else l=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(en(n),n):(en(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Yt(n),null;case 13:if(c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=er(n),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=n}else fi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Yt(n),f=!1}else f=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(en(n),n):(en(n),null)}return en(n),(n.flags&128)!==0?(n.lanes=l,n):(l=c!==null,e=e!==null&&e.memoizedState!==null,l&&(c=n.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),po(n,n.updateQueue),Yt(n),null);case 4:return wt(),e===null&&Qf(n.stateNode.containerInfo),Yt(n),null;case 10:return ts(n.type),Yt(n),null;case 19:if(H(ee),c=n.memoizedState,c===null)return Yt(n),null;if(f=(n.flags&128)!==0,h=c.rendering,h===null)if(f)Tl(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=to(e),h!==null){for(n.flags|=128,Tl(c,!1),e=h.updateQueue,n.updateQueue=e,po(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)xg(l,e),l=l.sibling;return Y(ee,ee.current&1|2),Ot&&Wn(n,c.treeForkCount),n.child}e=e.sibling}c.tail!==null&&Re()>vo&&(n.flags|=128,f=!0,Tl(c,!1),n.lanes=4194304)}else{if(!f)if(e=to(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,po(n,e),Tl(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(n),null}else 2*Re()-c.renderingStartTime>vo&&l!==536870912&&(n.flags|=128,f=!0,Tl(c,!1),n.lanes=4194304);c.isBackwards?(h.sibling=n.child,n.child=h):(e=c.last,e!==null?e.sibling=h:n.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Re(),e.sibling=null,l=ee.current,Y(ee,f?l&1|2:l&1),Ot&&Wn(n,c.treeForkCount),e):(Yt(n),null);case 22:case 23:return en(n),Qu(),c=n.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(l&536870912)!==0&&(n.flags&128)===0&&(Yt(n),n.subtreeFlags&6&&(n.flags|=8192)):Yt(n),l=n.updateQueue,l!==null&&po(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==l&&(n.flags|=2048),e!==null&&H(pi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ts(re),Yt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function NE(e,n){switch(ku(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ts(re),wt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Es(n),null;case 31:if(n.memoizedState!==null){if(en(n),n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(en(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));fi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ee),null;case 4:return wt(),null;case 10:return ts(n.type),null;case 22:case 23:return en(n),Qu(),e!==null&&H(pi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ts(re),null;case 25:return null;default:return null}}function Zy(e,n){switch(ku(n),n.tag){case 3:ts(re),wt();break;case 26:case 27:case 5:Es(n);break;case 4:wt();break;case 31:n.memoizedState!==null&&en(n);break;case 13:en(n);break;case 19:H(ee);break;case 10:ts(n.type);break;case 22:case 23:en(n),Qu(),e!==null&&H(pi);break;case 24:ts(re)}}function Al(e,n){try{var l=n.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){c=void 0;var h=l.create,S=l.inst;c=h(),S.destroy=c}l=l.next}while(l!==f)}}catch(C){Lt(n,n.return,C)}}function Bs(e,n,l){try{var c=n.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=n;var x=l,U=C;try{U()}catch(V){Lt(f,x,V)}}}c=c.next}while(c!==h)}}catch(V){Lt(n,n.return,V)}}function Wy(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Kg(n,l)}catch(c){Lt(e,e.return,c)}}}function Py(e,n,l){l.props=vi(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(c){Lt(e,n,c)}}function Ol(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof l==`function`?e.refCleanup=l(c):l.current=c}}catch(f){Lt(e,n,f)}}function Bn(e,n){var l=e.ref,c=e.refCleanup;if(l!==null)if(typeof c==`function`)try{c()}catch(f){Lt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l==`function`)try{l(null)}catch(f){Lt(e,n,f)}else l.current=null}function tm(e){var n=e.type,l=e.memoizedProps,c=e.stateNode;try{t:switch(n){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&c.focus();break t;case`img`:l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(f){Lt(e,e.return,f)}}function Tf(e,n,l){try{var c=e.stateNode;i1(c,e.type,l,n),c[He]=n}catch(f){Lt(e,e.return,f)}}function em(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$s(e.type)||e.tag===4}function Af(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||em(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$s(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Of(e,n,l){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName===`HTML`?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName===`HTML`?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Jn));else if(c!==4&&(c===27&&$s(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Of(e,n,l),e=e.sibling;e!==null;)Of(e,n,l),e=e.sibling}function go(e,n,l){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(c!==4&&(c===27&&$s(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(go(e,n,l),e=e.sibling;e!==null;)go(e,n,l),e=e.sibling}function nm(e){var n=e.stateNode,l=e.memoizedProps;try{for(var c=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Te(n,c,l),n[Ee]=e,n[He]=l}catch(h){Lt(e,e.return,h)}}var rs=!1,oe=!1,Rf=!1,sm=typeof WeakSet==`function`?WeakSet:Set,ye=null;function BE(e,n){if(e=e.containerInfo,Xf=No,e=gg(e),bu(e)){if(`selectionStart`in e)var l={start:e.selectionStart,end:e.selectionEnd};else t:{l=(l=e.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break t}var S=0,C=-1,x=-1,U=0,V=0,G=e,j=null;e:for(;;){for(var B;G!==l||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(B=G.firstChild)!==null;)j=G,G=B;for(;;){if(G===e)break e;if(j===l&&++U===f&&(C=S),j===h&&++V===c&&(x=S),(B=G.nextSibling)!==null)break;G=j,j=G.parentNode}G=B}l=C===-1||x===-1?null:{start:C,end:x}}else l=null}l=l||{start:0,end:0}}else l=null;for(Zf={focusedElem:e,selectionRange:l},No=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){switch(n=ye,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title`))),Te(h,c,l),h[Ee]=e,ge(h),c=h;break t;case`link`:var S=c0(`link`,`href`,f).get(c+(l.href||``));if(S){for(var C=0;Cqt&&(S=qt,qt=dt,dt=S);var R=dg(C,dt),O=dg(C,qt);if(R&&O&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var k=G.createRange();k.setStart(R.node,R.offset),B.removeAllRanges(),dt>qt?(B.addRange(k),B.extend(O.node,O.offset)):(k.setEnd(O.node,O.offset),B.addRange(k))}}}}for(G=[],B=C;B=B.parentNode;)B.nodeType===1&&G.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;Cl?32:l,M.T=null,l=Nf,Nf=null;var h=qs,S=us;if(fe=0,gr=qs=null,us=0,(jt&6)!==0)throw Error(r(331));var C=jt;if(jt|=4,pm(h.current),fm(h,h.current,S,l),jt=C,zl(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Wr,h)}catch{}return!0}finally{q.p=f,M.T=c,km(e,n)}}function zm(e,n,l){n=fn(l,n),n=gf(e.stateNode,n,2),e=zs(e,n,2),e!==null&&(tl(e,2),Ln(e))}function Lt(e,n,l){if(e.tag===3)zm(e,e,l);else for(;n!==null;){if(n.tag===3){zm(n,e,l);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Hs===null||!Hs.has(c))){e=fn(l,e),l=jy(2),c=zs(n,l,2),c!==null&&(Ny(l,c,n,e),tl(c,2),Ln(c));break}}n=n.return}}function Hf(e,n,l){var c=e.pingCache;if(c===null){c=e.pingCache=new HE;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(l)||(kf=!0,f.add(l),e=GE.bind(null,e,n,l),n.then(e,e))}function GE(e,n,l){var c=e.pingCache;c!==null&&c.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Kt===e&&(xt&l)===l&&(Zt===4||Zt===3&&(xt&62914560)===xt&&300>Re()-So?(jt&2)===0&&yr(e,0):Uf|=l,pr===xt&&(pr=0)),Ln(e)}function jm(e,n){n===0&&(n=Rp()),e=ci(e,n),e!==null&&(tl(e,n),Ln(e))}function YE(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),jm(e,l)}function QE(e,n){var l=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),jm(e,l)}function FE(e,n){return Ue(e,n)}var _o=null,Sr=null,qf=!1,To=!1,Kf=!1,Vs=0;function Ln(e){e!==Sr&&e.next===null&&(Sr===null?_o=Sr=e:Sr=Sr.next=e),To=!0,qf||(qf=!0,XE())}function zl(e,n){if(!Kf&&To){Kf=!0;do for(var l=!1,c=_o;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,Im(c,h))}else h=xt,h=Ra(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Pr(c,h)||(l=!0,Im(c,h));c=c.next}while(l);Kf=!1}}function JE(){Nm()}function Nm(){To=qf=!1;var e=0;Vs!==0&&l1()&&(e=Vs);for(var n=Re(),l=null,c=_o;c!==null;){var f=c.next,h=Bm(c,n);h===0?(c.next=null,l===null?_o=f:l.next=f,f===null&&(Sr=l)):(l=c,(e!==0||(h&3)!==0)&&(To=!0)),c=f}fe!==0&&fe!==5||zl(e),Vs!==0&&(Vs=0)}function Bm(e,n){for(var l=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var V=x.transferSize,G=x.initiatorType;V&&Qm(G)&&(x=x.responseEnd,S+=V*(x`u`?null:document;function r0(e,n,l){var c=vr;if(c&&typeof n==`string`&&n){var f=cn(n);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof l==`string`&&(f+=`[crossorigin="`+l+`"]`),i0.has(f)||(i0.add(f),e={rel:e,crossOrigin:l,href:n},c.querySelector(f)===null&&(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function g1(e){fs.D(e),r0(`dns-prefetch`,e,null)}function y1(e,n){fs.C(e,n),r0(`preconnect`,e,n)}function m1(e,n,l){fs.L(e,n,l);var c=vr;if(c&&e&&n){var f=`link[rel="preload"][as="`+cn(n)+`"]`;n===`image`&&l&&l.imageSrcSet?(f+=`[imagesrcset="`+cn(l.imageSrcSet)+`"]`,typeof l.imageSizes==`string`&&(f+=`[imagesizes="`+cn(l.imageSizes)+`"]`)):f+=`[href="`+cn(e)+`"]`;var h=f;switch(n){case`style`:h=wr(e);break;case`script`:h=br(e)}mn.has(h)||(e=y({rel:`preload`,href:n===`image`&&l&&l.imageSrcSet?void 0:e,as:n},l),mn.set(h,e),c.querySelector(f)!==null||n===`style`&&c.querySelector(Ll(h))||n===`script`&&c.querySelector(Il(h))||(n=c.createElement(`link`),Te(n,`link`,e),ge(n),c.head.appendChild(n)))}}function S1(e,n){fs.m(e,n);var l=vr;if(l&&e){var c=n&&typeof n.as==`string`?n.as:`script`,f=`link[rel="modulepreload"][as="`+cn(c)+`"][href="`+cn(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=br(e)}if(!mn.has(h)&&(e=y({rel:`modulepreload`,href:e},n),mn.set(h,e),l.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(l.querySelector(Il(h)))return}c=l.createElement(`link`),Te(c,`link`,e),ge(c),l.head.appendChild(c)}}}function v1(e,n,l){fs.S(e,n,l);var c=vr;if(c&&e){var f=Ki(c).hoistableStyles,h=wr(e);n=n||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ll(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":n},l),(l=mn.get(h))&&ih(e,l);var x=S=c.createElement(`link`);ge(x),Te(x,`link`,e),x._p=new Promise(function(U,V){x.onload=U,x.onerror=V}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Mo(S,n,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function w1(e,n){fs.X(e,n);var l=vr;if(l&&e){var c=Ki(l).hoistableScripts,f=br(e),h=c.get(f);h||(h=l.querySelector(Il(f)),h||(e=y({src:e,async:!0},n),(n=mn.get(f))&&rh(e,n),h=l.createElement(`script`),ge(h),Te(h,`link`,e),l.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function b1(e,n){fs.M(e,n);var l=vr;if(l&&e){var c=Ki(l).hoistableScripts,f=br(e),h=c.get(f);h||(h=l.querySelector(Il(f)),h||(e=y({src:e,async:!0,type:`module`},n),(n=mn.get(f))&&rh(e,n),h=l.createElement(`script`),ge(h),Te(h,`link`,e),l.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function l0(e,n,l,c){var f=(f=st.current)?Do(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof l.precedence==`string`&&typeof l.href==`string`?(n=wr(l.href),l=Ki(f).hoistableStyles,c=l.get(n),c||(c={type:`style`,instance:null,count:0,state:null},l.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(l.rel===`stylesheet`&&typeof l.href==`string`&&typeof l.precedence==`string`){e=wr(l.href);var h=Ki(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ll(e)))&&!h._p&&(S.instance=h,S.state.loading=5),mn.has(e)||(l={rel:`preload`,as:`style`,href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},mn.set(e,l),h||E1(f,e,l,S.state))),n&&c===null)throw Error(r(528,``));return S}if(n&&c!==null)throw Error(r(529,``));return null;case`script`:return n=l.async,l=l.src,typeof l==`string`&&n&&typeof n!=`function`&&typeof n!=`symbol`?(n=br(l),l=Ki(f).hoistableScripts,c=l.get(n),c||(c={type:`script`,instance:null,count:0,state:null},l.set(n,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wr(e){return`href="`+cn(e)+`"`}function Ll(e){return`link[rel="stylesheet"][`+e+`]`}function a0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function E1(e,n,l,c){e.querySelector(`link[rel="preload"][as="style"][`+n+`]`)?c.loading=1:(n=e.createElement(`link`),c.preload=n,n.addEventListener(`load`,function(){return c.loading|=1}),n.addEventListener(`error`,function(){return c.loading|=2}),Te(n,`link`,l),ge(n),e.head.appendChild(n))}function br(e){return`[src="`+cn(e)+`"]`}function Il(e){return`script[async]`+e}function o0(e,n,l){if(n.count++,n.instance===null)switch(n.type){case`style`:var c=e.querySelector(`style[data-href~="`+cn(l.href)+`"]`);if(c)return n.instance=c,ge(c),c;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),ge(c),Te(c,`style`,f),Mo(c,l.precedence,e),n.instance=c;case`stylesheet`:f=wr(l.href);var h=e.querySelector(Ll(f));if(h)return n.state.loading|=4,n.instance=h,ge(h),h;c=a0(l),(f=mn.get(f))&&ih(c,f),h=(e.ownerDocument||e).createElement(`link`),ge(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),n.state.loading|=4,Mo(h,l.precedence,e),n.instance=h;case`script`:return h=br(l.src),(f=e.querySelector(Il(h)))?(n.instance=f,ge(f),f):(c=l,(f=mn.get(h))&&(c=y({},l),rh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),ge(f),Te(f,`link`,c),e.head.appendChild(f),n.instance=f);case`void`:return null;default:throw Error(r(443,n.type))}else n.type===`stylesheet`&&(n.state.loading&4)===0&&(c=n.instance,n.state.loading|=4,Mo(c,l.precedence,e));return n.instance}function Mo(e,n,l){for(var c=l.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function C1(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof n.precedence!=`string`||typeof n.href!=`string`||n.href===``)break;return!0;case`link`:if(typeof n.rel!=`string`||typeof n.href!=`string`||n.href===``||n.onLoad||n.onError)break;return n.rel===`stylesheet`?(e=n.disabled,typeof n.precedence==`string`&&e==null):!0;case`script`:if(n.async&&typeof n.async!=`function`&&typeof n.async!=`symbol`&&!n.onLoad&&!n.onError&&n.src&&typeof n.src==`string`)return!0}return!1}function f0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function x1(e,n,l,c){if(l.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=wr(c.href),h=n.querySelector(Ll(f));if(h){n=h._p,n!==null&&typeof n==`object`&&typeof n.then==`function`&&(e.count++,e=Uo.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=h,ge(h);return}h=n.ownerDocument||n,c=a0(c),(f=mn.get(f))&&ih(c,f),h=h.createElement(`link`),ge(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),l.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Uo.bind(e),n.addEventListener(`load`,l),n.addEventListener(`error`,l))}}var lh=0;function _1(e,n){return e.stylesheets&&e.count===0&&jo(e,e.stylesheets),0lh?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function jo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,n.forEach(T1,e),zo=null,Uo.call(e))}function T1(e,n){if(!(n.state.loading&4)){var l=zo.get(e);if(l)var c=l.get(null);else{l=new Map,zo.set(e,l);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(t){console.error(t)}}return s(),ph.exports=V1(),ph.exports}var G1=$1(),W=Nd();const Y1={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk2NDc3NH0.ttTdONjhP14VQVVmD0SKK5oqmM0RP3GnnbEh5QFsZyY`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTY0NzkxfQ.CcNaI0-j2F0LJXeoBUsU2Fxkt0llv64XV9uSUBBCje0`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},fv=W.createContext(null);function Bd(){const s=W.useContext(fv);if(!s)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return s}function Vo(s){const t=Y1[s];if(!t)throw new Error(`Missing environment variable: ${s}`);return t}function Q1({children:s}){const t=Vo(`VITE_YJS_URL`),i=Vo(`VITE_DS_URL`),r=W.useMemo(()=>({Authorization:`Bearer ${Vo(`VITE_YJS_TOKEN`)}`}),[]),a=W.useMemo(()=>({Authorization:`Bearer ${Vo(`VITE_DS_TOKEN`)}`}),[]),o=W.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:a}),[t,i,r,a]);return Q.jsx(fv.Provider,{value:o,children:s})}var $o={exports:{}},vh,j0;function F1(){if(j0)return vh;j0=1;function s(t){var i=new t,r=i;function a(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:a,release:o}}return vh=s,vh}var N0;function J1(){if(N0)return $o.exports;N0=1;var s=F1();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=s(r),g=null,m=null,y=0,v=null,b={push:z,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(J){if(!(J>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=J,!b.paused)for(;g&&y=d||b.paused?m?(m.next=at,m=at):(g=at,m=at,b.saturated()):(y++,u.call(o,at.value,at.worked))}function L(J,lt){var at=p.get();at.context=o,at.release=I,at.value=J,at.callback=lt||i,at.errorHandler=v,y>=d||b.paused?g?(at.next=g,g=at):(g=at,m=at,b.saturated()):(y++,u.call(o,at.value,at.worked))}function I(J){J&&p.release(J);var lt=g;lt&&y<=d?b.paused?y--:(m===g&&(m=null),g=lt.next,lt.next=null,u.call(o,lt.value,lt.worked),m===null&&b.empty()):--y===0&&b.drain()}function K(){g=null,m=null,b.drain=i}function X(){g=null,m=null,b.drain(),b.drain=i}function tt(){var J=g;for(g=null,m=null;J;){var lt=J.next,at=J.callback,Nt=J.errorHandler,ht=J.value,M=J.context;J.value=null,J.callback=i,J.errorHandler=null,Nt&&Nt(new Error(`abort`),ht),at.call(M,new Error(`abort`)),J.release(J),J=lt}b.drain=i}function nt(J){v=J}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function a(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,D){m(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,D){y(E,function(A,z){if(A){D(A);return}N(z)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return $o.exports=t,$o.exports.promise=a,$o.exports}var X1=J1();const hv=j1(X1),Dn=`Stream-Next-Offset`,jc=`Stream-Cursor`,Nc=`Stream-Up-To-Date`,qn=`Stream-Closed`,wh=`Stream-Seq`,Z1=`Stream-TTL`,W1=`Stream-Expires-At`,B0=`Producer-Id`,Go=`Producer-Epoch`,L0=`Producer-Seq`,P1=`Producer-Expected-Seq`,tC=`Producer-Received-Seq`,bh=`offset`,Yo=`live`,eC=`stream-sse-data-encoding`;var ti=class dv extends Error{status;text;json;headers;constructor(t,i,r,a,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=a}static async fromResponse(t,i){const r=t.status,a=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new dv(r,o,u,a,i)}},Ld=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class sd extends Error{status;code;details;constructor(t,i,r,a){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=a}static async fromResponse(t,i){const r=t.status;let a;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{a=await t.json()}catch{a=await t.text()}else a=await t.text();const u=I0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new sd(d,u,r,a)}static fromFetchError(t){const i=I0(t.status);return new sd(t.message,i,t.status,t.json??t.text)}};function I0(s){switch(s){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var nC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},pv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(s,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,s),this.name=`StreamClosedError`,this.finalOffset=t}},sC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const iC=[429,503],Id={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function rC(s){if(!s)return 0;const t=Number(s);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(s);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function gv(s,t=Id){const{initialDelay:i,maxDelay:r,multiplier:a,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await s(...p);if(b.ok)return b;throw await ti.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Ld;if(b instanceof ti&&!iC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof ti?rC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,N)),y=Math.min(y*a,r)}}}}const lC=[201,204,205];function aC(s){return async(...t)=>{const i=t[0],r=await s(...t);try{if(r.status<200||lC.includes(r.status))return r;const a=await r.arrayBuffer();return new Response(a,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(a){throw t[1]?.signal?.aborted?new Ld:new ti(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),a instanceof Error?a.message:typeof a==`string`?a:`failed to read body`)}}}function oC(s){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof s[Symbol.asyncIterator]==`function`}function cC(s){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof s[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,a=0;return{async next(){if(r)return{done:!0,value:void 0};a++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{a--}},async return(u){if(a>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(a>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(s,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(s,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Eh(s){return oC(s)||cC(s),s}async function*H0(s,t){const i=s.getReader(),r=new TextDecoder;let a=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;a+=r.decode(p,{stream:!0}),a=a.replace(/\r\n/g,` -`).replace(/\r/g,` -`);const g=a.split(` -`);a=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(a+=u),a&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Hd=class{shouldContinueLive(s,t){return!(s&&this.upToDate||t===!1||this.streamClosed)}},yv=class id extends Hd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new id({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new id({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new qd(this)}},Ch=class Tr extends Hd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new Tr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Tr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const a=t-this.connectionStartTime;if(a=r.maxShortConnections?{action:`fallback`,state:new yv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return a>=r.minConnectionDuration?{action:`healthy`,state:new Tr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new qd(this)}},qd=class rd extends Hd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new rd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new rd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const q0=`PAUSE_STREAM`;var uC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#r;#i;#y;#a;#h;#f;#o;#C;#d;#p=!1;#x=null;#c=`active`;#u;#w;#g;#m;#S;#b;#O;constructor(s){this.url=s.url,this.contentType=s.contentType,this.live=s.live,this.startOffset=s.startOffset;const t={offset:s.initialOffset,cursor:s.initialCursor,upToDate:s.initialUpToDate,streamClosed:s.initialStreamClosed};this.#i=s.startSSE?new Ch(t):new yv(t),this.#t=s.firstResponse.headers,this.#e=s.firstResponse.status,this.#n=s.firstResponse.statusText,this.#s=s.firstResponse.ok,this.#r=!1,this.#y=s.isJsonMode,this.#a=s.abortController,this.#h=s.fetchNext,this.#f=s.startSSE,this.#S={minConnectionDuration:s.sseResilience?.minConnectionDuration??1e3,maxShortConnections:s.sseResilience?.maxShortConnections??3,backoffBaseDelay:s.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:s.sseResilience?.backoffMaxDelay??5e3,logWarnings:s.sseResilience?.logWarnings??!0},this.#b=s.encoding,this.#d=new Promise((i,r)=>{this.#o=i,this.#C=r}),this.#O=this.#I(s.firstResponse),this.#a.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#a.signal.reason),this.#m?.(),this.#g=void 0,this.#m=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const s=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,s),this.#w=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,s)},document.hidden&&this.#D()}}#D(){this.#c===`active`&&(this.#c=`pause-requested`,this.#i=this.#i.pause(),this.#g=new Promise(s=>{this.#m=s}),this.#u?.abort(q0))}#T(){if(this.#c===`paused`||this.#c===`pause-requested`){if(this.#a.signal.aborted)return;this.#i instanceof qd&&(this.#i=this.#i.resume().state),this.#c=`active`,this.#m?.(),this.#g=void 0,this.#m=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#r}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#y)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#l(){this.#w?.(),this.#o()}#_(s){this.#w?.(),this.#C(s)}#v(s){if(this.#x!==null)throw new Pt(`Cannot call ${s}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=s}#M(){return this.#i.shouldContinueLive(this.#p,this.live)}#N(s){this.#i=this.#i.withResponseMetadata({offset:s.headers.get(Dn)||void 0,cursor:s.headers.get(jc)||void 0,upToDate:s.headers.has(Nc),streamClosed:s.headers.get(qn)?.toLowerCase()===`true`}),this.#t=s.headers,this.#e=s.status,this.#n=s.statusText,this.#s=s.ok}#U(s){this.#i=this.#i.withSSEControl(s)}#z(){this.#i instanceof Ch||(this.#i=new Ch({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#f)return null;const s=this.#i.handleConnectionEnd(Date.now(),this.#a.signal.aborted,this.#S);if(this.#i=s.state,s.action===`fallback`)return this.#S.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(s.action===`reconnect`){const i=Math.min(this.#S.backoffMaxDelay,this.#S.backoffBaseDelay*Math.pow(2,s.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(a=>setTimeout(a,r))}this.#z(),this.#u=new AbortController;const t=await this.#f(this.offset,this.cursor,this.#u.signal);return t.body?H0(t.body,this.#u.signal):null}async#B(s){const{done:t,value:i}=await s.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,s):(this.#U(i),i.upToDate?{type:`response`,response:hC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#b)}:{type:`continue`})}async#L(s,t){const i=[s];for(;;){const{done:r,value:a}=await t.next();if(r){const o=ld(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#b,this.#y);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(a.type===`control`)return this.#U(a),{type:`response`,response:ld(i,a.streamNextOffset,a.streamCursor,a.upToDate??!1,a.streamClosed??!1,this.contentType,this.#b,this.#y)};i.push(a.data)}}#I(s){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(s.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&s.body)this.#z(),this.#u=new AbortController,i=H0(s.body,this.#u.signal);else{if(r.enqueue(s),this.upToDate&&!this.#M()){this.#l(),r.close();return}return}if(i){if(this.#c===`pause-requested`||this.#c===`paused`){if(this.#c=`paused`,this.#g&&await this.#g,this.#a.signal.aborted){this.#l(),r.close();return}const a=await this.#k();if(a)i=a;else{this.#l(),r.close();return}}for(;;){const a=await this.#B(i);switch(a.type){case`response`:a.newIterator&&(i=a.newIterator),r.enqueue(a.response);return;case`closed`:this.#l(),r.close();return;case`error`:this.#_(a.error),r.error(a.error);return;case`continue`:a.newIterator&&(i=a.newIterator);continue}}}if(this.#M()){let a=!1;if(this.#c===`pause-requested`||this.#c===`paused`){if(this.#c=`paused`,this.#g&&await this.#g,this.#a.signal.aborted){this.#l(),r.close();return}a=!0}if(this.#a.signal.aborted){this.#l(),r.close();return}this.#u=new AbortController;const o=await this.#h(this.offset,this.cursor,this.#u.signal,a);this.#N(o),r.enqueue(o);return}this.#l(),r.close()}catch(a){if(this.#u?.signal.aborted&&this.#u.signal.reason===q0){this.#c===`pause-requested`&&(this.#c=`paused`);return}this.#a.signal.aborted?(this.#l(),r.close()):(this.#_(a instanceof Error?a:new Error(String(a))),r.error(a))}},cancel:()=>{this.#a.abort(),this.#w?.(),this.#l()}})}#E(){return this.#O.getReader()}async body(){this.#v(`body`),this.#p=!0;const s=this.#E(),t=[];try{let r=await s.read();for(;!r.done;){const a=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),a)break;r=await s.read()}}finally{s.releaseLock()}if(this.#l(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#v(`json`),this.#A(),this.#p=!0;const s=this.#E(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#l(),t}async text(){this.#v(`text`),this.#p=!0;const s=this.#E(),t=[];try{let i=await s.read();for(;!i.done;){const r=this.upToDate,a=await i.value.text();if(a&&t.push(a),r)break;i=await s.read()}}finally{s.releaseLock()}return this.#l(),t.join(``)}#j(){const{readable:s,writable:t}=new TransformStream,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done;){const o=this.upToDate,u=a.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;a=await i.read()}await t.close(),this.#l()}catch(a){if(this.#a.signal.aborted){try{await t.close()}catch{}this.#l()}else{try{await t.abort(a)}catch{}this.#_(a instanceof Error?a:new Error(String(a)))}}finally{i.releaseLock()}})(),s}bodyStream(){return this.#v(`bodyStream`),Eh(this.#j())}jsonStream(){this.#v(`jsonStream`),this.#A();const s=this.#E();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let a=await s.read();for(;!a.done;){const d=(await a.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}a=await s.read()}this.#l(),r.close()},cancel:()=>{s.releaseLock(),this.cancel()}});return Eh(i)}textStream(){this.#v(`textStream`);const s=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(s.decode(i,{stream:!0}))},flush(i){const r=s.decode();r&&i.enqueue(r)}}));return Eh(t)}subscribeJson(s){this.#v(`subscribeJson`),this.#A();const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await s({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(s){this.#v(`subscribeBytes`);const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await s({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(s){this.#v(`subscribeText`);const t=new AbortController,i=this.#E();return(async()=>{try{let a=await i.read();for(;!a.done&&!t.signal.aborted;){const o=a.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=xh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await s({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),a=await i.read()}this.#l()}catch(a){const o=t.signal.aborted,u=a instanceof TypeError&&String(a).includes(`Body`);!o&&!u?this.#_(a instanceof Error?a:new Error(String(a))):this.#l()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(s){this.#a.abort(s),this.#w?.(),this.#l()}get closed(){return this.#d}};function xh(s,t,i,r){const a=s.headers.get(Dn),o=s.headers.get(jc),u=s.headers.has(Nc),d=s.headers.get(qn)?.toLowerCase()===`true`;return{offset:a??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function fC(s){const t=s.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let a=0;ay.length>0).map(y=>fC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of s){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=s.join(``);return new Response(g,{status:200,headers:p})}async function tc(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(s,t,i){const r=s.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(s.headers.get(qn)?.toLowerCase()===`true`){const d=s.headers.get(Dn)??void 0;throw new pv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(s,t)}async function ec(s){const t={};if(!s)return t;for(const[i,r]of Object.entries(s))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const K0=new Set;function dC(){if(!(typeof process>`u`))return`production`}function pC(){return typeof globalThis.window<`u`}function gC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function yC(s){try{return new URL(s)}catch{const t=gC();if(t)try{return new URL(s,t)}catch{return}return}}function mv(s,t){if(t===!1||dC()===`test`||!pC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=s instanceof URL?s.toString():s,a=yC(r);a&&a.protocol===`http:`&&(K0.has(a.origin)||(K0.add(a.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function mC(s){if(!s.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=s.headers,i=s.params;for(;;)try{return await SC({...s,headers:t,params:i})}catch(r){if(s.onError){const a=await s.onError(r instanceof Error?r:new Error(String(r)));if(a===void 0)throw r;a.params&&(i={...i,...a.params}),a.headers&&(t={...t,...a.headers});continue}throw r}}async function SC(s){const t=s.url instanceof URL?s.url.toString():s.url;mv(t,s.warnOnHttp);const i=new URL(t),r=s.offset??`-1`;i.searchParams.set(bh,r);const a=s.live??!0;(a===`long-poll`||a===`sse`)&&i.searchParams.set(Yo,a);const o=await ec(s.params);for(const[I,K]of Object.entries(o))i.searchParams.set(I,K);const u=await tc(s.headers),d=new AbortController;s.signal&&s.signal.addEventListener(`abort`,()=>d.abort(s.signal?.reason),{once:!0});const p=s.fetch??((...I)=>fetch(...I)),g=s.backoffOptions??Id,m=gv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Ld?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(Dn)??r,w=y.headers.get(jc)??void 0,E=y.headers.has(Nc),T=y.headers.get(qn)?.toLowerCase()===`true`,N=s.json===!0||(v?.includes(`application/json`)??!1),A=y.headers.get(eC)===`base64`?`base64`:void 0,z=async(I,K,X,tt)=>{const nt=new URL(t);nt.searchParams.set(bh,I),tt||(a===`sse`?nt.searchParams.set(Yo,`sse`):(a===!0||a===`long-poll`)&&nt.searchParams.set(Yo,`long-poll`)),K&&nt.searchParams.set(`cursor`,K);const J=await ec(s.params);for(const[Nt,ht]of Object.entries(J))nt.searchParams.set(Nt,ht);const lt=await tc(s.headers),at=await m(nt.toString(),{method:`GET`,headers:lt,signal:X});return at.ok||await ps(at,t),at},L=a===`sse`?async(I,K,X)=>{const tt=new URL(t);tt.searchParams.set(bh,I),tt.searchParams.set(Yo,`sse`),K&&tt.searchParams.set(`cursor`,K);const nt=await ec(s.params);for(const[at,Nt]of Object.entries(nt))tt.searchParams.set(at,Nt);const J=await tc(s.headers),lt=await m(tt.toString(),{method:`GET`,headers:J,signal:X});return lt.ok||await ps(lt,t),lt}:void 0;return new uC({url:t,contentType:v,live:a,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:z,startSSE:L,sseResilience:s.sseResilience,encoding:A})}var V0=class extends Error{currentEpoch;constructor(s){super(`Producer epoch is stale. Current server epoch: ${s}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=s}},vC=class extends Error{expectedSeq;receivedSeq;constructor(s,t){super(`Producer sequence gap: expected ${s}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=s,this.receivedSeq=t}};function $0(s){return s?s.split(`;`)[0].trim().toLowerCase():``}var Sv=class{#t;#e;#n;#s=0;#r;#i;#y;#a;#h;#f;#o=[];#C=0;#d=null;#p;#x;#c=!1;#u=null;#w;#g;#m=new Map;constructor(s,t,i){const r=i?.epoch??0,a=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(a<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=s,this.#e=t,this.#n=r,this.#r=i?.autoClaim??!1,this.#i=a,this.#y=u,this.#h=i?.signal,this.#f=i?.onError,this.#a=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#g=!this.#r,this.#p=hv.promise(this.#O.bind(this),this.#x),this.#h&&this.#h.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(s){if(this.#c)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof s==`string`)t=new TextEncoder().encode(s);else if(s instanceof Uint8Array)t=s;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#o.push({body:t}),this.#C+=t.length,this.#C>=this.#i?this.#b():this.#d||(this.#d=setTimeout(()=>{this.#d=null,this.#o.length>0&&this.#b()},this.#y))}async flush(){this.#d&&(clearTimeout(this.#d),this.#d=null),this.#o.length>0&&this.#b(),await this.#p.drained()}async detach(){if(!this.#c){this.#c=!0;try{await this.flush()}catch{}}}async close(s){if(this.#c){if(this.#u)return this.#u;await this.flush();const i=await this.#S(this.#w);return this.#u=i,i}this.#c=!0,this.#w=s,await this.flush();const t=await this.#S(s);return this.#u=t,t}async#S(s){const t=this.#t.contentType??`application/octet-stream`,i=$0(t)===`application/json`;let r;if(s!==void 0){const p=typeof s==`string`?new TextEncoder().encode(s):s;i?r=`[${new TextDecoder().decode(p)}]`:r=p}const a=this.#s,o={"content-type":t,[B0]:this.#e,[Go]:this.#n.toString(),[L0]:a.toString(),[qn]:`true`},u=await this.#a(this.#t.url,{method:`POST`,headers:o,body:r,signal:this.#h});if(u.status===204)return this.#s=a+1,{finalOffset:u.headers.get(Dn)??``};if(u.status===200)return this.#s=a+1,{finalOffset:u.headers.get(Dn)??``};if(u.status===403){const p=u.headers.get(Go),g=p?parseInt(p,10):this.#n;if(this.#r){const m=g+1;return this.#n=m,this.#s=0,this.#S(s)}throw new V0(g)}throw await ti.fromResponse(u,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#o.length}get inFlightCount(){return this.#p.length()}#b(){if(this.#o.length===0)return;const s=this.#o,t=this.#s;this.#o=[],this.#C=0,this.#s++,this.#r&&!this.#g&&this.#p.length()>0?this.#p.drained().then(()=>{this.#p.push({batch:s,seq:t}).catch(()=>{})}):this.#p.push({batch:s,seq:t}).catch(()=>{})}async#O(s){const{batch:t,seq:i}=s,r=this.#n;try{await this.#T(t,i,r),this.#g||(this.#g=!0),this.#R(r,i,void 0)}catch(a){throw this.#R(r,i,a),this.#f&&this.#f(a),a}}#R(s,t,i){let r=this.#m.get(s);r||(r=new Map,this.#m.set(s,r));const a=r.get(t);if(a){a.resolved=!0,a.error=i;for(const u of a.waiters)u(i);a.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):a()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(s,t,i){const r=this.#t.contentType??`application/octet-stream`,a=$0(r)===`application/json`;let o;if(a)o=`[${s.map(y=>new TextDecoder().decode(y.body)).join(`,`)}]`;else{const m=s.reduce((b,w)=>b+w.body.length,0),y=new Uint8Array(m);let v=0;for(const b of s)y.set(b.body,v),v+=b.body.length;o=y}const u=this.#t.url,d={"content-type":r,[B0]:this.#e,[Go]:i.toString(),[L0]:t.toString()},p=await this.#a(u,{method:`POST`,headers:d,body:o,signal:this.#h});if(p.status===204)return{offset:``,duplicate:!0};if(p.status===200)return{offset:p.headers.get(Dn)??``,duplicate:!1};if(p.status===403){const m=p.headers.get(Go),y=m?parseInt(m,10):i;if(this.#r){const v=y+1;return this.#n=v,this.#s=1,this.#T(s,0,v)}throw new V0(y)}if(p.status===409){const m=p.headers.get(P1),y=m?parseInt(m,10):0;if(y0&&this.#f(s),this.#o=[],this.#C=0,this.#d&&(clearTimeout(this.#d),this.#d=null)}};function _h(s){return s?s.split(`;`)[0].trim().toLowerCase():``}function wC(s){return s!=null&&typeof s.then==`function`}var Hn=class Ql{url;contentType;#t;#e;#n;#s;#r;#i=[];constructor(t){CC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#n=t.onError,t.contentType&&(this.contentType=t.contentType),this.#s=t.batching!==!1,this.#s&&(this.#r=hv.promise(this.#h.bind(this),1));const r=t.fetch??((...u)=>fetch(...u)),a={...t.backoffOptions??Id},o=gv(r,a);this.#e=aC(o)}static async create(t){const i=new Ql(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ql(t);return await i.head(),i}static async head(t){return new Ql(t).head()}static async delete(t){return new Ql(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=await this.#e(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});a.ok||await ps(a,this.url);const o=a.headers.get(`content-type`)??void 0,u=a.headers.get(Dn)??void 0,d=a.headers.get(`etag`)??void 0,p=a.headers.get(`cache-control`)??void 0,g=a.headers.get(qn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t?.contentType??this.#t.contentType;a&&(i[`content-type`]=a),t?.ttlSeconds!==void 0&&(i[Z1]=String(t.ttlSeconds)),t?.expiresAt&&(i[W1]=t.expiresAt),t?.closed&&(i[qn]=`true`);const o=bC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:a&&(this.contentType=a),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});a.ok||await ps(a,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t?.contentType??this.#t.contentType??this.contentType;a&&(i[`content-type`]=a),i[qn]=`true`;let o;t?.body!==void 0&&(_h(a)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(qn)?.toLowerCase()===`true`){const g=u.headers.get(Dn)??void 0;throw new pv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(Dn)??``}}async append(t,i){const r=wC(t)?await t:t;return this.#s&&this.#r?this.#a(r,i):this.#y(r,i)}async#y(t,i){const{requestHeaders:r,fetchUrl:a}=await this.#o(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[wh]=i.seq);const u=_h(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(a.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#a(t,i){return new Promise((r,a)=>{if(this.#i.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:a}),this.#r.idle()){const o=this.#i.splice(0);this.#r.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#h(t){try{await this.#f(t);for(const i of t)i.resolve();if(this.#i.length>0){const i=this.#i.splice(0);this.#r.push(i).catch(r=>{for(const a of i)a.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#i)r.reject(i);throw this.#i=[],i}}async#f(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#o(),a=t[0]?.contentType??this.#t.contentType??this.contentType;a&&(i[`content-type`]=a);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[wh]=o);const u=_h(a)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,D)=>N+D.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,A)=>D+A.length,0),T=new Uint8Array(E);let N=0;for(const D of w)T.set(D,N),N+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:a}=await this.#o(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[wh]=i.seq);const u=EC(t),d=await this.#e(a.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const a=new Sv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){a.append(o)},async close(){if(await a.close(),r)throw r},abort(o){a.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return mC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#n,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async#o(){const t=await tc(this.#t.headers),i=new URL(this.url),r=await ec(this.#t.params);for(const[a,o]of Object.entries(r))i.searchParams.set(a,o);return{requestHeaders:t,fetchUrl:i}}};function bC(s){if(s!==void 0)return typeof s==`string`?new TextEncoder().encode(s):s instanceof Uint8Array||s instanceof Blob||s instanceof FormData||s instanceof ReadableStream||s instanceof ArrayBuffer||ArrayBuffer.isView(s)?s:new TextEncoder().encode(JSON.stringify(s))}function EC(s){if(s instanceof ReadableStream)return s.pipeThrough(new TransformStream({transform(r,a){typeof r==`string`?a.enqueue(new TextEncoder().encode(r)):a.enqueue(r)}}));const t=new TextEncoder,i=s[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:a,value:o}=await i.next();a?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(a){r.error(a)}},cancel(){i.return?.()}})}function CC(s){if(!s.url)throw new nC;if(s.signal&&!(s.signal instanceof AbortSignal))throw new sC;mv(s.url,s.warnOnHttp)}const xC=`__includes_scalar__`;class Mi{}class Br extends Mi{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends Mi{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Me extends Mi{constructor(t){super(),this.path=t,this.type=`ref`}}class Be extends Mi{constructor(t){super(),this.value=t,this.type=`val`}}class Je extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class vv extends Mi{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class ki extends Mi{constructor(t,i,r,a,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=a,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Lr(s){return s instanceof vv||s instanceof Je||s instanceof Me||s instanceof Be||s instanceof ki}function Kd(s){return typeof s==`object`&&`expression`in s?s.expression:s}function G0(s){return typeof s==`object`&&`expression`in s?s.expression:s}function Y0(s){return typeof s==`object`&&`expression`in s&&s.residual===!0}function _C(s){return{expression:s,residual:!0}}function TC(s,t){if(s.from.alias===t)return s.from;for(const i of s.join||[])if(i.from.alias===t)return i.from}function sa(s,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(s.select){const a=s.select[r];if(a&&a.type===`ref`)return sa(s,a,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...a]=t.path,o=TC(s,r);return o?o.type===`queryRef`?sa(o.query,new Me(a),i):{collection:o.collection,path:a}:void 0}}}class En extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class Q0 extends En{constructor(t,i,r){const a=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join(``)}`;super(r||a),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ui extends En{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class AC extends Ui{constructor(){super(`Collection requires a config`)}}class OC extends Ui{constructor(){super(`Collection requires a sync config`)}}class RC extends Ui{constructor(){super(`Schema must implement the standard-schema interface`)}}class F0 extends Ui{constructor(){super(`Schema validation must be synchronous`)}}class ma extends En{constructor(t){super(t),this.name=`CollectionStateError`}}class DC extends ma{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class MC extends ma{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class kC extends ma{constructor(){super(`Collection is in error state`)}}class UC extends ma{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends En{constructor(t){super(t),this.name=`CollectionOperationError`}}class zC extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class jC extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class NC extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class BC extends Yn{constructor(t,i,r){const a=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${a}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${a}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(a)}}class LC extends Yn{constructor(){super(`The first argument to update is missing`)}}class IC extends Yn{constructor(){super(`No keys were passed to update`)}}class HC extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class qC extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class KC extends Yn{constructor(){super(`No keys were passed to delete`)}}class VC extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Vd extends En{constructor(t){super(t),this.name=`MissingHandlerError`}}class $C extends Vd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class GC extends Vd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class YC extends Vd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends En{constructor(t){super(t),this.name=`TransactionError`}}class QC extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class FC extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class JC extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class XC extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class ZC extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class Th extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class Ah extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class WC extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class PC extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class zi extends En{constructor(t){super(t),this.name=`QueryBuilderError`}}class tx extends zi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ex extends zi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class nx extends zi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Qo extends zi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class sx extends zi{constructor(){super(`Join condition must be an equality expression`)}}class ix extends zi{constructor(){super(`Query must have a from clause`)}}class J0 extends zi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: - - ❌ .where(({ user }) => user.id === 'abc') - ✅ .where(({ user }) => eq(user.id, 'abc')) - -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Le extends En{constructor(t){super(t),this.name=`QueryCompilationError`}}class rx extends Le{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class lx extends Le{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class ax extends Le{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class ox extends Le{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class cx extends Le{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class wv extends Le{constructor(t,i,r){const a=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${a} not found in inputs map${o}`)}}class ux extends Le{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class fx extends Le{constructor(t){super(`Unsupported FROM type: ${t}`)}}class hx extends Le{constructor(t){super(`Unknown expression type: ${t}`)}}class dx extends Le{constructor(){super(`Reference path cannot be empty`)}}class px extends Le{constructor(t){super(`Unknown function: ${t}`)}}class X0 extends Le{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class ji extends En{constructor(t){super(t),this.name=`JoinError`}}class gx extends ji{constructor(t){super(`Unsupported join type: ${t}`)}}class yx extends ji{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class mx extends ji{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Sx extends ji{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class vx extends ji{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class wx extends ji{constructor(){super(`Invalid join condition`)}}class bx extends ji{constructor(t){super(`Unsupported join source type: ${t}`)}}class Bc extends En{constructor(t){super(t),this.name=`GroupByError`}}class Ex extends Bc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Cx extends Bc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class xx extends Bc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class _x extends Bc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class Z0 extends En{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class Tx extends En{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ax extends Tx{constructor(){super(`Cannot combine empty expression list`)}}class Ox extends Le{constructor(t,i,r,a){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${a.join(`, `)}. This indicates a bug in alias tracking.`)}}class Rx extends Le{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Dx extends Le{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Kn(s,t){return nc(s,t,new Map)}function nc(s,t,i){if(s===t)return!0;if(s==null||t==null||typeof s!=typeof t)return!1;if(s instanceof Date)return t instanceof Date?s.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(s instanceof RegExp)return t instanceof RegExp?s.source===t.source&&s.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(s instanceof Map){if(!(t instanceof Map)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const a=Array.from(s.entries()).every(([o,u])=>t.has(o)&&nc(u,t.get(o),i));return i.delete(s),a}if(t instanceof Map)return!1;if(s instanceof Set){if(!(t instanceof Set)||s.size!==t.size)return!1;if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Array.from(s),a=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(s),r.every(u=>t.has(u));const o=r.length===a.length;return i.delete(s),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(s)&&ArrayBuffer.isView(t)&&!(s instanceof DataView)&&!(t instanceof DataView)){const r=s,a=t;if(r.length!==a.length)return!1;for(let o=0;onc(a,t[o],i));return i.delete(s),r}if(Array.isArray(t))return!1;if(typeof s==`object`){if(i.has(s))return i.get(s)===t;i.set(s,t);const r=Object.keys(s),a=Object.keys(t);if(r.length!==a.length)return i.delete(s),!1;const o=r.every(u=>u in t&&nc(s[u],t[u],i));return i.delete(s),o}return!1}const Mx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function ei(s){if(s==null||typeof s!=`object`)return!1;const t=s[Symbol.toStringTag];return typeof t==`string`&&Mx.has(t)}const bv={direction:`asc`,nulls:`first`,stringSort:`locale`},Oh=new WeakMap;let kx=1;function W0(s){if(Oh.has(s))return Oh.get(s);const t=kx++;return Oh.set(s,t),t}const $d=(s,t,i)=>{const{nulls:r}=i;if(s==null&&t==null)return 0;if(s==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof s==`string`&&typeof t==`string`&&i.stringSort===`locale`)return s.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(s)&&Array.isArray(t)){for(let u=0;ud?1:0}const a=typeof s==`object`,o=typeof t==`object`;if(a||o){if(a&&o){const u=W0(s),d=W0(t);return u-d}if(a)return 1;if(o)return-1}return st?1:0},Ux=(s,t,i)=>$d(t,s,{...i,nulls:i.nulls===`first`?`last`:`first`});function Pl(s){return(t,i)=>s.direction===`asc`?$d(t,i,s):Ux(t,i,s)}const zx=Pl({direction:`asc`,nulls:`first`,stringSort:`locale`});function jx(s,t){if(s.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Hx(s):Ix(s);case`func`:return qx(s,t);default:throw new hx(s.type)}}function Ix(s){const[t,...i]=s.path;if(!t)throw new dx;if(t===`$selected`){if(i.length===0)return a=>a.$selected;if(i.length===1){const a=i[0];return o=>o.$selected?.[a]}else return a=>{const o=a.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return a=>a[r];if(i.length===1){const a=i[0];return o=>o[r]?.[a]}else return a=>{const o=a[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Hx(s){const t=s.path;return i=>{let r=i;for(const a of t){if(r==null)return r;r=r[a]}return r}}function qx(s,t){const i=s.args.map(r=>Gd(r,t));switch(s.name){case`eq`:{const r=i[0],a=i[1];return o=>{const u=Or(r(o)),d=Or(a(o));return me(u)||me(d)?null:Bx(u,d)}}case`gt`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u>d}}case`gte`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u>=d}}case`lt`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:u{const u=r(o),d=a(o);return me(u)||me(d)?null:u<=d}}case`and`:return r=>{let a=!1;for(const o of i){const u=o(r);if(u===!1)return!1;me(u)&&(a=!0)}return a?null:!0};case`or`:return r=>{let a=!1;for(const o of i){const u=o(r);if(u===!0)return!0;me(u)&&(a=!0)}return a?null:!1};case`not`:{const r=i[0];return a=>{const o=r(a);return me(o)?null:!o}}case`in`:{const r=i[0],a=i[1];return o=>{const u=Or(r(o)),d=a(o);return me(u)?null:Array.isArray(d)?d.some(p=>Or(p)===u):!1}}case`like`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:P0(u,d,!1)}}case`ilike`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return me(u)||me(d)?null:P0(u,d,!0)}}case`upper`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return a=>{const o=r(a);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(a=>{const o=a(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const a of i){const o=a(r);if(o!=null)return o}return null};case`add`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],a=i[1];return o=>{const u=r(o),d=a(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],a=i[1];return o=>{const u=r(o),p=a(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return a=>{const o=r(a),u=Rh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return a=>{const o=r(a),u=Rh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],a=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=a(o),p=Rh(d);return p?Lx(u,p):null}}case`isUndefined`:{const r=i[0];return a=>r(a)===void 0}case`isNull`:{const r=i[0];return a=>r(a)===null}default:throw new px(s.name)}}function P0(s,t,i){if(typeof s!=`string`||typeof t!=`string`)return!1;const r=i?s.toLowerCase():s;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Kx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function tS(s,t,i,r,a){const o=s;return{...s,$synced:o.$synced??r(),$origin:o.$origin??a(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const ad=[`$synced`,`$origin`,`$key`,`$collectionId`];function Vx(s){return ad.includes(s)}function Cv(s){return s.some(t=>Vx(t))}function Sa(s,t,i){if(Cv(t))return;const r=i??{...bv,...s.compareOptions};for(const a of s.indexes.values())if(a.matchesField(t)&&a.matchesCompareOptions(r))return a.matchesDirection(r.direction)?a:new Kx(a)}function $x(s){if(s.length===0)return new Set;if(s.length===1)return new Set(s[0]);let t=new Set(s[0]);for(let i=1;i=2){const o=r.split(`.`),u=Sa(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of a)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const a=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:$x(a)}}return{canOptimize:!1,matchingKeys:new Set}}function Xx(s,t){if(s.type!==`func`||s.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of s.args){const a=Yd(r,t);a.canOptimize&&i.push(a)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Gx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function Zx(s,t){if(s.type!==`func`||s.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=s.args[0],r=s.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const a=i.path,o=r.value,u=Sa(t,a);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function xv(s){return s.config.autoIndex===`eager`}function Lc(s,t,i,r,a){if(Cv(t)||!xv(i))return;const o=r??{...bv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:a?{compareFn:a,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function Wx(s,t){if(!xv(t))return;const i=Px(s);for(const{fieldName:r,fieldPath:a}of i)Lc(r,a,t)}function Px(s){const t=[];function i(r){if(r.type!==`func`)return;const a=r;if(a.name===`and`){for(const g of a.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(a.name)||a.args.length<1||a.args[0].type!==`ref`)return;const d=a.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(s),t}class t_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),a=i(r);return this.set(t,a),a}}const Dh=3e4;function Mh(s,t){if(t.length<=Dh)s.push(...t);else for(let i=0;i0)a=o;else return o}return r}class n_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let a=0;at?1:0:typeof s==`string`?-1:1}function ia(s){return JSON.stringify(s,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const i_=we(),r_=we(),l_=we(),a_=we(),o_=we();function we(){return Math.random()*(2**31-1)>>>0}const _v=new ArrayBuffer(8),c_=new DataView(_v),Xs=new Uint8Array(_v);class va{constructor(){this.hash=i_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(o_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(r_);for(let i=0;i>>8&255)}return;case`number`:c_.setFloat64(0,t,!0),this.writeByte(Xs[0]),this.writeByte(Xs[1]),this.writeByte(Xs[2]),this.writeByte(Xs[3]),this.writeByte(Xs[4]),this.writeByte(Xs[5]),this.writeByte(Xs[6]),this.writeByte(Xs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(a_)):this.update(l_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const u_=we(),f_=we(),h_=we(),d_=we(),p_=we(),g_=we(),y_=we(),m_=we(),S_=we(),v_=we(),w_=we(),b_=we(),E_=we(),C_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function x_(s){const t=s[Symbol.toStringTag];return typeof t==`string`&&C_.has(t)}const __=128,ra=new WeakMap;function Ne(s){const t=new va;return Tv(t,s),t.digest()}function T_(s){const t=ra.get(s);if(t!==void 0)return t;let i;if(s instanceof Date)i=A_(s);else if(typeof Buffer<`u`&&s instanceof Buffer||s instanceof Uint8Array)if(s.byteLength<=__)i=O_(s);else return cd(s);else{if(s instanceof File)return cd(s);if(x_(s))i=R_(s);else{let r=s,a=m_;s instanceof Array&&(a=S_),s instanceof Map&&(a=v_,r=[...s.entries()]),s instanceof Set&&(a=w_,r=[...s.entries()]),i=D_(r,a)}}return ra.set(s,i),i}function A_(s){const t=new va;return t.update(y_),t.update(s.getTime()),t.digest()}function O_(s){const t=new va;t.update(b_),t.update(s.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new se(this.#t.filter(([i,r])=>t(i)))}negate(){return new se(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Mh(i,this.#t),Mh(i,t.getInner()),new se(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${kh.getStringId(u)}|${kh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=kh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const a=[];for(const[o,u]of t)u!==0&&a.push([i.get(o),u]);return new se(a)}#n(){const t=new t_(()=>0),i=new Map;let r=!1,a=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)a=!0;else{o=!0;break}const u=o||r&&a;for(const[p,g]of this.#t){const m=u?Ne(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new se(d)}extend(t){const i=t instanceof se?t.getInner():t;Mh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class U_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Un{#t=[];sendData(t){t instanceof se||(t=new se(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new U_(t)}}class Av{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Ni extends Av{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class z_ extends Av{constructor(t,i,r,a){super(t,[i,r],a),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class Qd extends Ni{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class j_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Un;return new N_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class zn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class N_ extends zn{sendData(t){this.writer.sendData(t)}}class B_ extends Ni{run(){const t=this.inputMessages();if(t.length===0)return;const i=new se;for(const a of t)i.extend(a);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Ov(){return s=>{const t=new zn(s.graph,new Un),i=new B_(s.graph.getNextOperatorId(),s.connectReader(),t.writer);return s.graph.addOperator(i),t}}const Fl=Symbol(`NO_PREFIX`);class nS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=ta(t),a=this.get(r);if(sc(a)){const[o,u]=a;if(ta(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Ne(o)===Ne(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Jl;p.set(Ne(o),a),p.set(Ne(t),[t,i]),this.set(r,p)}}else a===void 0?this.set(r,[t,i]):a.addValue(t,i)&&this.delete(r);return this.size===0}}class Jl extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Ne(t),a=this.get(r);if(a){const[,o]=a,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Ws{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Ws;for(const r of t)for(const[a,o]of r.getInner()){const[u,d]=a;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(sc(i))yield i;else{if(i===void 0)return;if(i instanceof Jl)for(const r of i.values())yield r;else for(const r of i.values())if(sc(r))yield r;else for(const a of r.values())yield a}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,a]=i;if(a===0)return;const o=(this.#e.get(t)||0)+a;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(sc(u)){this.#n(t,u,r,a);return}if(u instanceof Jl){const d=ta(r);if(d!==Fl){const p=new nS;p.set(Fl,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,a)&&this.#t.delete(t)}else u.addValue(r,a)&&this.#t.delete(t)}#n(t,i,r,a){const[o,u]=i;if(o===r){const g=u+a;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=ta(r),p=ta(o);if(p===d&&(o===r||Ne(o)===Ne(r))){const g=u+a;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fl&&d===Fl){const g=new Jl;g.set(Ne(o),i),g.set(Ne(r),[r,a]),this.#t.set(t,g)}else{const g=new nS;if(p===d){const m=new Jl;m.set(Ne(o),i),m.set(Ne(r),[r,a]),g.set(p,m)}else g.set(p,i),g.set(d,[r,a]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,a]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of a)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,a]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of a)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new se(i)}}function ta(s){return Array.isArray(s)&&(typeof s[0]==`string`||typeof s[0]==`number`||typeof s[0]==`bigint`)?s[0]:Fl}function sc(s){return Array.isArray(s)}class L_ extends Ni{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,a){super(t,i,r),this.#n=a}run(){const t=new Set;for(const r of this.inputMessages())for(const[a,o]of r.getInner()){const[u,d]=a;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const a=this.#t.get(r),o=this.#e.get(r),u=this.#n(a),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new se(i))}}function Rv(s){return t=>{const i=new zn(t.graph,new Un),r=new L_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class I_ extends Ni{#t;#e;constructor(t,i,r,a=o=>o){super(t,i,r),this.#t=a,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[a,o]of r.getInner()){const u=Ne(this.#t(a)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,a])}const i=[];for(const[r,[a,o]]of t.entries()){const u=this.#e.get(r)??0;a===0?this.#e.delete(r):this.#e.set(r,a),u<=0&&a>0?i.push([[Ne(this.#t(o)),o[1]],1]):u>0&&a<=0&&i.push([[Ne(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new se(i))}}function H_(s=t=>t){return t=>{const i=new zn(t.graph,new Un),r=new I_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class q_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return t.filter(this.#t)}}function ys(s){return t=>{const i=new zn(t.graph,new Un),r=new q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}const K_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Rr(s,t,i){const r=i[0];if(t!=null&&s>=t)throw new Error(s+` >= `+t);if(s.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(s[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Rr(s.slice(u),t.slice(u),i)}const a=s?i.indexOf(s[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-a>1){const u=Math.round(.5*(a+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[a]+Rr(s.slice(1),null,i)}function Dv(s){if(s.length!==Mv(s[0]))throw new Error(`invalid integer part of order key: `+s)}function Mv(s){if(s>=`a`&&s<=`z`)return s.charCodeAt(0)-97+2;if(s>=`A`&&s<=`Z`)return 90-s.charCodeAt(0)+2;throw new Error(`invalid order key head: `+s)}function Xl(s){const t=Mv(s[0]);if(t>s.length)throw new Error(`invalid order key: `+s);return s.slice(0,t)}function sS(s,t){if(s===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+s);const i=Xl(s);if(s.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+s)}function iS(s,t){Dv(s);const[i,...r]=s.split(``);let a=!0;for(let o=r.length-1;a&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],a=!1)}if(a){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function V_(s,t){Dv(s);const[i,...r]=s.split(``);let a=!0;for(let o=r.length-1;a&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],a=!1)}if(a){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function $_(s,t,i=K_){if(s!=null&&sS(s,i),t!=null&&sS(t,i),s!=null&&t!=null&&s>=t)throw new Error(s+` >= `+t);if(s==null){if(t==null)return`a`+i[0];const p=Xl(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Rr(``,g,i);if(p{const o=s(i,a);return o!==0?o:od(t,r)}}class Fd{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,a=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??a);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=s_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#r(t),a=r===0?null:aS(this.#t[r-1]),o=r===this.#t.length?null:aS(this.#t[r]),u=$_(a,o),d=rS(t,u);if(this.#t.splice(r,0,d),rthis.#e(lS(i),lS(r)))}}class Uv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:a,newMultiplicity:o}=this.#n(t,r);return a<=0&&o>0?this.#e.insert([t,i]):a>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof Fd))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,a=r+i;return a===0?this.#t.delete(t):this.#t.set(t,a),{oldMultiplicity:r,newMultiplicity:a}}}function dc(s,t){if(s){const[[i,r],a]=s;t.push([[i,[r,a]],1])}}function pc(s,t){if(s){const[[i,r],a]=s;t.push([[i,[r,a]],-1])}}class G_ extends Ni{#t=new Map;#e;#n;#s;#r;constructor(t,i,r,a,o){super(t,i,r),this.#e=o.groupKeyFn,this.#r=o.limit??1/0,this.#s=o.offset??0,this.#n=kv(a),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#h.bind(this))}createTopK(t,i,r){return new Fd(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#y(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#r,this.#n);i=new Uv(r),this.#t.set(t,i)}return i}#a(t,i){i.isEmpty&&this.#t.delete(t)}#h({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#r=i);const r=[];let a=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#r});u.moveIns.forEach(d=>dc(d,r)),u.moveOuts.forEach(d=>pc(d,r)),u.changes&&(a=!0)}a&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,a]of i.getInner()){const[o,u]=r;this.#f(o,u,a,t)}t.length>0&&this.output.sendData(new se(t))}#f(t,i,r,a){const o=this.#e(t,i),u=this.#y(o),d=u.processElement(t,i,r);dc(d.moveIn,a),pc(d.moveOut,a),this.#a(o,u)}}function Y_(s,t){return i=>{const r=new zn(i.graph,new Un),a=new G_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,s,t);return i.graph.addOperator(a),r}}class Q_ extends z_{#t=new Ws;#e=new Ws;#n;constructor(t,i,r,a,o=`inner`){super(t,i,r,a),this.#n=o}run(){const t=Ws.fromMultiSets(this.inputAMessages()),i=Ws.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new se;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[a,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(a),d=i.getConsolidatedMultiplicity(a);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([a,[g,null]],m)}if(i.size>0)for(const a of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(a),u=i.getConsolidatedMultiplicity(a);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(a))m!==0&&r.add([a,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[a,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(a),d=t.getConsolidatedMultiplicity(a);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([a,[null,g]],m)}if(t.size>0)for(const a of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(a),u=t.getConsolidatedMultiplicity(a);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(a))m!==0&&r.add([a,[null,g]],p?-m:+m)}}}function zv(s,t=`inner`){return i=>{if(i.graph!==s.graph)throw new Error(`Cannot join streams from different graphs`);const r=new zn(i.graph,new Un),a=new Q_(i.graph.getNextOperatorId(),i.connectReader(),s.connectReader(),r.writer,t);return i.graph.addOperator(a),r}}class F_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return t.map(this.#t)}}function ce(s){return t=>{const i=new zn(t.graph,new Un),r=new F_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class J_ extends Ni{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function ud(s){return t=>{const i=new zn(t.graph,new Un),r=new J_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class X_ extends Qd{#t;constructor(t,i,r,a){super(t,i,r),this.#t=a}inner(t){return this.#t(t),t}}function Z_(s){return t=>{const i=new zn(t.graph,new Un),r=new X_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,s);return t.graph.addOperator(r),i}}class W_ extends Ni{#t;constructor(t,i,r,a,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,kv(a));this.#t=new Uv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new Fd(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],a=this.#t.move({offset:t,limit:i});a.moveIns.forEach(o=>dc(o,r)),a.moveOuts.forEach(o=>pc(o,r)),a.changes&&this.output.sendData(new se(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,a]of i.getInner()){const[o,u]=r;this.processElement(o,u,a,t)}t.length>0&&this.output.sendData(new se(t))}processElement(t,i,r,a){const o=this.#t.processElement(t,i,r);dc(o.moveIn,a),pc(o.moveOut,a)}}function P_(s,t){const i=t||{};return r=>{const a=new zn(r.graph,new Un),o=new W_(r.graph.getNextOperatorId(),r.connectReader(),a.writer,s,i);return r.graph.addOperator(o),a}}function oS(s){return`pipe`in s}function cS(s,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,a])=>!oS(a)));return Object.fromEntries(Object.entries(t).filter(([r,a])=>oS(a))),r=>{const a=`__original_key__`;return r.pipe(ce(d=>{const p=s(d),g=ia(p),m={};m[a]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Rv(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[a];g[a]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(ce(([d,p])=>{const g=p[a],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function tT(s=t=>t){return{preMap:t=>s(t),reduce:t=>{let i=0;for(const[r,a]of t)i+=r*a;return i}}}function eT(s=t=>t){return{preMap:t=>s(t)==null?0:1,reduce:t=>{let i=0;for(const[r,a]of t)i+=r*a;return i}}}function nT(s=t=>t){return{preMap:t=>({sum:s(t),count:0}),reduce:t=>{let i=0,r=0;for(const[a,o]of t)i+=a.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function sT(s){const t=s??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[a,o]of i)(!r||a&&ai);return{preMap:i=>t(i),reduce:i=>{let r;for(const[a,o]of i)(!r||a&&a>r)&&(r=a);return r}}}const rT={sum:tT,count:eT,avg:nT,min:sT,max:iT};function lT(s,t){const i=t.limit??1/0,r=t.offset??0,a=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Y_((g,m)=>d(s(g),s(m)),{limit:i,offset:r,setSizeCallback:a,setWindowFn:o,groupKeyFn:u}),Ov())}function aT(s,t,i){const r=i?.limit??1/0,a=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(s((g,m)=>d(t(g),t(m)),{limit:r,offset:a,setSizeCallback:o,setWindowFn:u}),Ov())}function oT(s,t){return aT(P_,s,t)}const Uh=`__virtual_synced__`,zh=`__virtual_has_local__`;function uS(s){let t=!1,i=!0,r=!1;for(const[a,o]of Object.entries(s)){if(a===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:cT,count:uT,avg:fT,min:hT,max:dT}=rT;function pT(s,t){const i=new Map,r=[...s];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[a,o]of Object.entries(t)){if(o.type===`agg`||Ir(o))continue;const u=r.findIndex(d=>gc(o,d));if(u===-1)throw new Ex(a);i.set(a,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function fS(s,t,i,r,a,o,u){const d={[Uh]:{preMap:([,w])=>uS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[zh]:{preMap:([,w])=>uS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,A]of Object.entries(r))if(A.type===`agg`)w[D]=Jo(A);else if(Ir(A)){const{transformed:z,extracted:L}=fd(A,T);for(const[I,K]of Object.entries(L))w[I]=Jo(K);E[D]=he(z)}}const N=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(s=s.pipe(cS(N,w)),s=s.pipe(ce(([,D])=>{const z={...D.$selected||{}};if(r){for(const[nt,J]of Object.entries(r))J.type===`agg`&&(z[nt]=D[nt]);hS(z,D,E)}const L=u?D.__correlationKey:void 0,I=L!==void 0?`single_group_${ia(L)}`:`single_group`,K={...D,$selected:z},X=D[Uh],tt=D[zh];return K.$synced=X??!0,K.$origin=tt?`local`:`remote`,K.$key=I,K.$collectionId=o??K.$collectionId,u&&L!==void 0&&(K[u]={__correlationKey:L}),[I,K]})),i&&i.length>0)for(const D of i){const A=G0(D),z=yc(A,r||{},`$selected`),L=he(z);s=s.pipe(ys(([,I])=>{const K={$selected:I.$selected};return Mr(L(K))}))}if(a&&a.length>0)for(const D of a)s=s.pipe(ys(([,A])=>{const z={$selected:A.$selected};return Mr(D(z))}));return s}const p=pT(t,r),g=t.map(w=>he(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[K,X]of Object.entries(r))if(X.type===`agg`)T[K]=w[K];else if(!v[K]){const tt=p.selectToGroupByIndex.get(K);tt!==void 0?T[K]=w[`__key_${tt}`]:T[K]=E[K]}hS(T,w,v)}else for(let K=0;K0)for(const w of i){const E=G0(w),T=yc(E,r||{}),N=he(T);s=s.pipe(ys(([,D])=>{const A={$selected:D.$selected};return N(A)}))}if(a&&a.length>0)for(const w of a)s=s.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Mr(w(T))}));return s}function gc(s,t){if(!s||!t||s.type!==t.type)return!1;switch(s.type){case`ref`:return!s.path||!t.path||s.path.length!==t.path.length?!1:s.path.every((i,r)=>i===t.path[r]);case`val`:return s.value===t.value;case`func`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>gc(i,t.args[r]));case`agg`:return s.name===t.name&&s.args?.length===t.args?.length&&(s.args||[]).every((i,r)=>gc(i,t.args[r]));default:return!1}}function Jo(s){const t=he(s.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},a=([,o])=>t(o);switch(s.name.toLowerCase()){case`sum`:return cT(i);case`count`:return uT(a);case`avg`:return fT(i);case`min`:return hT(r);case`max`:return dT(r);default:throw new Cx(s.name)}}function yc(s,t,i=`$selected`){switch(s.type){case`agg`:{const r=s;for(const[a,o]of Object.entries(t))if(o.type===`agg`&&gT(r,o))return new Me([i,a]);throw new xx(r.name)}case`func`:{const r=s,a=r.args.map(o=>yc(o,t));return new Je(r.name,a)}case`ref`:return s;case`val`:return s;default:throw new _x(s.type)}}function hS(s,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(s[r]=t[r]);for(const[r,a]of Object.entries(i))s[r]=a({$selected:s});for(const r of Object.keys(s))r.startsWith(`__agg_`)&&delete s[r]}function Ir(s){return Lr(s)?s.type===`agg`?!0:s.type===`func`&&`args`in s?s.args.some(t=>Ir(t)):!1:!1}function fd(s,t){if(s.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Me([`$selected`,i]),extracted:{[i]:s}}}if(s.type===`func`){const i={},r=s.args.map(a=>{const o=fd(a,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Je(s.name,r),extracted:i}}return{transformed:s,extracted:{}}}function gT(s,t){return s.name===t.name&&s.args.length===t.args.length&&s.args.every((i,r)=>gc(i,t.args[r]))}function yT(s,t,i,r,a,o,u,d,p,g){const m=i.map(E=>{const T=yc(E.expression,r,`$selected`);return{compiledExpression:he(T),compareOptions:hd(E,a)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,D=T;for(let A=0;A1?String(z.path[0]):s.from.alias}}if(N){const I=i.every(nt=>nt.expression.type===`ref`)?i.map(nt=>{const J=nt.expression,lt=sa(s,J,a);return he(lt?new Me(lt.path):nt.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(nt,J)=>{if(i.length===1){const lt=nt&&N(nt),at=J&&N(J);return v(lt,at)}if(I){const lt=at=>at&&I.map(Nt=>Nt(at));return v(lt(nt),lt(J))}return 0},valueExtractorForRawRow:nt=>{if(i.length===1)return N(nt);if(I)return I.map(J=>J(nt))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??a.id;o[tt]=w,b=nt=>{o[tt].dataNeeded=()=>{const J=nt();return Math.max(0,w.limit-J)}}}}return g?t.pipe(lT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(oT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function hd(s,t){return s.compareOptions.stringSort!==void 0?s.compareOptions:{...t.compareOptions,direction:s.compareOptions.direction,nulls:s.compareOptions.nulls}}function mT(s,t={}){const i=r=>{const a=[];for(const[o,u]of s.entries())(r?.(u)??!0)&&a.push({type:`insert`,key:o,value:u});return a};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?ea(t.where):void 0,a=vT(s,t.orderBy,t.limit,r,t.optimizedOnly);if(a===void 0)return;const o=[];for(const u of a){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,a=Yx(r,s);if(a.canOptimize){const o=[];for(const u of a.matchingKeys){const d=s.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=ea(r);return i(o)}}catch(r){console.warn(`${s.id?`[${s.id}] `:``}Error processing where clause, falling back to full scan:`,r);const a=ea(t.where);return t.optimizedOnly?void 0:i(a)}}function ea(s){const t=Ev(s);return i=>{try{const r=t(i);return Mr(r)}catch{return!1}}}function ST(s,t){const i=ea(t.whereExpression);return r=>{const a=[];for(const o of r)if(o.type===`insert`)i(o.value)&&a.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?a.push(o):u&&!d?a.push({...o,type:`insert`}):!u&&d&&a.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&a.push(o);(a.length>0||r.length===0)&&s(a)}}function vT(s,t,i,r,a){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=hd(p,s);Lc(y[0],y,s,v);const b=Sa(s,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=s.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(a)return;const o=[];for(const[p,g]of s.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Pl(m.compareOptions),v=dS(p.value,m.expression),b=dS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function dS(s,t){if(t.type===`ref`){const i=t;let r=s;for(const a of i.path)r=r?.[a];return r}else return t.type===`val`?t.value:Ev(t)(s)}class pS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,a=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=od(t,u);if(g<0)a=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const a=this.map.get(t),o=this.indexOf(t,a);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ic=`__tanstack_db_direct`;class wT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:a,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const D of r){for(const A of D.operations)b.add(A.key);for(const[A]of D.rowMetadataWrites)b.add(A)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const A=this.get(D);A!==void 0&&w.set(D,A)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const A of D.mutations)this.isThisCollection(A.collection)&&A.optimistic&&N.set(A.key,{type:A.type,value:A.modified});for(const D of r){if(D.truncate){const A=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const z of A){if(m?.deletes.has(z))continue;const L=m?.upserts.get(z)||this.syncedData.get(z);L!==void 0&&E.push({type:`delete`,key:z,value:L})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const z of b)w.delete(z);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of D.operations){const z=A.key;this.syncedKeys.add(z);const L=this.isLocalOnly||this.pendingLocalChanges.has(z)||this.pendingLocalOrigins.has(z)||y?.has(z)===!0||v?.has(z)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(z,A.value),this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(z),A.value);this.syncedData.set(z,I)}else this.syncedData.set(z,A.value);this.rowOrigins.set(z,L),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}case`delete`:this.syncedData.delete(z),this.syncedMetadata.delete(z),this.rowOrigins.delete(z),this.pendingLocalChanges.delete(z),this.pendingLocalOrigins.delete(z),this.pendingOptimisticUpserts.delete(z),this.pendingOptimisticDeletes.delete(z),this.pendingOptimisticDirectUpserts.delete(z),this.pendingOptimisticDirectDeletes.delete(z);break}}for(const[A,z]of D.rowMetadataWrites){if(z.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,z.value)}for(const[A,z]of D.collectionMetadataWrites){if(z.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,z.value)}}if(o){const D=new Set;for(const L of r)for(const I of L.operations)(I.type===`insert`||I.type===`update`)&&D.add(I.key);const A=new Map(m.upserts),z=new Set(m.deletes);for(const[L,I]of A)if(!z.has(L))if(D.has(L)){let K=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===L&&tt.type===`insert`){tt.value=I,K=!0;break}}K||E.push({type:`insert`,key:L,value:I})}else E.push({type:`insert`,key:L,value:I});if(E.length>0&&z.size>0){const L=[];for(const I of E)I.type===`insert`&&z.has(I.key)||L.push(I);E.length=0,E.push(...L)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[D,A]of m.upserts)this.optimisticUpserts.set(D,A);for(const D of m.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const A of D.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const D of b){const A=w.get(D),z=this.get(D),L=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(D),K=L.$synced!==I.$synced||L.$origin!==I.$origin,X=A!==void 0?tS(A,D,this.collection.id,()=>L.$synced,()=>L.$origin):void 0,tt=N.get(D);let nt=!1;tt&&(tt.type===`delete`&&A!==void 0&&z===void 0&&Kn(tt.value,A)||z!==void 0&&Kn(tt.value,z))&&(nt=!0);const J=K&&A!==void 0&&z!==void 0&&Kn(A,z);if(!(nt&&!J))if(A===void 0&&z!==void 0){const lt=N.get(D);if(lt){const at=lt.value,Nt=tS(at,D,this.collection.id,()=>L.$synced,()=>L.$origin);E.push({type:`update`,key:D,value:z,previousValue:Nt})}else E.push({type:`insert`,key:D,value:z})}else A!==void 0&&z===void 0?E.push({type:`delete`,key:D,value:X??A}):A!==void 0&&z!==void 0&&(!Kn(A,z)||J)&&E.push({type:`update`,key:D,value:z,previousValue:X??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=a,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new pS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new pS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,a=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||a.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,a=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===a&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:a,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:a,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),a=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:a,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:a}=this;if(!i.has(t))return r.has(t)?r.get(t):a.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:a}=this;return i.has(t)?!1:r.has(t)?!0:a.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const a of t.keys())i.has(a)||(yield a);for(const a of r.keys())!t.has(a)&&!i.has(a)&&(yield a)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,a]of this.entries())t(a,r,i++)}map(t){const i=[];let r=0;for(const[a,o]of this.entries())i.push(t(o,a,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),a=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ic]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,a,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(a=>this.syncedData.has(a)&&!this.optimisticUpserts.has(a)).length,r=Array.from(this.optimisticUpserts.keys()).filter(a=>!this.syncedData.has(a)).length;return t-i+r}collectOptimisticChanges(t,i,r,a){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?a.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?a.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&a.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function jv(){const s=new Map;function t(i){const r=i.join(`.`);if(s.has(r))return s.get(r);const a=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return s.set(r,a),a}return t([])}function Ei(s){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(s.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&s.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...s,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&s.includes(u))return{enumerable:!0,configurable:!0}}})}function gS(s){const t=Ei(s),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const a=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?a:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:a}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ie(s){return rc(s)?new Me(s.__path):s&&typeof s==`object`&&`type`in s&&(s.type===`func`||s.type===`ref`||s.type===`val`||s.type===`agg`)?s:new Be(s)}function rc(s){return s&&typeof s==`object`&&s.__refProxy===!0}function dd(s,t){return new Je(`eq`,[ie(s),ie(t)])}function yS(s,t){return new Je(`gt`,[ie(s),ie(t)])}function bT(s,t){return new Je(`gte`,[ie(s),ie(t)])}function pd(s,t){return new Je(`lt`,[ie(s),ie(t)])}function gd(s,t,...i){const r=[s,t,...i];return new Je(`and`,r.map(a=>ie(a)))}function ET(s,t,...i){const r=[s,t,...i];return new Je(`or`,r.map(a=>ie(a)))}function CT(s,t){return new Je(`in`,[ie(s),ie(t)])}class xT{constructor(t){this.query=t}}class _T{constructor(t){this.query=t}}class Nv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,a=>{i(a),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,a)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),a(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(a){queueMicrotask(()=>{throw a})}})}clearListeners(){this.listeners.clear()}}function TT(s,t){if(t.length===0||s.length===0)return;if(s.length===1){const{expression:r,compareOptions:a}=s[0];return(a.direction===`asc`?yS:pd)(r,new Be(t[0]))}const i=[];for(let r=0;rgd(m,y)))}}return i.length===1?i[0]:i.reduce((r,a)=>ET(r,a))}class AT extends Nv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&Wx(r.whereExpression,this.collection);const a=o=>{i(o),this.trackSentKeys(o)};this.callback=a,this.filteredCallback=r.whereExpression?ST(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const a=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(a),a instanceof Promise&&(this.pendingTruncateRefetches.add(a),a.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(a),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=gd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},a=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(a),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(a);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:a,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?ea(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const nt=this.collection.get(tt);return nt===void 0?!1:v?.(nt)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],nt=this.collection.currentStateAsChanges({where:dd(tt,new Be(g))});if(nt){const J=nt.map(at=>at.key).filter(at=>!this.sentKeys.has(at)&&b(at));T.push(...J);const lt=m.take(i-T.length,g,b);T.push(...lt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),D=()=>T.length===0,A=t[0].expression,z=A.type===`ref`?he(new Me(A.path),!0):null;for(;N()>0&&!D();){const tt=new Set;for(const nt of T){const J=this.collection.get(nt);E.push({type:`insert`,key:nt,value:J}),w=z?z(J):J,tt.add(nt)}T=m.take(N(),w,b)}const L=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=TT(t,r);if(tt){const{expression:nt}=t[0],J=r[0];let lt;if(J instanceof Date){const at=new Date(J.getTime()+1);lt=gd(bT(nt,new Be(J)),pd(nt,new Be(at)))}else lt=dd(nt,new Be(J));I={whereFrom:tt,whereCurrent:lt,lastKey:this.lastSentKey}}}const K={where:y,limit:i,orderBy:t,cursor:I,offset:a??L,subscription:this},X=this.collection._sync.loadSubset(K);u?.(X),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const a of t){let o=a;if(this.sentKeys.has(a.key)){if(a.type===`insert`)continue;a.type===`delete`&&this.sentKeys.delete(a.key)}else{if(a.type===`update`)o={...a,type:`insert`,previousValue:void 0};else if(a.type===`delete`&&!i)continue;this.sentKeys.add(a.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class OT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const a=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(a)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...a}=i;let o=a.whereExpression;if(r){const d=jv(),p=r(d);o=ie(p)}const u=new AT(this.collection,t,{...a,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new UC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const RT=s=>setTimeout(()=>{s({didTimeout:!0,timeRemaining:()=>50})},0),DT=s=>{clearTimeout(s)},MT=typeof window<`u`&&`requestIdleCallback`in window?(s,t)=>window.requestIdleCallback(s,t):(s,t)=>RT(s),jh=typeof window<`u`&&`cancelIdleCallback`in window?s=>window.cancelIdleCallback(s):DT,Bv=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const a=Date.now()+i;this.tasks.set(t,{executeAt:a,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(a){console.error(`Error in CleanupQueue task:`,a)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};Bv.instance=null;let Nh=Bv;class kT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new MC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new ma(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new DC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||Nh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){Nh.getInstance().cancel(this),this.idleCallbackId!==null&&(jh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&jh(this.idleCallbackId),this.idleCallbackId=MT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),Nh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(a=>{try{a()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(jh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const Jd=Symbol(`liveQueryInternal`);class UT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=zT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new Th;if(r.committed)throw new Ah;let a;`key`in i?a=i.key:a=this.config.getKey(i.value),this.state.pendingLocalChanges.has(a)&&this.state.pendingLocalOrigins.add(a);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(a),p=r.deletedKeys.has(a),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(a);if(m!==void 0&&Kn(m,i.value))o=`update`;else{const b=this.config.utils[Jd];throw new BC(a,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:a};r.operations.push(u),o===`delete`?(r.deletedKeys.add(a),r.rowMetadataWrites.set(a,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(a,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(a,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(a,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new WC;if(i.committed)throw new PC;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Th;if(i.committed)throw new Ah;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ui(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new Th;if(t.committed)throw new Ah;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[a,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(a):i.set(a,o.value);return Array.from(i.entries()).filter(([a])=>t?a.startsWith(t):!0).map(([a,o])=>({key:a,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new kC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new Z0(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new Z0(this.id,t)})}this.preloadPromise=null}}function zT(s){if(typeof s==`function`)return{cleanup:s};if(typeof s==`object`)return s}const mS=1;function lc(s,t){return s===t?0:sZs(r)??null);if(s instanceof Date)return{__type:`date`,value:s.toISOString()};if(s instanceof Set)return{__type:`set`,values:Array.from(s).map(a=>Zs(a)??null).sort((a,o)=>lc(xi(a),xi(o)))};if(s instanceof Map)return{__type:`map`,entries:Array.from(s.entries()).map(([a,o])=>({key:Zs(a)??null,value:Zs(o)??null})).sort((a,o)=>lc(xi(a.key),xi(o.key)))};if(s instanceof RegExp)return{__type:`regexp`,value:s.toString()};const t={},i=Object.entries(s).sort(([r],[a])=>lc(r,a));for(const[r,a]of i){const o=Zs(a);o!==void 0&&(t[r]=o)}return t}function xi(s){return s===null?`null`:Array.isArray(s)?`[${s.map(xi).join(`,`)}]`:typeof s!=`object`?JSON.stringify(s):`{${Object.keys(s).sort((r,a)=>lc(r,a)).map(r=>`${JSON.stringify(r)}:${xi(s[r])}`).join(`,`)}}`}function NT(s,t,i,r,a){const o=jT(r),u=Zs(t)??null,d=Zs(a),g=Zs({signatureVersion:mS,expression:u,options:d??null})??null,m=xi(g);return{signatureVersion:mS,signature:m,indexId:s,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function yd(s){if(s===null||typeof s!=`object`)return s;if(Array.isArray(s))return s.map(i=>yd(i));const t={};for(const[i,r]of Object.entries(s))t[i]=yd(r);return t}function BT(s){return JSON.parse(JSON.stringify(s))}class LT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,a=jv(),o=t(a),u=ie(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ui(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=NT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const a=this.indexMetadata.get(i);return this.indexMetadata.delete(i),a&&this.events.emitIndexRemoved(a),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:BT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:yd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var IT={};const HT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),qT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),KT=new Set([`set`,`delete`,`clear`,`add`]),VT=new Set([`entries`,`keys`,`values`,`forEach`]);function Xd(s){return s!==null&&typeof s==`object`&&!(s instanceof Date)&&!(s instanceof RegExp)&&!ei(s)}function $T(s,t,i,r){if(HT.has(s))return function(...a){const o=a[0];if(typeof o!=`function`)return t.apply(i.copy_,a);const u=(g,m)=>{if(Xd(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(s===`reduce`||s===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...a.slice(1)])}const p=t.apply(i.copy_,[d,...a.slice(1)]);if((s===`find`||s===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return s===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function GT(s,t){return function(){const i=s.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const a=i[r];let o=a;if(Xd(a)){const u={tracker:s,prop:String(r)},{proxy:d}=t(a,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function SS(s,t,i){return function(...r){const a=s.apply(t.copy_,r);return i(t),a}}function YT(s,t,i,r,a,o,u){if(VT.has(s)||t===Symbol.iterator)return function(...p){const g=i.apply(a.copy_,p);if(s===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(a),T};return i.apply(r,[v,...p.slice(1)])}}if(s===`entries`||s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(s===`values`&&r instanceof Map)for(const[w,E]of a.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of a.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(s===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:a,prop:E,updateMap:D=>{a.copy_ instanceof Map&&a.copy_.set(E,D)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(s===`values`||s===Symbol.iterator.toString()||t===Symbol.iterator)if(s===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:a,prop:E,updateMap:D=>{a.copy_ instanceof Map&&a.copy_.set(E,D)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:a,prop:E,updateSet:D=>{a.copy_ instanceof Set&&(a.copy_.delete(E),a.copy_.add(D),b.set(E,D))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:a,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function Tt(...s){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...s):!t&&typeof process<`u`&&IT.DEBUG===`true`&&console.log(`[proxy]`,...s)}function gs(s,t=new WeakMap){if(s==null||typeof s!=`object`)return s;if(t.has(s))return t.get(s);if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s.source,s.flags);if(Array.isArray(s)){const a=[];return t.set(s,a),s.forEach((o,u)=>{a[u]=gs(o,t)}),a}if(ArrayBuffer.isView(s)&&!(s instanceof DataView)){const a=Object.getPrototypeOf(s).constructor,o=new a(s.length);t.set(s,o);for(let u=0;u{a.set(u,gs(o,t))}),a}if(s instanceof Set){const a=new Set;return t.set(s,a),s.forEach(o=>{a.add(gs(o,t))}),a}if(ei(s))return s;const i={};t.set(s,i);for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&(i[a]=gs(s[a],t));const r=Object.getOwnPropertySymbols(s);for(const a of r)i[a]=gs(s[a],t);return i}let vS=0;function QT(){return vS+=1,vS}function Zd(s,t){const i=new Map;function r(y,v){if(Tt(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=Zd(y,v);return i.set(y,b),b}}const a=new Map,o={copy_:gs(s),originalObject:gs(s),proxyCount:QT(),modified:!1,assigned_:{},parent:t,target:s};Tt(`createChangeProxy called for target`,s,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(Tt(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(Tt(`Checking property ${String(b)}, current:`,w,`original:`,E),!Kn(w,E))return Tt(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Kn(w,E))return Tt(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(y,v){Tt(`checkParentStatus called for child prop:`,v);const b=d(y);Tt(`Parent checkIfReverted returned:`,b),b&&(Tt(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(Tt(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(Tt(`createObjectProxy`,y),a.has(y))return Tt(`proxyCache found match`),a.get(y);const v=new Proxy(y,{get(b,w){Tt(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(qT.has(D))return SS(E,o,u);const A=$T(D,E,o,r);if(A)return A;if(w===Symbol.iterator)return GT(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(KT.has(D))return SS(E,o,u);const A=YT(D,w,E,b,o,r,u);if(A)return A}return E.bind(b)}if(Xd(E)){const D={tracker:o,prop:String(w)},{proxy:A}=r(T,D);return a.set(E,A),A}return E},set(b,w,E){const T=o.copy_[w];if(Tt(`set called for property ${String(w)}, current:`,T,`new:`,E),Kn(T,E))Tt(`Value unchanged, not tracking`);else{const N=o.originalObject[w],D=Kn(E,N);if(Tt(`value:`,E,`original:`,N,`isRevertToOriginal:`,D),D){Tt(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],Tt(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){Tt(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return a.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return Tt(`Returning copy:`,y),y}}}function FT(s){const t=s.map(i=>Zd(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function JT(s,t){const{proxy:i,getChanges:r}=Zd(s);return t(i),r()}function XT(s,t){const{proxies:i,getChanges:r}=FT(s);return t(i),r()}function ZT(){let s,t,i=!0;return{promise:new Promise((a,o)=>{s=u=>{i=!1,a(u)},t=u=>{i=!1,o(u)}}),resolve:s,reject:t,isPending:()=>i}}function WT(s){return typeof s==`object`&&s!==null&&typeof s.hasPendingGraphRun==`function`}class PT{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:a}){if(typeof t>`u`){a();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,a),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:a,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(a=>a!==i),r.jobs.size===0&&this.contexts.delete(t))}}const mc=new PT,Sc=[];let la=[],tA=0;function eA(s,t){switch(`${s.type}-${t.type}`){case`insert-update`:return{...s,type:`insert`,original:{},modified:t.modified,changes:{...s.changes,...t.changes},key:s.key,globalKey:s.globalKey,metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:s.original,changes:{...s.changes,...t.changes},metadata:t.metadata??s.metadata,syncMetadata:{...s.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${s.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Zl(s){const t=new rA(s);return Sc.push(t),t}function ac(){if(la.length>0)return la.slice(-1)[0]}function nA(s){mc.clear(s.id),la.push(s)}function sA(s){try{mc.flush(s.id)}finally{la=la.filter(t=>t.id!==s.id)}}function iA(s){const t=Sc.findIndex(i=>i.id===s.id);t!==-1&&Sc.splice(t,1)}let rA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new QC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=ZT(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=tA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&iA(this)}mutate(t){if(this.state!==`pending`)throw new JC;nA(this);try{t()}finally{sA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(a=>a.globalKey===i.globalKey);if(r>=0){const a=this.mutations[r],o=eA(a,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new XC;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(a=>r.add(a.globalKey));for(const a of Sc)a.state===`pending`&&a.mutations.some(o=>r.has(o.globalKey))&&a.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new ZC;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class lA{constructor(t,i){this.insert=(r,a)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=ac();if(!u&&!this.config.onInsert)throw new $C;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new NC(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:a?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:a?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Zl({metadata:{[ic]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,a)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=ac();if(!u&&!this.config.onDelete)throw new YC;if(Array.isArray(r)&&r.length===0)throw new KC;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new VC(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:a?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:a?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Zl({autoCommit:!0,metadata:{[ic]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new RC}validateData(t,i,r){if(!this.config.schema)return t;const a=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=a[`~standard`].validate(d);if(p instanceof Promise)throw new F0;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new Q0(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=a[`~standard`].validate(t);if(o instanceof Promise)throw new F0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new Q0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new zC(i):new jC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new LC;const a=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=ac();if(!o&&!this.config.onUpdate)throw new GC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new IC;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new HC(w);return E});let y;u?y=XT(m,p):y=[JT(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],D=this.validateData(T,`update`,w),A=Object.assign({},N,D),z=this.config.getKey(N),L=this.config.getKey(A);if(z!==L)throw new qC(z,L);const I=this.generateGlobalKey(L,A);return{mutationId:crypto.randomUUID(),original:N,modified:A,changes:Object.fromEntries(Object.keys(T).map(K=>[K,A[K]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:a.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Zl({mutationFn:async()=>{}});return w.commit().catch(()=>{}),a.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),a.transactions.set(o.id,o),a.scheduleTransactionCleanup(o),a.recomputeOptimisticState(!0),o;const b=Zl({metadata:{[ic]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),a.transactions.set(b.id,b),a.scheduleTransactionCleanup(b),a.recomputeOptimisticState(!0),b}}class aA extends Nv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function Wd(s){const t=new Pd(s);return s.utils?t.utils=s.utils:t.utils={},t}class Pd{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new AC;if(!t.sync)throw new OC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ui(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new OT,this._events=new aA,this._indexes=new LT,this._lifecycle=new kT(t,this.id),this._mutations=new lA(t,this.id),this._state=new wT(t),this._sync=new UT(t,this.id),this.comparisonOpts=oA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,a]of this.entries())t(a,r,i++)}map(t){const i=[];let r=0;for(const[a,o]of this.entries())i.push(t(o,a,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return mT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function oA(s){if(s.defaultStringCollation){const t=s.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function cA(s){return!!s&&(typeof s==`object`||typeof s==`function`)&&typeof s.then==`function`}function uA(s){const{mutationFn:t,onMutate:i,...r}=s;return a=>{const o=Zl({...r,mutationFn:async u=>await t(a,u)});return o.mutate(()=>{const u=i(a);if(cA(u))throw new FC}),o}}function fA(s){const t=hA(s);let i=s,r,a=0;const o=10;for(;aHv(u)),a=qv(r),o=Lv(s);for(const[u,d]of a.singleSource)dA(s,u)&&!o.has(u)&&t.set(u,d);return t}function dA(s,t){if(s.from.alias===t)return s.from.type===`collectionRef`;if(s.join){for(const i of s.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Lv(s){const t=new Set;if(s.join){const i=s.from.alias;for(const r of s.join){const a=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(a),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function md(s){const t={...s,from:s.from.type===`queryRef`?new Sn(md(s.from.query),s.from.alias):s.from,join:s.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(md(i.from.query),i.from.alias):i.from}))};return pA(t)}function pA(s){if(!s.where||s.where.length===0)return s;if(!s.join||s.join.length===0){if(s.where.length>1){const d=vd(s.where),p=vc(d);return{...s,where:[p]}}return s}const t=s.where.filter(d=>!Y0(d)),r=vd(t).map(d=>Hv(d)),a=qv(r),o=yA(s,a),u=s.where.filter(d=>Y0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function Iv(s){return{...s,from:Sd(s.from),join:s.join?.map(t=>({...t,from:Sd(t.from)}))}}function Sd(s){if(s.type===`collectionRef`)return s;const t=Iv(s.query);if(gA(t)){const i=Sd(t.from);return i.type===`collectionRef`?new Br(i.collection,s.alias):new Sn(i.query,s.alias)}return new Sn(t,s.alias)}function gA(s){return(!s.where||s.where.length===0)&&!s.select&&(!s.groupBy||s.groupBy.length===0)&&(!s.having||s.having.length===0)&&(!s.orderBy||s.orderBy.length===0)&&(!s.join||s.join.length===0)&&s.limit===void 0&&s.offset===void 0&&!s.fnSelect&&(!s.fnWhere||s.fnWhere.length===0)&&(!s.fnHaving||s.fnHaving.length===0)}function vd(s){const t=[];for(const i of s){const r=Kd(i);t.push(...tp(r))}return t}function tp(s){if(s.type===`func`&&s.name===`and`){const t=[];for(const i of s.args)t.push(...tp(i));return t}else return[s]}function Hv(s){const t=new Set;let i=!1;function r(a){switch(a.type){case`ref`:if(a.path&&a.path.length>0){const o=a.path[0];o&&(t.add(o),a.path.length===1&&(i=!0))}break;case`func`:a.args&&a.args.forEach(r);break;case`val`:break;case`agg`:a.args&&a.args.forEach(r);break}}return r(s),{expression:s,touchedSources:t,hasNamespaceOnlyRef:i}}function qv(s){const t=new Map,i=[];for(const o of s)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,vc(u));const a=i.length>0?vc(i):void 0;return{singleSource:r,multiSource:a}}function yA(s,t){const i=new Set,r=Lv(s),a=new Map;for(const[y,v]of t.singleSource)r.has(y)||a.set(y,v);const o=wS(s.from,a,i),u=s.join?s.join.map(y=>({...y,from:wS(y.from,a,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(_C(v)):d.push(v);const g=d.length>1?[vc(d.flatMap(y=>tp(Kd(y))))]:d;return{select:s.select,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,distinct:s.distinct,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Dr(s){return{from:s.from.type===`collectionRef`?new Br(s.from.collection,s.from.alias):new Sn(Dr(s.from.query),s.from.alias),select:s.select,join:s.join?s.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new Br(t.from.collection,t.from.alias):new Sn(Dr(t.from.query),t.from.alias)})):void 0,where:s.where?[...s.where]:void 0,groupBy:s.groupBy?[...s.groupBy]:void 0,having:s.having?[...s.having]:void 0,orderBy:s.orderBy?[...s.orderBy]:void 0,limit:s.limit,offset:s.offset,fnSelect:s.fnSelect,fnWhere:s.fnWhere?[...s.fnWhere]:void 0,fnHaving:s.fnHaving?[...s.fnHaving]:void 0}}function wS(s,t,i){const r=t.get(s.alias);if(!r)return s.type===`collectionRef`?new Br(s.collection,s.alias):new Sn(Dr(s.query),s.alias);if(s.type===`collectionRef`){const u={from:new Br(s.collection,s.alias),where:[r]};return i.add(s.alias),new Sn(u,s.alias)}if(!EA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);if(xA(s.query,r,s.alias))return new Sn(Dr(s.query),s.alias);const a=s.query.where||[],o={...Dr(s.query),where:[...a,r]};return i.add(s.alias),new Sn(o,s.alias)}function mA(s,t,i){return s.select?Kv(s.select)||CA(s.select,t,i):!1}function SA(s){return s.groupBy&&s.groupBy.length>0}function vA(s){return s.having&&s.having.length>0}function wA(s){return s.orderBy&&s.orderBy.length>0&&(s.limit!==void 0||s.offset!==void 0)}function bA(s){return s.fnSelect||s.fnWhere&&s.fnWhere.length>0||s.fnHaving&&s.fnHaving.length>0}function EA(s,t,i){return!(mA(s,t,i)||SA(s)||vA(s)||wA(s)||bA(s))}function Kv(s){for(const t of Object.values(s))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&Kv(i))return!0}return!1}function ep(s){const t=[];if(s==null||typeof s!=`object`)return t;switch(s.type){case`ref`:t.push(s);break;case`func`:case`agg`:for(const i of s.args??[])t.push(...ep(i));break}return t}function CA(s,t,i){const r=new Set;for(const[o,u]of Object.entries(s))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Me||r.add(o);const a=ep(t);for(const o of a){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function xA(s,t,i){const r=ep(t);if(r.every(o=>o.path[0]!==i))return!1;if(s.fnSelect)return!0;const a=s.select;if(!a)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=a[u[1]];if(!d)continue;if(!(d instanceof Me)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==s.from.alias||g!==u[1])return!0}return!1}function vc(s){if(s.length===0)throw new Ax;return s.length===1?s[0]:new Je(`and`,s)}function _A(s,t,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D){let A=s;for(const z of t)A=TA(A,z,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D);return A}function TA(s,t,i,r,a,o,u,d,p,g,m,y,v,b,w,E,T,N,D){const A=t.from.type===`collectionRef`,{alias:z,input:L,collectionId:I}=OA(t.from,o,p,g,m,y,v,b,u,d,E,T,N,D);i[z]=L,A&&(T[z]=I);const K=p[r],X=p[I];if(!K)throw new X0(r);if(!X)throw new X0(I);const{activeSource:tt,lazySource:nt}=DA(t.type,K,X),J=Object.keys(i),{mainExpr:lt,joinedExpr:at}=AA(t.left,t.right,J,z),Nt=he(lt),ht=he(at);let M=s.pipe(ce(([Z,rt])=>[Or(Nt(rt)),[Z,rt]])),q=L.pipe(ce(([Z,rt])=>{const ft={[z]:rt};return[Or(ht(ft)),[Z,ft]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new gx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,rt=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ft=lt.type===`func`||at.type===`func`;if(!rt&&!ft){const _=tt===`main`?z:a;y.add(_);const H=tt===`main`?M:q,F=sa(w,tt===`main`?at:lt,nt),ct=F.collection,st=F.path[0];st&&Lc(st,F.path,ct);const yt=H.pipe(Z_(Dt=>{const wt=N[_]||_,an=g[wt];if(!an)throw new Ox(wt,_,nt.id,Object.keys(g));if(an.hasLoadedInitialState())return;const Es=Dt.getInner().map(([[pt]])=>pt),et=new Me(F.path);an.requestSnapshot({where:CT(et,Es),optimizedOnly:!0})||an.requestSnapshot()}));tt===`main`?M=yt:q=yt}}return M.pipe(zv(q,t.type),RA(t.type))}function AA(s,t,i,r){const a=i.filter(d=>d!==r),o=wd(s),u=wd(t);if(o&&a.includes(o)&&u===r)return{mainExpr:s,joinedExpr:t};if(o===r&&u&&a.includes(u))return{mainExpr:t,joinedExpr:s};throw!o||!u?new mx:o===u?new yx(o):a.includes(o)?u!==r?new vx(r):new wx:new Sx(o)}function wd(s){switch(s.type){case`ref`:return s.path[0]||null;case`func`:{const t=new Set;for(const i of s.args){const r=wd(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function OA(s,t,i,r,a,o,u,d,p,g,m,y,v,b){switch(s.type){case`collectionRef`:{const w=t[s.alias];if(!w)throw new wv(s.alias,s.collection.id,Object.keys(t));return y[s.alias]=s.collection.id,{alias:s.alias,input:w,collectionId:s.collection.id}}case`queryRef`:{const w=g.get(s.query)||s.query,E=m(w,t,i,r,a,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(s.query),N=s.query.from.alias;if(!(!T&&s.alias===N))for(const[I,K]of E.sourceWhereClauses)b.set(I,K);const A=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);A&&A!==s.alias&&(v[s.alias]=A);const L=E.pipeline.pipe(ce(I=>{const[K,[X,tt]]=I;return[K,X]}));return{alias:s.alias,input:L,collectionId:E.collectionId}}default:throw new bx(s.type)}}function RA(s){return function(t){return t.pipe(ys(i=>{const[r,[a,o]]=i,u=a?.[1],d=o?.[1];return s===`inner`?!!(u&&d):s===`left`?!!u:s===`right`?!!d:!0}),ce(i=>{const[r,[a,o]]=i,u=a?.[0],d=a?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function DA(s,t,i){switch(s){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeUA(a,r)))}function jA(s){return s.type===`agg`}function NA(s){return s&&typeof s==`object`&&!Lr(s)}function Vv(s,t,i){for(const[r,a]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=a&&typeof a==`object`&&`type`in a&&a.type===`ref`;if(p.includes(`.`)||g){const m=[...s],y=g?a:new Me(p.split(`.`)),v=he(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...s];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=a;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});continue}if(NA(o)){Vv([...s,r],o,i);continue}if(jA(o)||Ir(o))i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Lr(o)){i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>o});continue}if(o instanceof Be){const u=o.value;i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...s,r].join(`.`),compiled:he(o)})}}}const kr=Symbol(`includesRouting`);function wc(s,t,i,r,a,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(s);if(v)return v;Ed(s);const{optimizedQuery:b,sourceWhereClauses:w}=fA(s);let E=b;g.set(E,s),xd(E,s,g);const T={...t},N={},D={},A={},{alias:z,input:L,collectionId:I}=LA(E.from,T,i,r,a,o,u,d,p,g,N,D,w);A[z]=L;let K=L;if(m&&y){const ht=y.path.slice(1);K=L.pipe(ce(([Z,rt])=>[KA(rt,ht),[Z,rt]])).pipe(zv(m,`inner`)).pipe(ys(([Z,[rt]])=>rt!=null),ce(([Z,[rt,ft]])=>{const[_,H]=rt,Y={...H,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(_)}::${JSON.stringify(ft)}`:_,Y]})),A[z]=K}let X=K.pipe(ce(([ht,M])=>{const{__parentContext:q,...Z}=M,rt={[z]:Z};return q&&(Object.assign(rt,q),rt.__parentContext=q),[ht,rt]}));if(E.join&&E.join.length>0&&(X=_A(X,E.join,A,I,z,T,p,g,i,r,a,o,u,d,s,wc,N,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const M=Kd(ht),q=he(M);X=X.pipe(ys(([Z,rt])=>Mr(q(rt))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ys(([M,q])=>Mr(ht(q))));const tt=[],nt=[];if(E.select){const ht=HA(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:M,subquery:q}of ht){const Z=he(q.correlationField);let rt;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:he(Y)}));rt=X.pipe(ce(([Y,F])=>{const ct={};for(const st of H){ct[st.alias]||(ct[st.alias]={});const yt=st.compiled(F);let Dt=ct[st.alias];for(let wt=0;wt[Z(Y),null]));rt=rt.pipe(Rv(H=>H.map(([Y,F])=>[Y,F>0?1:0])));const ft=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=wc(ft,T,i,r,a,o,u,d,p,g,rt,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(F=>({alias:F.path[0],field:F.path.slice(1),compiled:he(F)})),Y=Z;nt.push({fieldName:q.fieldName,getRouting:F=>{const ct={};for(const st of H){ct[st.alias]||(ct[st.alias]={});const yt=st.compiled(F);let Dt=ct[st.alias];for(let wt=0;wt({correlationKey:Z(H),parentContext:null})});qA(E.select,M)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new rx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new lx;E.fnSelect?X=X.pipe(ce(([ht,M])=>{const q=E.fnSelect(M);return[ht,{...M,$selected:q}]})):E.select?X=zA(X,E.select):X=X.pipe(ce(([ht,M])=>{const q=!E.join&&!E.groupBy?M[z]:M;return[ht,{...M,$selected:q}]})),nt.length>0&&(X=X.pipe(ce(([ht,M])=>{const q={};for(const{fieldName:Z,getRouting:rt}of nt)q[Z]=rt(M);return M.$selected[kr]=q,[ht,M]})));const J=m?z:void 0;if(E.groupBy&&E.groupBy.length>0?X=fS(X,E.groupBy,E.having,E.select,E.fnHaving,I,J):E.select&&Object.values(E.select).some(M=>M.type===`agg`||Ir(M))&&(X=fS(X,[],E.having,E.select,E.fnHaving,I,J)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(M=>M.type===`agg`):!1))throw new ox;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ys(([M,q])=>ht(q)));if(E.distinct&&(X=X.pipe(H_(([ht,M])=>M.$selected))),E.orderBy&&E.orderBy.length>0){const ht=m&&(E.limit!==void 0||E.offset!==void 0)?(ft,_)=>{const H=_?.[z]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([H,Y]):H}:void 0,Z=yT(s,X,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,ht).pipe(ce(([ft,[_,H]])=>{const Y=_.$selected,F=bS(Cd(Y),_);if(m){const ct=_[z]?.__correlationKey,st=_.__parentContext??null;return delete F.__correlationKey,delete F.__parentContext,[ft,[F,H,ct,st]]}return[ft,[F,H]]})),rt={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,rt),rt}else if(E.limit!==void 0||E.offset!==void 0)throw new cx;const at=X.pipe(ce(([ht,M])=>{const q=M.$selected,Z=bS(Cd(q),M);if(m){const rt=M[z]?.__correlationKey,ft=M.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[ht,[Z,void 0,rt,ft]]}return[ht,[Z,void 0]]})),Nt={collectionId:I,pipeline:at,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(s,Nt),Nt}function BA(s){const t=new Set;if(s.from.type===`collectionRef`&&t.add(s.from.alias),s.join)for(const i of s.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Ed(s,t=new Set){const i=BA(s);for(const a of i)if(t.has(a))throw new ux(a,Array.from(t));const r=new Set([...t,...i]);if(s.from.type===`queryRef`&&Ed(s.from.query,r),s.join)for(const a of s.join)a.from.type===`queryRef`&&Ed(a.from.query,r)}function LA(s,t,i,r,a,o,u,d,p,g,m,y,v){switch(s.type){case`collectionRef`:{const b=t[s.alias];if(!b)throw new wv(s.alias,s.collection.id,Object.keys(t));return m[s.alias]=s.collection.id,{alias:s.alias,input:b,collectionId:s.collection.id}}case`queryRef`:{const b=g.get(s.query)||s.query,w=wc(b,t,i,r,a,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(s.query),T=s.query.from.alias;if(!(!E&&s.alias===T))for(const[L,I]of w.sourceWhereClauses)v.set(L,I);const D=Object.keys(w.aliasToCollectionId).find(L=>w.aliasToCollectionId[L]===w.collectionId);D&&D!==s.alias&&(y[s.alias]=D);const z=w.pipeline.pipe(ce(L=>{const[I,[K,X]]=L,tt=Cd(K);return[I,tt]}));return{alias:s.alias,input:z,collectionId:w.collectionId}}default:throw new fx(s.type)}}function IA(s){return s instanceof Be||s&&typeof s==`object`&&`type`in s&&s.type===`val`}function Cd(s){return IA(s)?s.value:s}function bS(s,t){if(!s||typeof s!=`object`)return s;let i=!1;for(const r of ad)if(s[r]==null&&r in t){i=!0;break}if(!i)return s;for(const r of ad)s[r]==null&&r in t&&(s[r]=t[r]);return s}function xd(s,t,i){if(s.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(s.from.query,t.from.query),xd(s.from.query,t.from.query,i)),s.join&&t.join)for(let r=0;r1)return new Me(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Me([r[0]])}return new Me(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const a of s.args){const o=np(a,t);r.push(o)}return new Je(s.name,r)}}function sp(s,t){return s.map(r=>{const a=np(r.expression,t);return{...r,expression:a}})}const Yv=new WeakMap;function VA(s){return s.utils?.[Jd]?.getBuilder?.()}function $A(s,t){Yv.set(s,t)}function GA(s){return Yv.get(s)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Qo(i,d)}if(Array.isArray(t))throw new Qo(i,`array`);if(r.length!==1)throw r.length===0?new Qo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Qo(i,`string`):new tx(i);const a=r[0],o=t[a];let u;if(o instanceof Pd)u=new Br(o,a);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new ex(i);u=new Sn(d,a)}else throw new nx(a);return[a,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[a,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),a],p=Ei(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new sx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=Ei(i),a=t(r),o=rc(a)?ie(a):a;if(!Lr(o))throw new J0(ES(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?gS(i):Ei(i),a=t(r),o=rc(a)?ie(a):a;if(!Lr(o))throw new J0(ES(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=Ei(i);let a=t(r);rc(a)&&a.__path.length===1&&(a={[`__SPREAD_SENTINEL__${a.__path[0]}__0`]:!0});const o=Fv(a,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),a=this.query.select||this.query.fnSelect?gS(r):Ei(r),o=t(a),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:ie(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=Ei(i),a=t(r),o=Array.isArray(a)?a.map(d=>ie(d)):[ie(a)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ix;return this.query}}function ES(s){return s===null?`null`:s===void 0?`undefined`:typeof s==`object`?`object`:typeof s}function YA(s){return s===void 0?ie(null):s instanceof vv||s instanceof Je||s instanceof Me||s instanceof Be?s:ie(s)}function Qv(s){return s!==null&&typeof s==`object`&&!Lr(s)&&!s.__refProxy}function Fv(s,t=[]){if(!Qv(s))return YA(s);const i={};for(const[r,a]of Object.entries(s)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=a;continue}if(a instanceof Wt){i[r]=Bh(a,r,t,`collection`);continue}if(a instanceof xT){if(!(a.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Bh(a.query,r,t,`array`);continue}if(a instanceof _T){if(!(a.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Bh(a.query,r,t,`concat`);continue}i[r]=Fv(a,t)}return i}function ip(s){const t=[];switch(s.type){case`ref`:t.push(s);break;case`func`:for(const i of s.args??[])t.push(...ip(i));break}return t}function QA(s,t){const i=typeof s==`object`&&`expression`in s?s.expression:s;return ip(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Bh(s,t,i,r){const a=s._getQuery(),o=[a.from.alias];if(a.join)for(const A of a.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(a.where)for(let A=0;A=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...a.where];if(g>=0){const A=m[p],L=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((I,K)=>K!==g);if(L.length===1){const I=typeof A==`object`&&`expression`in A&&A.residual;m[p]=I?{expression:L[0],residual:!0}:L[0]}else{const I=new Je(`and`,L),K=typeof A==`object`&&`expression`in A&&A.residual;m[p]=K?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const A of m)QA(A,i)?v.push(A):y.push(A);let b;if(v.length>0){const A=new Set;b=[];for(const z of v){const L=typeof z==`object`&&`expression`in z?z.expression:z;for(const I of ip(L))I.path[0]!=null&&i.includes(I.path[0])&&!A.has(I.path.join(`.`))&&(A.add(I.path.join(`.`)),b.push(I))}}const w={...a,where:y.length>0?y:void 0},E=w.select,T=E===void 0||Qv(E);let N=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=xC,N={...w,select:{[D]:E}}}return new ki(N,u,d,t,v.length>0?v:void 0,b,r,D)}function CS(s,t,i,r){if(s.type===`ref`&&t.type===`ref`){const a=s.path[0],o=t.path[0];if(a&&o&&i.includes(a)&&r.includes(o))return{parentRef:s,childRef:t};if(a&&o&&i.includes(o)&&r.includes(a))return{parentRef:t,childRef:s}}}function FA(s){const t=s(new Wt);return Jv(t)}function Jv(s){return s._getQuery()}function JA(s){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&a(o.select)}function a(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?r(d.query):rp(d)&&a(d))}return r(s),t}function Xv(s){const t=s.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Xv(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(s)}`)}function XA(s){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&a(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof ki?a(d.query):rp(d)&&r(d))}function a(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return a(s),t}function rp(s){return!(s===null||typeof s!=`object`||s instanceof ki||`type`in s&&typeof s.type==`string`||s.__refProxy)}function ZA(s){const t=typeof s.query==`function`?FA(s.query):Jv(s.query);if(t.select&&!rp(t.select))throw new ax;return t}function WA(s,t,i){const r=[];for(const a of t){const o=i(a.value);a.type===`insert`?r.push([[o,a.value],1]):a.type===`update`?(r.push([[o,a.previousValue],-1]),r.push([[o,a.value],1])):r.push([[o,a.value],-1])}return r.length!==0&&s.sendData(new se(r)),r.length}function*PA(s){for(const t of s)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function tO(s,t){const i=[];for(const r of s){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function eO(s,t,i,r){let a=t,o=!1;for(const u of s){if(u.type===`delete`)continue;const d=!i.has(u.key);a===void 0||r(a,u.value)<0?(a=u.value,o=!0):d&&(o=!0)}return{biggest:a,shouldResetLoadKey:o}}function nO(s,t){const{orderBy:i,limit:r,offset:a}=s,o=r!==void 0&&a!==void 0?r+a:r,u=i?sp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function sO(s,t,i,r,a){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=s,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=ia({minValues:g??null,offset:d,limit:a});if(i===m)return;const y=sp(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const xS=Symbol.for(`@tanstack/db.collection-config-builder`);class iO{constructor(t,i,r,a){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=a,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=np(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},a=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,a,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,a)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],a=tO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=WA(o,a,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const a=p=>{this.sendChangesToPipeline(p)},o=nO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(a,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,a){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),a(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=PA(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=sp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const a=r();return a>0&&this.loadNextItems(a,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const a=i;a[xS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,a[xS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const a=sO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);a&&(this.lastLoadRequestKey=a.loadRequestKey,i.requestLimitedSnapshot({orderBy:a.normalizedOrderBy,limit:t,minValues:a.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=eO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(a=>{i=a});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let rO=0;class lO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++rO}`,this.query=ZA({query:t.query}),this.collections=JA(this.query);const i=XA(this.query);this.collectionByAlias={};for(const[r,a]of i.entries()){const o=this.collections[r];if(o)for(const u of a)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=Zv(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Xv(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[Jd]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Dx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,a=>{a.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,a=this.currentSyncState;if(this.isInErrorState)return;if(a.subscribedToAllCollections){let o=!1;for(;a.graph.pendingWork();)a.graph.run(),a.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),a.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??ac()?.id,a=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;mc.schedule({contextId:r,jobId:a,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const a=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(a)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=mc.onClear(u=>{this.clearPendingGraphRun(u)});const a=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(a);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new j_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=wc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new Rx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:a}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(ud(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce(dO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=fO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),a()),p=new Map,_d(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const a={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(ud(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=a.pendingChildChanges.get(w);E||(E=new Map,a.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(a.nestedSetups=Wv(r.childCompilationResult.includes,i),a.nestedRoutingIndex=new Map,a.nestedRoutingReverseIndex=new Map),a})}applyChanges(t,i,r){const{write:a,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)a({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))a({value:p,type:`update`});else if(u>0)a({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:a}=r;if(a===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(a===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,a=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&a&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const a=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=GA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new iO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(a.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function Zv(s){return(t,i)=>{const r=s.get(t),a=s.get(i);return r&&a?ra?1:0:0}}function _S(s){return s.materialization!==`collection`}function TS(s,t){if(!t)return s.materialization===`array`?[]:s.materialization===`concat`?``:void 0;if(s.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=s.scalarField?i.map(a=>a?.[s.scalarField]):i;return s.materialization===`array`?r:r.map(a=>String(a??``)).join(``)}function Wv(s,t){return s.map(i=>{const r=new Map;i.pipeline.pipe(ud(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Hr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const a={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(a.nestedSetups=Wv(i.childCompilationResult.includes,t)),a})}function aO(s){return s.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function oO(s){const t=new Set;if(!s.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),a.push(o)}for(const o of a)r.buffer.delete(o)}return t}function cO(s,t,i){if(s.nestedSetups){for(const r of s.nestedSetups)for(const[,a]of i)if(a.inserts>0){const o=a.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.set(p,t);let g=s.nestedRoutingReverseIndex.get(t);g||(g=new Set,s.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(a.deletes>0&&a.inserts===0){const o=a.value[kr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Hr(u,d);if(u!=null){s.nestedRoutingIndex.delete(p);const g=s.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&s.nestedRoutingReverseIndex.delete(t))}}}}function uO(s,t){if(!s.nestedRoutingReverseIndex)return;const i=s.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)s.nestedRoutingIndex.delete(r);s.nestedRoutingReverseIndex.delete(t)}}function Pv(s){for(const t of s)if(t.buffer.size>0||t.nestedSetups&&Pv(t.nestedSetups))return!0;return!1}function Hr(s,t){return t==null?s:JSON.stringify([s,t])}function AS(s,t,i,r,a){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?Zv(u):void 0,m={collection:Wd({id:`__child-collection:${s}-${t}-${ia(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return a&&(m.includesStates=aO(a)),m}function _d(s,t,i,r,a){for(const o of s){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[kr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Hr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const z=AS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,z)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const D=TS(o,o.childRegistry.get(T));v[o.fieldName]=D;const A=t.get(m);A&&A!==v&&(A[o.fieldName]=D)}}}const u=_S(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=AS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&hO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}cO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=oO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&_d(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&_d(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=_S(o)?new Set([...u||[],...p]):null;if(a&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=a.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=TS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[kr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Hr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(uO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[kr]}function fO(s){for(const t of s)if(t.pendingChildChanges.size>0||t.nestedSetups&&Pv(t.nestedSetups))return!0;return!1}function hO(s,t,i,r,a){const o=r.get(i);if(o)for(const u of o){const d=s.get(u);d&&(d[t]=a)}}function dO(s,[[t,i],r]){const[a,o]=i,u=s.get(t)||{deletes:0,inserts:0,value:a,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=a,o!==void 0&&(u.orderByIndex=o)),s.set(t,u),s}function OS(s){return new lO(s).getConfig()}function Lh(s){if(typeof s==`function`){const i=OS({query:s});return RS(i)}else{const t=s,i=OS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),RS(i)}}function RS(s){const t=Wd(s),i=VA(s);return i&&$A(t,i),t}function tw(s){return s!=null&&`operation`in s.headers}function ew(s){return s!=null&&`control`in s.headers}var pO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(s,t){this.handlers.set(s,t),this.existingKeys.has(s)||this.existingKeys.set(s,new Set)}dispatchChange(s){if(!tw(s))return;s.headers.txid&&typeof s.headers.txid==`string`&&this.pendingTxids.add(s.headers.txid);const t=this.handlers.get(s.type);if(!t)return;let i=s.headers.operation;if(i!==`delete`&&(typeof s.value!=`object`||s.value===null))throw new Error(`StreamDB collections require object values; got ${typeof s.value} for type=${s.type}, key=${s.key}`);const a={...s.value??{}};a[t.primaryKey]=s.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(s.type)?.has(s.key)?`update`:`insert`);const o=this.existingKeys.get(s.type);i===`insert`||i===`update`?o?.add(s.key):o?.delete(s.key);try{t.write(a,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:s.type,key:s.key,operation:i}),u}}dispatchControl(s){if(ew(s))switch(s.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const s of this.pendingHandlers)try{s.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const s of this.pendingTxids){this.seenTxids.add(s);const t=this.txidResolvers.get(s);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(s)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const s of this.handlers.values())s.markReady();for(const s of this.preloadResolvers)s();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((s,t)=>{this.preloadResolvers.push(s),this.preloadRejecters.push(t)})}rejectAll(s){for(const t of this.preloadRejecters)t(s);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(s);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(s,t=5e3){return this.seenTxids.has(s)?Promise.resolve():new Promise((i,r)=>{const a=setTimeout(()=>{const o=this.txidResolvers.get(s);if(o){const u=o.findIndex(d=>d.timeoutId===a);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(s)}r(new Error(`Timeout waiting for txid: ${s}`))},t);this.txidResolvers.has(s)||this.txidResolvers.set(s,[]),this.txidResolvers.get(s).push({resolve:i,reject:r,timeoutId:a})})}};function gO(s,t,i){return{sync:({begin:r,write:a,commit:o,markReady:u,truncate:d})=>(t.registerHandler(s,{begin:r,write:(p,g)=>{a({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const DS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function yO(s,t,i){return{insert:({key:r,value:a,headers:o})=>{const u=i[`~standard`].validate(a);if(`issues`in u)throw new Error(`Validation failed for ${s} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=a[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:a,headers:{...o,operation:`insert`}}},update:({key:r,value:a,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(a);if(`issues`in d)throw new Error(`Validation failed for ${s} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${s} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=a[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${s} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:g,value:a,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:a,headers:o})=>{if(a!==void 0){const d=i[`~standard`].validate(a);if(`issues`in d)throw new Error(`Validation failed for ${s} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(a?String(a[t]):void 0);if(!u)throw new Error(`Cannot create ${s} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:s,key:u,old_value:a,headers:{...o,operation:`delete`}}},upsert:({key:r,value:a,headers:o})=>{const u=i[`~standard`].validate(a);if(`issues`in u)throw new Error(`Validation failed for ${s} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=a[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${s} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:s,key:p,value:a,headers:{...o,operation:`upsert`}}}}}function nw(s){for(const r of Object.keys(s))if(DS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(DS).join(`, `)})`);const t=new Map;for(const[r,a]of Object.entries(s)){const o=t.get(a.type);if(o)throw new Error(`Duplicate event type "${a.type}" - used by both "${o}" and "${r}" collections`);t.set(a.type,r)}const i={};for(const[r,a]of Object.entries(s))i[r]={...a,...yO(a.type,a.primaryKey,a.schema)};return i}function sw(s){const{streamOptions:t,state:i,actions:r}=s,a=new Hn(t),o=new pO,u={};for(const[b,w]of Object.entries(i)){const E=Wd({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:gO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await a.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)tw(N)?o.dispatchChange(N):ew(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:a,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:a}),w={};for(const[E,T]of Object.entries(b))w[E]=uA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const lp=600,mO=lp/2*1e3,SO=3600*24,vO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Ih=nw({rooms:{schema:vO,type:`stream`,primaryKey:`roomId`}}),wO={"~standard":{version:1,vendor:`durable-streams`,validate:s=>{const t=s;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},MS=nw({scores:{schema:wO,type:`stream`,primaryKey:`playerName`}});function bO(s,t){return sw({streamOptions:{url:s,headers:t,contentType:`application/json`},state:Ih,actions:({db:i,stream:r})=>({addRoom:{onMutate:a=>{i.collections.rooms.insert(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Ih.rooms.insert({value:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:a=>{i.collections.rooms.delete(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Ih.rooms.delete({key:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const iw=W.createContext(null);function rw(){const s=W.useContext(iw);if(!s)throw new Error(`useRegistryContext must be used within RegistryProvider`);return s}function EO({children:s}){const{dsEndpoint:t,dsHeaders:i}=Bd(),[r,a]=W.useState({registryDB:null,error:null,isLoading:!0});return W.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{a({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Hn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Hn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:SO}),o=await bO(g,i),await o.preload(),d()))return;a({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),a({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`,color:`rgba(235,235,245,0.68)`,fontSize:8},children:`LOADING...`}):r.error||!r.registryDB?Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:12,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},children:Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})}):Q.jsx(iw.Provider,{value:{registryDB:r.registryDB},children:s})}const Hh=1;function CO(s,t=[]){const i=s&&typeof s==`object`&&typeof s.subscribeChanges==`function`&&typeof s.startSyncImmediate==`function`&&typeof s.id==`string`,r=W.useRef(null),a=W.useRef(null),o=W.useRef(null),u=W.useRef(0),d=W.useRef(null),p=!r.current||i&&o.current!==s||!i&&(a.current===null||a.current.length!==t.length||a.current.some((w,E)=>w!==t[E]));if(p)if(i)s.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. - -Instead, use a query builder function: - const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) - -Or switch to syncMode "eager" if you want all data to sync automatically.`),s.startSyncImmediate(),r.current=s,o.current=s;else if(typeof s==`function`){const w=new Wt,E=s(w);if(E==null)r.current=null;else if(E instanceof Pd)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Lh({query:s,startSync:!0,gcTime:Hh});else if(E&&typeof E==`object`)r.current=Lh({startSync:!0,gcTime:Hh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);a.current=[...t]}else r.current=Lh({startSync:!0,gcTime:Hh,...s}),a.current=[...t];p&&(u.current=0,d.current=null);const g=W.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=W.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=W.useSyncExternalStore(g.current,m.current),v=W.useRef(null),b=W.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,D=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return D||(D=w.map(([,A])=>A)),T?D[0]:D},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const Ft={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},qh=[{label:`30x25`,cols:30,rows:25}];function Kh(s,t){return`${s}__${t.cols}x${t.rows}`}function xO(){const s=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=s[Math.floor(Math.random()*s.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function _O({playerName:s,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=rw(),[a,o]=W.useState(xO),u=0,[d,p]=W.useState(!1),[g,m]=W.useState(0),[y,v]=W.useState(!1),[b,w]=W.useState(``),[,E]=W.useState(0);W.useEffect(()=>{const L=setInterval(()=>E(I=>I+1),1e3);return()=>clearInterval(L)},[]);const{data:T=[]}=CO(L=>L.from({rooms:r.collections.rooms})),N=Date.now(),A=[...T.filter(L=>L.expiresAt>N)].sort((L,I)=>I.createdAt-L.createdAt),z=async()=>{if(!d){p(!0);try{const L=a.trim()||`room-${Math.random().toString(36).slice(2,7)}`,I=qh[u],K=Kh(L,I),X=Date.now(),tt={roomId:K,name:L,boardSize:`${I.cols}x${I.rows}`,createdAt:X,expiresAt:X+lp*1e3};await r.actions.addRoom(tt),o(``),i(K)}catch(L){console.error(`Failed to create room:`,L)}finally{p(!1)}}};return Q.jsxs(`div`,{style:Ae.container,children:[Q.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - .lobby-btn:active { opacity: 0.7; } - `}),Q.jsx(`div`,{style:Ae.title,children:`TERRITORY WARS`}),Q.jsx(`div`,{style:{fontSize:7,color:Ft.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Occupy 50% of the territory to win.`}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`NAME`}),Q.jsx(`input`,{style:Ae.input,value:s,onChange:L=>t(L.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOM`}),Q.jsx(`input`,{style:Ae.input,value:a,onChange:L=>o(L.target.value),placeholder:`room name`,onKeyDown:L=>L.key===`Enter`&&z()}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:d?.6:1},onClick:z,disabled:d,children:d?`STARTING...`:`START`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!0),children:`JOIN`})]})]}),y&&Q.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>v(!1),children:Q.jsxs(`div`,{style:{...Ae.card,marginBottom:0},onClick:L=>L.stopPropagation(),children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`JOIN ROOM`}),Q.jsx(`input`,{style:Ae.input,value:b,onChange:L=>w(L.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:L=>{if(L.key===`Enter`&&b.trim()){const I=A.find(K=>K.name===b.trim());i(I?I.roomId:Kh(b.trim(),qh[u]))}}}),Q.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.joinBtn,flex:1},onClick:()=>v(!1),children:`CANCEL`}),Q.jsx(`button`,{className:`lobby-btn`,style:{...Ae.createBtn,flex:1,opacity:b.trim()?1:.4},disabled:!b.trim(),onClick:()=>{if(b.trim()){const L=A.find(I=>I.name===b.trim());i(L?L.roomId:Kh(b.trim(),qh[u]))}},children:`JOIN`})]})]})}),A.length>0&&Q.jsxs(`div`,{style:Ae.card,children:[Q.jsx(`div`,{style:Ae.cardTitle,children:`ROOMS`}),Q.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:A.slice(g*3,g*3+3).map(L=>Q.jsx(TO,{room:L,onJoin:()=>i(L.roomId)},L.roomId))}),A.length>3&&Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g===0?.3:1},disabled:g===0,onClick:()=>m(L=>L-1),children:`<`}),Q.jsxs(`span`,{style:{fontSize:7,color:Ft.dim,lineHeight:`24px`},children:[g+1,`/`,Math.ceil(A.length/3)]}),Q.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Ft.bg,color:Ft.dim,border:`1px solid ${Ft.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:g>=Math.ceil(A.length/3)-1?.3:1},disabled:g>=Math.ceil(A.length/3)-1,onClick:()=>m(L=>L+1),children:`>`})]})]})]})}function TO({room:s,onJoin:t}){const[i,r]=W.useState(!1),a=o=>{o.stopPropagation(),navigator.clipboard.writeText(s.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Q.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:a,title:`Click to copy room name`,children:Q.jsx(`span`,{style:{fontSize:8,color:i?Ft.accent:Ft.text,cursor:`pointer`},children:i?`COPIED`:s.name})}),Q.jsx(`button`,{className:`lobby-btn`,style:{background:Ft.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const Ae={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Ft.bg,color:Ft.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Ft.accent,marginBottom:6},card:{background:Ft.card,border:`1px solid ${Ft.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Ft.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Ft.bg,border:`1px solid ${Ft.border}`,padding:`8px 10px`,color:Ft.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Ft.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:Ft.accent,border:`1px solid ${Ft.accent}`,cursor:`pointer`,letterSpacing:2}},Fe=()=>new Map,Td=s=>{const t=Fe();return s.forEach((i,r)=>{t.set(r,i)}),t},vs=(s,t,i)=>{let r=s.get(t);return r===void 0&&s.set(t,r=i()),r},AO=(s,t)=>{const i=[];for(const[r,a]of s)i.push(t(a,r));return i},OO=(s,t)=>{for(const[i,r]of s)if(t(r,i))return!0;return!1},Oi=()=>new Set,Vh=s=>s[s.length-1],RO=(s,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(s);for(let r=0;r{this.off(t,r),i(...a)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}class MO{constructor(){this._observers=Fe()}on(t,i){vs(this._observers,t,Oi).add(i)}once(t,i){const r=(...a)=>{this.off(t,r),i(...a)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return ni((this._observers.get(t)||Fe()).values()).forEach(r=>r(...i))}destroy(){this._observers=Fe()}}const kn=Math.floor,oc=Math.abs,ow=(s,t)=>ss>t?s:t,cw=s=>s!==0?s<0:1/s<0,kS=1,US=2,$h=4,Gh=8,aa=32,ms=64,ln=128,Hc=31,Ad=63,_i=127,kO=2147483647,bc=Number.MAX_SAFE_INTEGER,zS=Number.MIN_SAFE_INTEGER,UO=Number.isInteger||(s=>typeof s==`number`&&isFinite(s)&&kn(s)===s),zO=String.fromCharCode,jO=s=>s.toLowerCase(),NO=/^\s*/g,BO=s=>s.replace(NO,``),LO=/([A-Z])/g,jS=(s,t)=>BO(s.replace(LO,i=>`${t}${jO(i)}`)),IO=s=>{const t=unescape(encodeURIComponent(s)),i=t.length,r=new Uint8Array(i);for(let a=0;aoa.encode(s),qO=oa?HO:IO;let na=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});na&&na.decode(new Uint8Array).length===1&&(na=null);const KO=(s,t)=>DO(t,()=>s).join(``);class wa{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Fr=()=>new wa,VO=s=>{let t=s.cpos;for(let i=0;i{const t=new Uint8Array(VO(s));let i=0;for(let r=0;r{const i=s.cbuf.length;i-s.cpos{const i=s.cbuf.length;s.cpos===i&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(i*2),s.cpos=0),s.cbuf[s.cpos++]=t},Od=Se,At=(s,t)=>{for(;t>_i;)Se(s,ln|_i&t),t=kn(t/128);Se(s,_i&t)},op=(s,t)=>{const i=cw(t);for(i&&(t=-t),Se(s,(t>Ad?ln:0)|(i?ms:0)|Ad&t),t=kn(t/64);t>0;)Se(s,(t>_i?ln:0)|_i&t),t=kn(t/128)},Rd=new Uint8Array(3e4),GO=Rd.length/3,YO=(s,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;At(s,r);for(let a=0;a{const i=s.cbuf.length,r=s.cpos,a=ow(i-r,t.length),o=t.length-a;s.cbuf.set(t.subarray(0,a),r),s.cpos+=a,o>0&&(s.bufs.push(s.cbuf),s.cbuf=new Uint8Array(Qr(i*2,o)),s.cbuf.set(t.subarray(a)),s.cpos=o)},Qe=(s,t)=>{At(s,t.byteLength),qc(s,t)},cp=(s,t)=>{$O(s,t);const i=new DataView(s.cbuf.buffer,s.cpos,t);return s.cpos+=t,i},FO=(s,t)=>cp(s,4).setFloat32(0,t,!1),JO=(s,t)=>cp(s,8).setFloat64(0,t,!1),XO=(s,t)=>cp(s,8).setBigInt64(0,t,!1),NS=new DataView(new ArrayBuffer(4)),ZO=s=>(NS.setFloat32(0,s),NS.getFloat32(0)===s),ca=(s,t)=>{switch(typeof t){case`string`:Se(s,119),Ti(s,t);break;case`number`:UO(t)&&oc(t)<=kO?(Se(s,125),op(s,t)):ZO(t)?(Se(s,124),FO(s,t)):(Se(s,123),JO(s,t));break;case`bigint`:Se(s,122),XO(s,t);break;case`object`:if(t===null)Se(s,126);else if(Ic(t)){Se(s,117),At(s,t.length);for(let i=0;i0&&At(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const LS=s=>{s.count>0&&(op(s.encoder,s.count===1?s.s:-s.s),s.count>1&&At(s.encoder,s.count-2))};class cc{constructor(){this.encoder=new wa,this.s=0,this.count=0}write(t){this.s===t?this.count++:(LS(this),this.count=1,this.s=t)}toUint8Array(){return LS(this),wn(this.encoder)}}const IS=s=>{if(s.count>0){const t=s.diff*2+(s.count===1?0:1);op(s.encoder,t),s.count>1&&At(s.encoder,s.count-2)}};class Yh{constructor(){this.encoder=new wa,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(IS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return IS(this),wn(this.encoder)}}class WO{constructor(){this.sarr=[],this.s=``,this.lensE=new cc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new wa;return this.sarr.push(this.s),this.s=``,Ti(t,this.sarr.join(``)),qc(t,this.lensE.toUint8Array()),wn(t)}}const Vn=s=>new Error(s),Mn=()=>{throw Vn(`Method unimplemented`)},bn=()=>{throw Vn(`Unexpected case`)},uw=Vn(`Unexpected end of array`),fw=Vn(`Integer out of Range`);class Kc{constructor(t){this.arr=t,this.pos=0}}const qr=s=>new Kc(s),Dd=s=>s.pos!==s.arr.length,PO=(s,t)=>{const i=new Uint8Array(s.arr.buffer,s.pos+s.arr.byteOffset,t);return s.pos+=t,i},je=s=>PO(s,bt(s)),Kr=s=>s.arr[s.pos++],bt=s=>{let t=0,i=1;const r=s.arr.length;for(;s.posbc)throw fw}throw uw},up=s=>{let t=s.arr[s.pos++],i=t&Ad,r=64;const a=(t&ms)>0?-1:1;if((t&ln)===0)return a*i;const o=s.arr.length;for(;s.posbc)throw fw}throw uw},tR=s=>{let t=bt(s);if(t===0)return``;{let i=String.fromCodePoint(Kr(s));if(--t<100)for(;t--;)i+=String.fromCodePoint(Kr(s));else for(;t>0;){const r=t<1e4?t:1e4,a=s.arr.subarray(s.pos,s.pos+r);s.pos+=r,i+=String.fromCodePoint.apply(null,a),t-=r}return decodeURIComponent(escape(i))}},eR=s=>na.decode(je(s)),Ai=na?eR:tR,fp=(s,t)=>{const i=new DataView(s.arr.buffer,s.arr.byteOffset+s.pos,t);return s.pos+=t,i},nR=s=>fp(s,4).getFloat32(0,!1),sR=s=>fp(s,8).getFloat64(0,!1),iR=s=>fp(s,8).getBigInt64(0,!1),rR=[s=>{},s=>null,up,nR,sR,iR,s=>!1,s=>!0,Ai,s=>{const t=bt(s),i={};for(let r=0;r{const t=bt(s),i=[];for(let r=0;rrR[127-Kr(s)](s);class HS extends Kc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Dd(this)?this.count=bt(this)+1:this.count=-1),this.count--,this.s}}class uc extends Kc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=up(this);const t=cw(this.s);this.count=1,t&&(this.s=-this.s,this.count=bt(this)+2)}return this.count--,this.s}}class Qh extends Kc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=up(this),i=t&1;this.diff=kn(t/2),this.count=1,i&&(this.count=bt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class lR{constructor(t){this.decoder=new uc(t),this.str=Ai(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const aR=crypto.getRandomValues.bind(crypto),hw=()=>aR(new Uint32Array(1))[0],oR=`10000000-1000-4000-8000`+-1e11,cR=()=>oR.replace(/[018]/g,s=>(s^hw()&15>>s/4).toString(16)),Ec=Date.now,qS=s=>new Promise(s);Promise.all.bind(Promise);const KS=s=>s===void 0?null:s;class uR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let dw=new uR,fR=!0;try{typeof localStorage<`u`&&localStorage&&(dw=localStorage,fR=!1)}catch{}const hR=dw,fa=Symbol(`Equality`),pw=(s,t)=>s===t||!!s?.[fa]?.(t)||!1,dR=s=>typeof s==`object`,pR=Object.assign,gR=Object.keys,yR=(s,t)=>{for(const i in s)t(s[i],i)},Cc=s=>gR(s).length,mR=s=>{for(const t in s)return!1;return!0},ba=(s,t)=>{for(const i in s)if(!t(s[i],i))return!1;return!0},hp=(s,t)=>Object.prototype.hasOwnProperty.call(s,t),SR=(s,t)=>s===t||Cc(s)===Cc(t)&&ba(s,(i,r)=>(i!==void 0||hp(t,r))&&pw(t[r],i)),vR=Object.freeze,gw=s=>{for(const t in s){const i=s[t];(typeof i==`object`||typeof i==`function`)&&gw(s[t])}return vR(s)},dp=(s,t,i=0)=>{try{for(;i{if(s===t)return!0;if(s==null||t==null||s.constructor!==t.constructor&&(s.constructor||Object)!==(t.constructor||Object))return!1;if(s[fa]!=null)return s[fa](t);switch(s.constructor){case ArrayBuffer:s=new Uint8Array(s),t=new Uint8Array(t);case Uint8Array:{if(s.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(s);var yw={};const ha=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let In;const bR=()=>{if(In===void 0)if(ha){In=Fe();const s=process.argv;let t=null;for(let i=0;i{if(s.length!==0){const[t,i]=s.split(`=`);In.set(`--${jS(t,`-`)}`,i),In.set(`-${jS(t,`-`)}`,i)}})):In=Fe();return In},Md=s=>bR().has(s),xc=s=>KS(ha?yw[s.toUpperCase().replaceAll(`-`,`_`)]:hR.getItem(s)),mw=s=>Md(`--`+s)||xc(s)!==null,ER=mw(`production`),CR=ha&&wR(yw.FORCE_COLOR,[`true`,`1`,`2`]),xR=CR||!Md(`--no-colors`)&&!mw(`no-color`)&&(!ha||process.stdout.isTTY)&&(!ha||Md(`--color`)||xc(`COLORTERM`)!==null||(xc(`TERM`)||``).includes(`color`)),_R=s=>new Uint8Array(s),TR=s=>{const t=_R(s.byteLength);return t.set(s),t};class AR{constructor(t,i){this.left=t,this.right=i}}const hs=(s,t)=>new AR(s,t),VS=s=>s.next()>=.5,Fh=(s,t,i)=>kn(s.next()*(i+1-t)+t),Sw=(s,t,i)=>kn(s.next()*(i+1-t)+t),pp=(s,t,i)=>Sw(s,t,i),OR=s=>zO(pp(s,97,122)),RR=(s,t=0,i=20)=>{const r=pp(s,t,i);let a=``;for(let o=0;ot[pp(s,0,t.length-1)],DR=Symbol(`0schema`);class MR{constructor(){this._rerrs=[]}extend(t,i,r,a=null){this._rerrs.push({path:t,expected:i,has:r,message:a})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(KO(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const kd=(s,t)=>s===t?!0:s==null||t==null||s.constructor!==t.constructor?!1:s[fa]?pw(s,t):Ic(s)?ap(s,i=>lw(t,r=>kd(i,r))):dR(s)?ba(s,(i,r)=>kd(i,t[r])):!1;class Ie{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),kd(i,r)}equals(t){return this.constructor===t.constructor&&Ur(this.shape,t.shape)}[DR](){return!0}[fa](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){Mn()}get nullable(){return Jr(this,Qc)}get optional(){return new bw(this)}cast(t){return $S(t,this),t}expect(t){return $S(t,this),t}}class gp extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ue=(s,t=null)=>new gp(s,t);ue(gp);class yp extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=s=>new yp(s);ue(yp);class Vc extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(a=>a===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const $c=(...s)=>new Vc(s),vw=ue(Vc),kR=RegExp.escape||(s=>s.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),ww=s=>{if(Vr.check(s))return[kR(s)];if(vw.check(s))return s.shape.map(t=>t+``);if(Dw.check(s))return[`[+-]?\\d+.?\\d*`];if(Mw.check(s))return[`.*`];if(_c.check(s))return s.shape.map(ww).flat(1);bn()};class UR extends Ie{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(ww).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ue(UR);const zR=Symbol(`optional`);class bw extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[zR](){return!0}}const jR=ue(bw);class NR extends Ie{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ue(NR);class Gc extends Ie{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Gc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):ba(this.shape,(r,a)=>{const o=this._isPartial&&!hp(t,a)||r.check(t[a],i);return!o&&i?.extend(a.toString(),r.toString(),typeof t[a],`Object property does not match`),o})}}const BR=s=>new Gc(s),LR=ue(Gc),IR=be(s=>s!=null&&(s.constructor===Object||s.constructor==null));class Ew extends Ie{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&ba(t,(r,a)=>{const o=this.shape.keys.check(a,i);return!o&&i?.extend(a+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const Cw=(s,t)=>new Ew(s,t),HR=ue(Ew);class xw extends Ie{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&ba(this.shape,(r,a)=>{const o=r.check(t[a],i);return!o&&i?.extend(a.toString(),`Tuple`,typeof r),o})}}const qR=(...s)=>new xw(s);ue(xw);class _w extends Ie{constructor(t){super(),this.shape=t.length===1?t[0]:new mp(t)}check(t,i){const r=Ic(t)&&ap(t,a=>this.shape.check(a));return!r&&i?.extend(null,`Array`,``),r}}const Tw=(...s)=>new _w(s),KR=ue(_w),VR=be(s=>Ic(s));class Aw extends Ie{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const $R=(s,t=null)=>new Aw(s,t);ue(Aw);const GR=$R(Ie);class YR extends Ie{constructor(t){super(),this.len=t.length-1,this.args=qR(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const QR=ue(YR),FR=be(s=>typeof s==`function`);class JR extends Ie{constructor(t){super(),this.shape=t}check(t,i){const r=ap(this.shape,a=>a.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ue(JR,s=>s.shape.length>0);class mp extends Ie{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=lw(this.shape,a=>a.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Jr=(...s)=>s.findIndex(t=>_c.check(t))>=0?Jr(...s.map(t=>da(t)).map(t=>_c.check(t)?t.shape:[t]).flat(1)):s.length===1?s[0]:new mp(s),_c=ue(mp),Ow=()=>!0,Tc=be(Ow),XR=ue(yp,s=>s.shape===Ow),Sp=be(s=>typeof s==`bigint`),ZR=be(s=>s===Sp),Rw=be(s=>typeof s==`symbol`);be(s=>s===Rw);const zr=be(s=>typeof s==`number`),Dw=be(s=>s===zr),Vr=be(s=>typeof s==`string`),Mw=be(s=>s===Vr),Yc=be(s=>typeof s==`boolean`),WR=be(s=>s===Yc),kw=$c(void 0);ue(Vc,s=>s.shape.length===1&&s.shape[0]===void 0);$c(void 0);const Qc=$c(null),PR=ue(Vc,s=>s.shape.length===1&&s.shape[0]===null);ue(Uint8Array);ue(gp,s=>s.shape===Uint8Array);const tD=Jr(zr,Vr,Qc,kw,Sp,Yc,Rw);(()=>{const s=Tw(Tc),t=Cw(Vr,Tc),i=Jr(zr,Vr,Qc,Yc,s,t);return s.shape=i,t.shape.values=i,i})();const da=s=>{if(GR.check(s))return s;if(IR.check(s)){const t={};for(const i in s)t[i]=da(s[i]);return BR(t)}else{if(VR.check(s))return Jr(...s.map(da));if(tD.check(s))return $c(s);if(FR.check(s))return ue(s)}bn()},$S=ER?()=>{}:(s,t)=>{const i=new MR;if(!t.check(s,i))throw Vn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class eD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:da(t),h:i}),this}else(t){return this.if(Tc,t)}done(){return(t,i)=>{for(let r=0;rnew eD(s),Uw=nD(Tc).if(Dw,(s,t)=>Fh(t,zS,bc)).if(Mw,(s,t)=>RR(t)).if(WR,(s,t)=>VS(t)).if(ZR,(s,t)=>BigInt(Fh(t,zS,bc))).if(_c,(s,t)=>Cr(t,Jh(t,s.shape))).if(LR,(s,t)=>{const i={};for(const r in s.shape){let a=s.shape[r];if(jR.check(a)){if(VS(t))continue;a=a.shape}i[r]=Uw(a,t)}return i}).if(KR,(s,t)=>{const i=[],r=Sw(t,0,42);for(let a=0;aJh(t,s.shape)).if(PR,(s,t)=>null).if(QR,(s,t)=>{const i=Cr(t,s.res);return()=>i}).if(XR,(s,t)=>Cr(t,Jh(t,[zr,Vr,Qc,kw,Sp,Yc,Tw(zr),Cw(Jr(`a`,`b`,`c`),zr)]))).if(HR,(s,t)=>{const i={},r=Fh(t,0,3);for(let a=0;aUw(da(t),s),Fc=typeof document<`u`?document:{};be(s=>s.nodeType===aD);typeof DOMParser<`u`&&new DOMParser;be(s=>s.nodeType===iD);be(s=>s.nodeType===rD);const sD=s=>AO(s,(t,i)=>`${i}:${t};`).join(``),iD=Fc.ELEMENT_NODE,rD=Fc.TEXT_NODE,lD=Fc.DOCUMENT_NODE,aD=Fc.DOCUMENT_FRAGMENT_NODE;be(s=>s.nodeType===lD);const ws=Symbol,zw=ws(),jw=ws(),oD=ws(),cD=ws(),uD=ws(),Nw=ws(),fD=ws(),vp=ws(),hD=ws(),dD=s=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const t=[],i=[],r=Fe();let a=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(a=i,a.unshift(t.join(``)));o{console.log(...Bw(s)),Lw.forEach(t=>t.print(s))},mD=(...s)=>{console.warn(...Bw(s)),s.unshift(vp),Lw.forEach(t=>t.print(s))},Lw=Oi(),Iw=s=>({[Symbol.iterator](){return this},next:s}),SD=(s,t)=>Iw(()=>{let i;do i=s.next();while(!i.done&&!t(i.value));return i}),Xh=(s,t)=>Iw(()=>{const{done:i,value:r}=s.next();return{done:i,value:i?void 0:t(r)}});class wp{constructor(t,i){this.clock=t,this.len=i}}class Jc{constructor(){this.clients=new Map}}const Hw=(s,t,i)=>t.clients.forEach((r,a)=>{const o=s.doc.store.clients.get(a);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=s.length-1;for(;i<=r;){const a=kn((i+r)/2),o=s[a],u=o.clock;if(u<=t){if(t{const i=s.clients.get(t.client);return i!==void 0&&vD(i,t.clock)!==null},bp=s=>{s.clients.forEach(t=>{t.sort((a,o)=>a.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new wp(a.clock,Qr(a.len,o.clock+o.len-a.clock)):(r{const t=new Jc;for(let i=0;i{if(!t.clients.has(a)){const o=r.slice();for(let u=i+1;u{vs(s.clients,t,()=>[]).push(new wp(i,r))},Ep=(s,t)=>{At(s.restEncoder,t.clients.size),ni(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{s.resetDsCurVal(),At(s.restEncoder,i);const a=r.length;At(s.restEncoder,a);for(let o=0;o{const t=new Jc,i=bt(s.restDecoder);for(let r=0;r0){const u=vs(t.clients,a,()=>[]);for(let d=0;d{const r=new Jc,a=bt(s.restDecoder);for(let o=0;o0){const o=new Xc;return At(o.restEncoder,0),Ep(o,r),o.toUint8Array()}return null},Kw=hw;class Xr extends aw{constructor({guid:t=cR(),collectionid:i=null,gc:r=!0,gcFilter:a=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=a,this.clientID=Kw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new Yw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=qS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>qS(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ni(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Oe){const r=vs(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),a=r.constructor;if(i!==Oe&&a!==i)if(a===Oe){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Nr)}getText(t=``){return this.get(t,Gr)}getMap(t=``){return this.get(t,$r)}getXmlElement(t=``){return this.get(t,Yr)}getXmlFragment(t=``){return this.get(t,Ri)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,ni(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Xr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const a=i.doc;t.deleted||r.subdocsAdded.add(a),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class ED{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return bt(this.restDecoder)}readDsLen(){return bt(this.restDecoder)}}class CD extends ED{readLeftID(){return Rt(bt(this.restDecoder),bt(this.restDecoder))}readRightID(){return Rt(bt(this.restDecoder),bt(this.restDecoder))}readClient(){return bt(this.restDecoder)}readInfo(){return Kr(this.restDecoder)}readString(){return Ai(this.restDecoder)}readParentInfo(){return bt(this.restDecoder)===1}readTypeRef(){return bt(this.restDecoder)}readLen(){return bt(this.restDecoder)}readAny(){return ua(this.restDecoder)}readBuf(){return TR(je(this.restDecoder))}readJSON(){return JSON.parse(Ai(this.restDecoder))}readKey(){return Ai(this.restDecoder)}}class xD{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=bt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=bt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Oc extends xD{constructor(t){super(t),this.keys=[],bt(t),this.keyClockDecoder=new Qh(je(t)),this.clientDecoder=new uc(je(t)),this.leftClockDecoder=new Qh(je(t)),this.rightClockDecoder=new Qh(je(t)),this.infoDecoder=new HS(je(t),Kr),this.stringDecoder=new lR(je(t)),this.parentInfoDecoder=new HS(je(t),Kr),this.typeRefDecoder=new uc(je(t)),this.lenDecoder=new uc(je(t))}readLeftID(){return new jr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new jr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ua(this.restDecoder)}readBuf(){return je(this.restDecoder)}readJSON(){return ua(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Qr(r,t[0].id.clock);const a=$n(t,r);At(s.restEncoder,t.length-a),s.writeClient(i),At(s.restEncoder,r);const o=t[a];o.write(s,r-o.id.clock);for(let u=a+1;u{const r=new Map;i.forEach((a,o)=>{ve(t,o)>a&&r.set(o,a)}),Cp(t).forEach((a,o)=>{i.has(o)||r.set(o,0)}),At(s.restEncoder,r.size),ni(r.entries()).sort((a,o)=>o[0]-a[0]).forEach(([a,o])=>{OD(s,t.clients.get(a),a,o)})},RD=(s,t)=>{const i=Fe(),r=bt(s.restDecoder);for(let a=0;a{const r=[];let a=ni(i.keys()).sort((b,w)=>b-w);if(a.length===0)return null;const o=()=>{if(a.length===0)return null;let b=i.get(a[a.length-1]);for(;b.refs.length===b.i;)if(a.pop(),a.length>0)b=i.get(a[a.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new Yw,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),a=a.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==Rn){const w=vs(y,m.id.client,()=>ve(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(s,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new Xc;return Vw(b,d,new Map),At(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},MD=(s,t)=>Vw(s,t.doc.store,t.beforeState),kD=(s,t,i,r=new Oc(s))=>$t(t,a=>{a.local=!1;let o=!1;const u=a.doc,d=u.store,p=RD(r,u),g=DD(a,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=PS([m.update,g.update])}}else d.pendingStructs=g;const y=GS(r,a,d);if(d.pendingDs){const v=new Oc(qr(d.pendingDs));bt(v.restDecoder);const b=GS(v,a,d);y&&b?d.pendingDs=PS([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,$w(a.doc,v)}},i,!1),$w=(s,t,i,r=Oc)=>{const a=qr(t);kD(a,s,i,new r(a))},YS=(s,t,i)=>$w(s,t,i,CD);class UD{constructor(){this.l=[]}}const QS=()=>new UD,FS=(s,t)=>s.l.push(t),JS=(s,t)=>{const i=s.l,r=i.length;s.l=i.filter(a=>t!==a),r===s.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Gw=(s,t,i)=>dp(s.l,[t,i]);class jr{constructor(t,i){this.client=t,this.clock=i}}const Xo=(s,t)=>s===t||s!==null&&t!==null&&s.client===t.client&&s.clock===t.clock,Rt=(s,t)=>new jr(s,t),zD=s=>{for(const[t,i]of s.doc.share.entries())if(i===s)return t;throw bn()},Ar=(s,t)=>t===void 0?!s.deleted:t.sv.has(s.id.client)&&(t.sv.get(s.id.client)||0)>s.id.clock&&!qw(t.ds,s.id),Ud=(s,t)=>{const i=vs(s.meta,Ud,Oi),r=s.doc.store;i.has(t)||(t.sv.forEach((a,o)=>{a{}),i.add(t))};class Yw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Cp=s=>{const t=new Map;return s.clients.forEach((i,r)=>{const a=i[i.length-1];t.set(r,a.id.clock+a.length)}),t},ve=(s,t)=>{const i=s.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},Qw=(s,t)=>{let i=s.clients.get(t.id.client);if(i===void 0)i=[],s.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},$n=(s,t)=>{let i=0,r=s.length-1,a=s[r],o=a.id.clock;if(o===t)return r;let u=kn(t/(o+a.length-1)*r);for(;i<=r;){if(a=s[u],o=a.id.clock,o<=t){if(t{const i=s.clients.get(t.client);return i[$n(i,t.clock)]},Zh=jD,zd=(s,t,i)=>{const r=$n(t,i),a=t[r];return a.id.clock{const i=s.doc.store.clients.get(t.client);return i[zd(s,i,t.clock)]},XS=(s,t,i)=>{const r=t.clients.get(i.client),a=$n(r,i.clock),o=r[a];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(a+1,0,zc(s,o,i.clock-o.id.clock+1)),o},ND=(s,t,i)=>{const r=s.clients.get(t.id.client);r[$n(r,t.id.clock)]=i},Fw=(s,t,i,r,a)=>{if(r===0)return;const o=i+r;let u=zd(s,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!OO(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(bp(t.deleteSet),MD(s,t),Ep(s,t.deleteSet),!0),WS=(s,t,i)=>{const r=t._item;(r===null||r.id.clock<(s.beforeState.get(r.id.client)||0)&&!r.deleted)&&vs(s.changed,t,Oi).add(i)},fc=(s,t)=>{let i=s[t],r=s[t-1],a=t;for(;a>0;i=r,r=s[--a-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof de&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-a;return o&&s.splice(t+1-o,o),o},LD=(s,t,i)=>{for(const[r,a]of s.clients.entries()){const o=t.clients.get(r);for(let u=a.length-1;u>=0;u--){const d=a[u],p=d.clock+d.len;for(let g=$n(o,d.clock),m=o[g];g{s.clients.forEach((i,r)=>{const a=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=ow(a.length-1,1+$n(a,u.clock+u.len-1));for(let p=d,g=a[p];p>0&&g.id.clock>=u.clock;g=a[p])p-=1+fc(a,p)}})},Jw=(s,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),d.push(()=>{Gw(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&iM(i)})}),dp(d,[])}finally{r.gc&&LD(o,a,r.gcFilter),ID(o,a),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=a.clients.get(y),w=Qr($n(b,v),1);for(let E=b.length-1;E>=w;)E-=1+fc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=a.clients.get(y),w=$n(b,v);w+11||w>0&&fc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(yD(vp,zw,`[yjs] `,jw,Nw,`Changed the client-id because another client seems to be using it.`),r.clientID=Kw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new TD;ZS(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new Xc;ZS(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),s.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,s])):Jw(s,t+1)}}},$t=(s,t,i=null,r=!0)=>{const a=s._transactionCleanups;let o=!1,u=null;s._transaction===null&&(o=!0,s._transaction=new BD(s,i,r),a.push(s._transaction),a.length===1&&s.emit(`beforeAllTransactions`,[s]),s.emit(`beforeTransaction`,[s._transaction,s]));try{u=t(s._transaction)}finally{if(o){const d=s._transaction===a[0];s._transaction=null,d&&Jw(a,0)}}return u};function*HD(s){const t=bt(s.restDecoder);for(let i=0;i{if(s.constructor===vn){const{client:i,clock:r}=s.id;return new vn(Rt(i,r+t),s.length-t)}else if(s.constructor===Rn){const{client:i,clock:r}=s.id;return new Rn(Rt(i,r+t),s.length-t)}else{const i=s,{client:r,clock:a}=i.id;return new de(Rt(r,a+t),null,Rt(r,a+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},PS=(s,t=Oc,i=Xc)=>{if(s.length===1)return s[0];const r=s.map(m=>new t(qr(m)));let a=r.map(m=>new qD(m,!0)),o=null;const u=new i,d=new KD(u);for(;a=a.filter(v=>v.curr!==null),a.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===Rn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),a.length!==0;){const m=a[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Yl(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Rn?o.struct.length-=w:v=VD(v,w)),o.struct.mergeWith(v)||(Yl(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==Rn;v=m.next())Yl(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Yl(d,o.struct,o.offset),o=null),$D(d);const p=r.map(m=>bD(m)),g=wD(p);return Ep(u,g),u.toUint8Array()},Xw=s=>{s.written>0&&(s.clientStructs.push({written:s.written,restEncoder:wn(s.encoder.restEncoder)}),s.encoder.restEncoder=Fr(),s.written=0)},Yl=(s,t,i)=>{s.written>0&&s.currClient!==t.id.client&&Xw(s),s.written===0&&(s.currClient=t.id.client,s.encoder.writeClient(t.id.client),At(s.encoder.restEncoder,t.id.clock+i)),t.write(s.encoder,i),s.written++},$D=s=>{Xw(s);const t=s.encoder.restEncoder;At(t,s.clientStructs.length);for(let i=0;i{if(a!==null){const o=i._map.get(a);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Vh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Vh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Vh(o.content.getContent());else return;t.set(a,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(tv);const i=this.target,r=Oi(),a=Oi(),o=[];if(t={added:r,deleted:a,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,a.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const GD=(s,t)=>{const i=[];for(;t._item!==null&&t!==s;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,a=t._item.parent._start;for(;a!==t._item&&a!==null;)!a.deleted&&a.countable&&(r+=a.length),a=a.right;i.unshift(r)}t=t._item.parent}return i},ke=()=>{mD(`Invalid access: Add Yjs type to a document before reading data.`)},Zw=80;let xp=0;class YD{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=xp++}}const QD=s=>{s.timestamp=xp++},Ww=(s,t,i)=>{s.p.marker=!1,s.p=t,t.marker=!0,s.index=i,s.timestamp=xp++},FD=(s,t,i)=>{if(s.length>=Zw){const r=s.reduce((a,o)=>a.timestamp{if(s._start===null||t===0||s._searchMarker===null)return null;const i=s._searchMarker.length===0?null:s._searchMarker.reduce((o,u)=>oc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(a-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(a-=r.length);return i!==null&&oc(i.index-a){for(let r=s.length-1;r>=0;r--){const a=s[r];if(i>0){let o=a.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(a.index-=o.length);if(o===null||o.marker===!0){s.splice(r,1);continue}a.p=o,o.marker=!0}(t0&&t===a.index)&&(a.index=Qr(t,a.index+i))}},Pc=(s,t,i)=>{const r=s,a=t.changedParentTypes;for(;vs(a,s,()=>[]).push(i),s._item!==null;)s=s._item.parent;Gw(r._eH,i,t)};class Oe{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=QS(),this._dEH=QS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw Mn()}clone(){throw Mn()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){FS(this._eH,t)}observeDeep(t){FS(this._dEH,t)}unobserve(t){JS(this._eH,t)}unobserveDeep(t){JS(this._dEH,t)}toJSON(){}}const Pw=(s,t,i)=>{s.doc??ke(),t<0&&(t=s._length+t),i<0&&(i=s._length+i);let r=i-t;const a=[];let o=s._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)a.push(u[d]),r--;t=0}}o=o.right}return a},tb=s=>{s.doc??ke();const t=[];let i=s._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let a=0;a{let i=0,r=s._start;for(s.doc??ke();r!==null;){if(r.countable&&!r.deleted){const a=r.content.getContent();for(let o=0;o{const i=[];return ga(s,(r,a)=>{i.push(t(r,a,s))}),i},JD=s=>{let t=s._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const a=i[r++];return i.length<=r&&(i=null),{done:!1,value:a}}}},nb=(s,t)=>{s.doc??ke();const i=Wc(s,t);let r=s._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let a=i;const o=s.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Di(g)),a.integrate(s,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Ea(new Uint8Array(y))),a.integrate(s,0);break;case Xr:a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new Ca(y)),a.integrate(s,0);break;default:if(y instanceof Oe)a=new de(Rt(u,ve(d,u)),a,a&&a.lastId,p,p&&p.id,t,null,new bs(y)),a.integrate(s,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},sb=()=>Vn(`Length exceeded!`),ib=(s,t,i,r)=>{if(i>t._length)throw sb();if(i===0)return t._searchMarker&&pa(t._searchMarker,i,r.length),Rc(s,t,null,r);const a=i,o=Wc(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let a=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(a)for(;a.right;)a=a.right;return Rc(s,t,a,i)},rb=(s,t,i,r)=>{if(r===0)return;const a=i,o=r,u=Wc(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw sb();t._searchMarker&&pa(t._searchMarker,a,-o+r)},Dc=(s,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(s)},_p=(s,t,i,r)=>{const a=t._map.get(i)||null,o=s.doc,u=o.clientID;let d;if(r==null)d=new Di([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new Di([r]);break;case Uint8Array:d=new Ea(r);break;case Xr:d=new Ca(r);break;default:if(r instanceof Oe)d=new bs(r);else throw new Error(`Unexpected content type`)}new de(Rt(u,ve(o.store,u)),a,a&&a.lastId,null,null,t,i,d).integrate(s,0)},Tp=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},lb=s=>{const t={};return s.doc??ke(),s._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},ab=(s,t)=>{s.doc??ke();const i=s._map.get(t);return i!==void 0&&!i.deleted},ZD=(s,t)=>{const i={};return s._map.forEach((r,a)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Ar(o,t)&&(i[a]=o.content.getContent()[o.length-1])}),i},Zo=s=>(s.doc??ke(),SD(s._map.entries(),t=>!t[1].deleted));class WD extends Zc{}class Nr extends Oe{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Nr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Nr}clone(){const t=new Nr;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._length}_callObserver(t,i){super._callObserver(t,i),Pc(this,t,new WD(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{XD(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{rb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return nb(this,t)}toArray(){return tb(this)}slice(t=0,i=this.length){return Pw(this,t,i)}toJSON(){return this.map(t=>t instanceof Oe?t.toJSON():t)}map(t){return eb(this,t)}forEach(t){ga(this,t)}[Symbol.iterator](){return JD(this)}_write(t){t.writeTypeRef(CM)}}const PD=s=>new Nr;class tM extends Zc{constructor(t,i,r){super(t,i),this.keysChanged=r}}class $r extends Oe{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,a)=>{this.set(a,r)}),this._prelimContent=null}_copy(){return new $r}clone(){const t=new $r;return this.forEach((i,r)=>{t.set(r,i instanceof Oe?i.clone():i)}),t}_callObserver(t,i){Pc(this,t,new tM(this,t,i))}toJSON(){this.doc??ke();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const a=i.content.getContent()[i.length-1];t[r]=a instanceof Oe?a.toJSON():a}}),t}get size(){return[...Zo(this)].length}keys(){return Xh(Zo(this),t=>t[0])}values(){return Xh(Zo(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return Xh(Zo(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??ke(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Tp(this,t)}has(t){return ab(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,a){Dc(t,a,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(xM)}}const eM=s=>new $r,Ps=(s,t)=>s===t||typeof s==`object`&&typeof t==`object`&&s&&t&&SR(s,t);class jd{constructor(t,i,r,a){this.left=t,this.right=i,this.index=r,this.currentAttributes=a}forward(){this.right===null&&bn(),this.right.content.constructor===pe?this.right.deleted||Zr(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}}const ev=(s,t,i)=>{for(;t.right!==null&&i>0;)t.right.content.constructor===pe?t.right.deleted||Zr(t.currentAttributes,t.right.content):t.right.deleted||(i{const a=new Map,o=r?Wc(t,i):null;if(o){const u=new jd(o.p.left,o.p,o.index,a);return ev(s,u,i-o.index)}else{const u=new jd(null,t._start,0,a);return ev(s,u,i)}},ob=(s,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===pe&&Ps(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const a=s.doc,o=a.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new de(Rt(o,ve(a.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new pe(d,u));m.integrate(s,0),i.right=m,i.forward()})},Zr=(s,t)=>{const{key:i,value:r}=t;r===null?s.delete(i):s.set(i,r)},cb=(s,t)=>{for(;s.right!==null;){if(!(s.right.deleted||s.right.content.constructor===pe&&Ps(t[s.right.content.key]??null,s.right.content.value)))break;s.forward()}},ub=(s,t,i,r)=>{const a=s.doc,o=a.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Ps(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new de(Rt(o,ve(a.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new pe(d,p)),i.right.integrate(s,0),i.forward()}}return u},Wh=(s,t,i,r,a)=>{i.currentAttributes.forEach((v,b)=>{a[b]===void 0&&(a[b]=null)});const o=s.doc,u=o.clientID;cb(i,a);const d=ub(s,t,i,a),p=r.constructor===String?new Gn(r):r instanceof Oe?new bs(r):new Bi(r);let{left:g,right:m,index:y}=i;t._searchMarker&&pa(t._searchMarker,i.index,p.getLength()),m=new de(Rt(u,ve(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(s,0),i.right=m,i.index=y,i.forward(),ob(s,t,i,d)},nv=(s,t,i,r,a)=>{const o=s.doc,u=o.clientID;cb(i,a);const d=ub(s,t,i,a);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===pe));){if(!i.right.deleted)switch(i.right.content.constructor){case pe:{const{key:p,value:g}=i.right.content,m=a[p];if(m!==void 0){if(Ps(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(s)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` -`;i.right=new de(Rt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Gn(p)),i.right.integrate(s,0),i.forward()}ob(s,t,i,d)},fb=(s,t,i,r,a)=>{let o=t;const u=Fe();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===pe){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;if(g.constructor===pe){const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(s),d++,!p&&(a.get(m)??null)===y&&v!==y&&(v===null?a.delete(m):a.set(m,v))),!p&&!t.deleted&&Zr(a,g)}}t=t.right}return d},nM=(s,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===pe){const r=t.content.key;i.has(r)?t.delete(s):i.add(r)}t=t.left}},sM=s=>{let t=0;return $t(s.doc,i=>{let r=s._start,a=s._start,o=Fe();const u=Td(o);for(;a;)a.deleted===!1&&(a.content.constructor===pe?Zr(u,a.content):(t+=fb(i,r,a,o,u),o=Td(u),r=a)),a=a.right}),t},iM=s=>{const t=new Set,i=s.doc;for(const[r,a]of s.afterState.entries()){const o=s.beforeState.get(r)||0;a!==o&&Fw(s,i.store.clients.get(r),o,a,u=>{!u.deleted&&u.content.constructor===pe&&u.constructor!==vn&&t.add(u.parent)})}$t(i,r=>{Hw(s,s.deleteSet,a=>{if(a instanceof vn||!a.parent._hasFormatting||t.has(a.parent))return;const o=a.parent;a.content.constructor===pe?t.add(o):nM(r,a)});for(const a of t)sM(a)})},sv=(s,t,i)=>{const r=i,a=Td(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bs:case Bi:case Gn:i{a===null?this.childListChanged=!0:this.keysChanged.add(a)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const a=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},a.size>0&&(b.attributes={},a.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},mR(p)||(b.attributes=pR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case bs:case Bi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case Gn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case pe:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=a.get(b)??null;Ps(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Ps(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=a.get(b)??null;Ps(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Ps(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Zr(a,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Gr extends Oe{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??ke(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Gr}clone(){const t=new Gr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new rM(this,t,i);Pc(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??ke();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Gn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const a=new jd(null,this._start,0,new Map);for(let o=0;o0)&&Wh(r,this,a,d,u.attributes||{})}else u.retain!==void 0?nv(r,this,a,u.retain,u.attributes||{}):u.delete!==void 0&&sv(r,a,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??ke();const a=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),a.push(b),d=``}}const m=()=>{for(;p!==null;){if(Ar(p,t)||i!==void 0&&Ar(p,i))switch(p.content.constructor){case Gn:{const y=o.get(`ychange`);t!==void 0&&!Ar(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Ar(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case bs:case Bi:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}a.push(y);break}case pe:Ar(p,t)&&(g(),Zr(o,p.content));break}p=p.right}g()};return t||i?$t(u,y=>{t&&Ud(y,t),i&&Ud(y,i),m()},`cleanup`):m(),a}insert(t,i,r){if(i.length<=0)return;const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),Wh(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!r);Wh(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,a=>{sv(a,Wo(a,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const a=this.doc;a!==null?$t(a,o=>{const u=Wo(o,this,t,!1);u.right!==null&&nv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Tp(this,t)}getAttributes(){return lb(this)}_write(t){t.writeTypeRef(_M)}}const lM=s=>new Gr;class Ph{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??ke()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Yr||i.constructor===Ri)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ri extends Oe{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ri}clone(){const t=new Ri;return t.insert(0,this.toArray().map(i=>i instanceof Oe?i.clone():i)),t}get length(){return this.doc??ke(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Ph(this,t)}querySelector(t){t=t.toUpperCase();const r=new Ph(this,a=>a.nodeName&&a.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),ni(new Ph(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){Pc(this,t,new cM(this,i,t))}toString(){return eb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const a=t.createDocumentFragment();return r!==void 0&&r._createAssociation(a,this),ga(this,o=>{a.insertBefore(o.toDOM(t,i,r),null)}),a}insert(t,i){this.doc!==null?$t(this.doc,r=>{ib(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const a=t&&t instanceof Oe?t._item:t;Rc(r,this,a,i)});else{const r=this._prelimContent,a=t===null?0:r.findIndex(o=>o===t)+1;if(a===0&&t!==null)throw Vn(`Reference item not found`);r.splice(a,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{rb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return tb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return nb(this,t)}slice(t=0,i=this.length){return Pw(this,t,i)}forEach(t){ga(this,t)}_write(t){t.writeTypeRef(AM)}}const aM=s=>new Ri;class Yr extends Ri{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,a)=>{this.setAttribute(a,r)}),this._prelimAttrs=null}_copy(){return new Yr(this.nodeName)}clone(){const t=new Yr(this.nodeName),i=this.getAttributes();return yR(i,(r,a)=>{t.setAttribute(a,r)}),t.insert(0,this.toArray().map(r=>r instanceof Oe?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const a=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{Dc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{_p(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Tp(this,t)}hasAttribute(t){return ab(this,t)}getAttributes(t){return t?ZD(this,t):lb(this)}toDOM(t=document,i={},r){const a=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&a.setAttribute(u,d)}return ga(this,u=>{a.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(a,this),a}_write(t){t.writeTypeRef(TM),t.writeKey(this.nodeName)}}const oM=s=>new Yr(s.readKey());class cM extends Zc{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(a=>{a===null?this.childListChanged=!0:this.attributesChanged.add(a)})}}class Mc extends $r{constructor(t){super(),this.hookName=t}_copy(){return new Mc(this.hookName)}clone(){const t=new Mc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const a=i[this.hookName];let o;return a!==void 0?o=a.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(OM),t.writeKey(this.hookName)}}const uM=s=>new Mc(s.readKey());class kc extends Gr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new kc}clone(){const t=new kc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const a=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(a,this),a}toString(){return this.toDelta().map(t=>{const i=[];for(const a in t.attributes){const o=[];for(const u in t.attributes[a])o.push({key:u,value:t.attributes[a][u]});o.sort((u,d)=>u.keya.nodeName`}r+=t.insert;for(let a=i.length-1;a>=0;a--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(RM)}}const fM=s=>new kc;class Ap{constructor(t,i){this.id=t,this.length=i}get deleted(){throw Mn()}mergeWith(t){return!1}write(t,i,r){throw Mn()}integrate(t,i){throw Mn()}}const hM=0;class vn extends Ap{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),Qw(t.doc.store,this)}write(t,i){t.writeInfo(hM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Ea{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Ea(this.content)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const dM=s=>new Ea(s.readBuf());class ya{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new ya(this.len)}splice(t){const i=new ya(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Ac(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const pM=s=>new ya(s.readLen()),hb=(s,t)=>new Xr({guid:s,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Ca{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Ca(hb(this.doc.guid,this.opts))}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const gM=s=>new Ca(hb(s.readString(),s.readAny()));class Bi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Bi(this.embed)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const yM=s=>new Bi(s.readJSON());class pe{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new pe(this.key,this.value)}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const mM=s=>new pe(s.readKey(),s.readJSON());class Uc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Uc(this.arr)}splice(t){const i=new Uc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let a=i;a{const t=s.readLen(),i=[];for(let r=0;r{const t=s.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const bM=s=>new Gn(s.readString()),EM=[PD,eM,lM,oM,aM,uM,fM],CM=0,xM=1,_M=2,TM=3,AM=4,OM=5,RM=6;class bs{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bs(this.type._copy())}splice(t){throw Mn()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const DM=s=>new bs(EM[s.readTypeRef()](s)),zc=(s,t,i)=>{const{client:r,clock:a}=t.id,o=new de(Rt(r,a+i),t,Rt(r,a+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),s._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class de extends Ap{constructor(t,i,r,a,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=a,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?US:0}set marker(t){(this.info&Gh)>0!==t&&(this.info^=Gh)}get marker(){return(this.info&Gh)>0}get keep(){return(this.info&kS)>0}set keep(t){this.keep!==t&&(this.info^=kS)}get countable(){return(this.info&US)>0}get deleted(){return(this.info&$h)>0}set deleted(t){this.deleted!==t&&(this.info^=$h)}markDeleted(){this.info|=$h}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===jr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=XS(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=si(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===de?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===de&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===jr){const r=Zh(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=XS(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,a;if(r!==null)a=r.right;else if(this.parentSub!==null)for(a=this.parent._map.get(this.parentSub)||null;a!==null&&a.left!==null;)a=a.left;else a=this.parent._start;const o=new Set,u=new Set;for(;a!==null&&a!==this.right;){if(u.add(a),o.add(a),Xo(this.origin,a.origin)){if(a.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Ac(t.deleteSet,this.id.client,this.id.clock,this.length),WS(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?ND(t,this,new vn(this.id,this.length)):this.content=new ya(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,a=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Hc|(r===null?0:ln)|(a===null?0:ms)|(o===null?0:aa);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),a!==null&&t.writeRightID(a),r===null&&a===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=zD(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===jr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const db=(s,t)=>MM[t&Hc](s),MM=[()=>{bn()},pM,SM,dM,bM,yM,mM,DM,wM,gM,()=>{bn()}],kM=10;class Rn extends Ap{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(kM),At(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const pb=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},gb=`__ $YJS$ __`;pb[gb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);pb[gb]=!0;const td=3e4;class UM extends MO{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const i=Ec();this.getLocalState()!==null&&td/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((a,o)=>{o!==this.clientID&&td<=i-a.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&zM(this,r,`timeout`)},kn(td/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),a=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:a,lastUpdated:Ec()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),Ur(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const zM=(s,t,i)=>{const r=[];for(let a=0;a0&&(s.emit(`change`,[{added:[],updated:[],removed:r},i]),s.emit(`update`,[{added:[],updated:[],removed:r},i]))},iv=(s,t,i=s.states)=>{const r=t.length,a=Fr();At(a,r);for(let o=0;o{const r=qr(t),a=Ec(),o=[],u=[],d=[],p=[],g=bt(r);for(let m=0;m0||d.length>0||p.length>0)&&s.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&s.emit(`update`,[{added:o,updated:u,removed:p},i])},NM={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},BM=15e3;var LM=class hc extends aw{doc;awareness;baseUrl;docId;headers;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return NM[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const a=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${a}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const a=r.headers.get(`location`);if(a){const u=new URL(a,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const a=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!a.ok){if(a.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${a.status}`)}const o=new Uint8Array(await a.arrayBuffer());o.length>0&&YS(this.doc,o,`server`);const u=a.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(a){if(this.isNotFoundError(a)){await this.discoverSnapshot(t);return}throw a}}createUpdatesProducer(t){const i=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Sv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:a=>{a instanceof Error&&a.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,a),this.emit(`error`,[a]),this.isAuthError(a)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let a=!1,o,u;const d=new Promise((p,g)=>{o=()=>{a||(a=!0,p())},u=m=>{a||(a=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,a,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,a())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Hn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:`sse`,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Fr();return Qe(i,t),wn(i)}applyUpdates(t){if(t.length===0)return;const i=qr(t);for(;Dd(i);){const r=je(i);YS(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qr(t);for(;Dd(i);){const r=je(i);try{jM(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(hc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},BM),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:a,removed:o}=t;r.concat(a).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=iv(this.awareness,[this.awareness.clientID]);new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(hc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:a}=t,o=i.concat(r).concat(a),u=iv(this.awareness,o);await new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(hc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Hn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const a=await r.stream({offset:`now`,live:`sse`,signal:i});a.closed.catch(()=>{}),a.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await a.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(a){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(a)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,a),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof ti&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof ti&&(t.status===401||t.status===403)}};const yb=W.createContext(null);function IM(){const s=W.useContext(yb);if(!s)throw new Error(`useGameRoom must be used within GameRoom`);return s}function HM(s,t){return sw({streamOptions:{url:s,headers:t,contentType:`application/json`},state:MS,actions:({db:i,stream:r})=>({submitScore:{onMutate:a=>{i.collections.scores.insert(a)},mutationFn:async a=>{const o=crypto.randomUUID();await r.append(JSON.stringify(MS.scores.insert({value:a,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const rv=W.createContext(null);function qM({roomId:s,children:t}){const{dsEndpoint:i,dsHeaders:r}=Bd(),[a,o]=W.useState(null),[u,d]=W.useState(null);return W.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(s)}`,w=await new Hn({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Hn.create({url:v,headers:r,contentType:`application/json`}),p=await HM(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[s,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),a?Q.jsx(rv.Provider,{value:{scoresDB:a},children:t}):Q.jsx(rv.Provider,{value:null,children:t})}const Qt=14,KM=30,VM=25,lv=120,$M=1500,Po=.5,GM=1,xr=8,av=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`};function YM(s){const t=s.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:KM,rows:VM}}const _r={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function Wl(s){return s.getMap(`territoryCell`)}function Ci(s){return s.getMap(`players`)}function ed(s,t){const i=Ci(s),r=new Map;return i.forEach((a,o)=>{o!==t&&r.set(o,a)}),r}function QM(s){const t=Wl(s),i=new Map;return t.forEach((r,a)=>{i.set(a,r)}),i}function FM(s,t){let i=0;return s.forEach(r=>{r.owner===t&&i++}),i}function JM(s,t,i,r,a){const o=new Set,u=new Set;t.forEach((m,y)=>{m.owner===s?o.add(y):a.has(m.owner)&&u.add(y)});const d=new Set,p=[];for(let m=0;m0;){const{x:m,y}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=m+v,E=y+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let m=0;mYM(r),[r]),g=d*p,[m,y]=W.useState(new Map),[v,b]=W.useState(new Map),[w,E]=W.useState({x:0,y:0}),[T,N]=W.useState(1),[D,A]=W.useState(!1),[z,L]=W.useState(!1),[I,K]=W.useState(null),X=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),tt=W.useRef(void 0),nt=W.useRef(null),J=W.useRef({x:0,y:0,stunnedUntil:0}),lt=W.useMemo(()=>FM(m,a)*GM,[m,a]),at=W.useMemo(()=>Math.round(lt/g*100),[lt,g]),Nt=W.useMemo(()=>{const et=new Map;return m.forEach(P=>{et.set(P.owner,(et.get(P.owner)||0)+1)}),et},[m]),ht=W.useMemo(()=>{let et=0,P=``;if(Nt.forEach((Mt,kt)=>{Mt>et&&(et=Mt,P=kt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===a)return{name:o,pct:pt};const gt=v.get(P);return gt?{name:gt.name,pct:pt}:null},[Nt,g,a,o,v]);W.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);J.current={x:et,y:P,stunnedUntil:0},E({x:et,y:P});const pt=Ci(t);pt.set(a,{x:et,y:P,name:o,color:u});const gt=Wl(t);return t.transact(()=>{gt.set(`${et},${P}`,{owner:a,claimedAt:Date.now()})}),()=>{pt.delete(a)}},[t,a,o,u,d,p]),W.useEffect(()=>{const et=Wl(t),P=()=>{const pt=QM(t);y(pt);const gt=new Map;pt.forEach(kt=>{gt.set(kt.owner,(gt.get(kt.owner)||0)+1)});const Mt=Po*g;gt.forEach((kt,te)=>{if(kt>=Mt){const Ue=Ci(t).get(te);Ue?K(Ue.name):te===a&&K(o)}})};return et.observe(P),P(),()=>et.unobserve(P)},[t,g,a,o]),W.useEffect(()=>{const et=Ci(t),P=()=>{b(ed(t,a))};return et.observe(P),P(),()=>et.unobserve(P)},[t,a]),W.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((Mt,kt)=>{if(kt!==i.clientID){Mt.playerId&&P.add(Mt.playerId);const te=Mt.user?.name;te&&pt.add(te)}}),N(Mt=>{const kt=pt.size;return Mt===kt?Mt:kt});const gt=Ci(t);gt.forEach((Mt,kt)=>{kt!==a&&!P.has(kt)&>.delete(kt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,a,o]),W.useEffect(()=>{const et=new Set,P=gt=>{if(gt.key in _r){gt.preventDefault();const Mt=!nt.current;et.add(gt.key),nt.current=_r[gt.key],Mt&&F.current?.(_r[gt.key])}},pt=gt=>{if(et.delete(gt.key),gt.key in _r){let Mt=!1;for(const kt of et)if(kt in _r){nt.current=_r[kt],Mt=!0;break}Mt||(nt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,pt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,pt)}},[]);const M=W.useRef(null),q=W.useRef(null),Z=W.useRef(0),rt=10,ft=W.useCallback((et,P)=>{const pt=Date.now();if(pt-Z.currentMath.abs(Cs)?F.current?.({dx:Qn>0?1:-1,dy:0}):F.current?.({dx:0,dy:Cs>0?1:-1}),Z.current=pt)},[]),_=W.useCallback(et=>{et.preventDefault();const P=et.touches[0];q.current={x:P.clientX,y:P.clientY},ft(P.clientX,P.clientY)},[ft]),H=W.useCallback(et=>{if(et.preventDefault(),!q.current)return;const P=et.touches[0],pt=P.clientX-q.current.x,gt=P.clientY-q.current.y;Math.abs(pt){q.current=null},[]),F=W.useRef(void 0),ct=W.useCallback(et=>{const P=M.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const gt=P.getScreenCTM();if(!gt)return;const Mt=pt.matrixTransform(gt.inverse()),kt=Mt.x/Qt-.5,te=Mt.y/Qt-.5,Cn=J.current,Ue=kt-Cn.x,xn=te-Cn.y;Ue===0&&xn===0||(Math.abs(Ue)>Math.abs(xn)?F.current?.({dx:Ue>0?1:-1,dy:0}):F.current?.({dx:0,dy:xn>0?1:-1}))},[]),st=W.useCallback(()=>{s()},[s]);W.useEffect(()=>{const et=pt=>{const gt=J.current,Mt=Date.now();if(gt.stunnedUntil&&Mt_n.x===kt&&_n.y===te);if(Ue){const[_n,Li]=Ue,xs=Mt+$M;gt.stunnedUntil=xs;const _a=Ci(t);_a.set(_n,{...Li,stunnedUntil:xs}),_a.set(a,{x:gt.x,y:gt.y,name:o,color:u,stunnedUntil:xs});return}gt.x=kt,gt.y=te,E({x:kt,y:te}),i.setLocalState({...i.getLocalState(),x:kt,y:te}),Ci(t).set(a,{x:kt,y:te,name:o,color:u});const Qn=Wl(t),Cs=Date.now();t.transact(()=>{Qn.set(`${kt},${te}`,{owner:a,claimedAt:Cs})});const Re=new Set([a]);ed(t,a).forEach((_n,Li)=>Re.add(Li));const xa=JM(a,Qn,d,p,Re);xa.length>0&&t.transact(()=>{for(const _n of xa)Qn.set(`${_n.x},${_n.y}`,{owner:a,claimedAt:Cs})})};F.current=et;const P=setInterval(()=>{const pt=nt.current;pt&&et(pt)},lv);return()=>clearInterval(P)},[t,a,o,u,d,p]);const yt=d*Qt,Dt=p*Qt,wt=W.useCallback(()=>{navigator.clipboard.writeText(X).catch(()=>{}),A(!0),clearTimeout(tt.current),tt.current=setTimeout(()=>A(!1),1200)},[X]);W.useEffect(()=>()=>clearTimeout(tt.current),[]);const an=W.useMemo(()=>Q.jsxs(Q.Fragment,{children:[Array.from({length:d},(et,P)=>Q.jsx(`line`,{x1:P*Qt,y1:0,x2:P*Qt,y2:Dt,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>Q.jsx(`line`,{x1:0,y1:P*Qt,x2:yt,y2:P*Qt,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}),[d,p,yt,Dt]),Es=W.useMemo(()=>{const et=new Map;return et.set(a,u),v.forEach((P,pt)=>{et.set(pt,P.color)}),et},[a,u,v]);return Q.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Q.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } - .live-dot { animation: blink 1.5s ease-in-out infinite; } - @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } - .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),Q.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:yt,marginBottom:8,fontSize:xr},children:[Q.jsx(`button`,{onClick:st,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:xr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Q.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:wt,title:`Click to copy room name`,children:[Q.jsx(`span`,{style:{color:Vt.accent},children:o}),Q.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Q.jsx(`span`,{style:{color:D?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:D?`COPIED`:X})]}),Q.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(et=>!et),children:[T,` PLAYERS`,z&&Q.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:a,name:o,color:u},...Array.from(v.entries()).map(([et,P])=>({id:et,name:P.name,color:P.color}))].map(et=>{const P=Nt.get(et.id)||0,pt=Math.round(P/g*100);return Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Q.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Q.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:et.color,display:`inline-block`}}),et.name]}),Q.jsxs(`span`,{style:{color:Vt.accent},children:[pt,`%`]})]},et.id)})})]})]}),Q.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:yt,marginBottom:8,fontSize:xr},children:[Q.jsxs(`div`,{children:[Q.jsxs(`span`,{style:{fontSize:av,color:Vt.accent},children:[at,`%`]}),` `,Q.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Q.jsxs(`div`,{style:{textAlign:`right`},children:[Q.jsxs(`div`,{style:{marginBottom:ht?4:0,color:ht&&ht.pct>=Math.round(Po*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Po*100),`%`]}),ht&&Q.jsxs(`div`,{children:[Q.jsx(`span`,{style:{color:Vt.dim},children:ht.name}),` `,Q.jsxs(`span`,{style:{fontSize:av,color:Vt.accent},children:[ht.pct,`%`]})]})]})]}),Q.jsxs(`svg`,{ref:M,viewBox:`0 0 ${yt} ${Dt}`,onTouchStart:_,onTouchMove:H,onTouchEnd:Y,onClick:ct,style:{width:`100%`,maxWidth:yt,height:`auto`,background:Vt.grid,border:`1px solid ${Vt.border}`,flex:`1 1 auto`,minHeight:0,maxHeight:`calc(100dvh - 120px)`,objectFit:`contain`,userSelect:`none`,WebkitUserSelect:`none`},children:[an,Array.from(m.entries()).map(([et,P])=>{const[pt,gt]=et.split(`,`).map(Number),Mt=Es.get(P.owner)||Vt.accent;return Q.jsx(`rect`,{x:pt*Qt,y:gt*Qt,width:Qt,height:Qt,fill:Mt,opacity:.5},et)}),Array.from(v.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=J.current.stunnedUntil>0&&Date.now(){const et=Wl(t);t.transact(()=>{Array.from(et.keys()).forEach(pt=>et.delete(pt))}),K(null)},style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Q.jsx(`button`,{onClick:st,style:{fontFamily:`inherit`,fontSize:xr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}const ov=[`#00E5FF`,`#FF3D71`,`#6eeb83`,`#ffbc42`,`#ee6352`,`#9ac2c9`,`#8acb88`,`#1be7ff`,`#C77DFF`,`#72EFDD`,`#F72585`,`#4ECDC4`];function ZM(s){return ov[s%ov.length]}function WM(s){let t=0;for(let i=0;i{const D=`player-${Math.random().toString(36).slice(2,10)}`,A=WM(r);return{playerId:D,playerColor:ZM(A)}}),[{doc:p,awareness:g}]=W.useState(()=>{const D=new Xr,A=new UM(D);return A.setLocalState({user:{name:r,color:d},playerId:u}),{doc:D,awareness:A}}),[m,y]=W.useState(!0),[v,b]=W.useState(!1),[w,E]=W.useState(null),T=W.useRef(null);W.useEffect(()=>{const D=new LM({doc:p,baseUrl:t,docId:s,awareness:g,headers:i,connect:!1});return D.on(`synced`,A=>{b(A),A&&y(!1)}),D.on(`status`,A=>{A===`connected`&&y(!1)}),D.on(`error`,A=>{E(A),y(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[s,p,g,t,i,r,d,u]),W.useEffect(()=>{const A=setInterval(()=>{const z=new Set([u]);if(g.getStates().forEach(K=>{K.playerId&&z.add(K.playerId)}),[...z].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(K=>K.roomId===s);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+lp*1e3})}catch{}},mO);return()=>clearInterval(A)},[g,o,s,u]),W.useEffect(()=>()=>{p.destroy()},[p]);const N=W.useMemo(()=>({doc:p,awareness:g,roomId:s,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:m}),[p,g,s,u,r,d,v,m]);return w?Q.jsxs(`div`,{style:nd.center,children:[Q.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Q.jsx(`button`,{onClick:a,style:nd.btn,children:`BACK`})]}):m?Q.jsxs(`div`,{style:nd.center,children:[Q.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Q.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Q.jsx(yb.Provider,{value:N,children:Q.jsx(qM,{roomId:s,children:Q.jsx(XM,{onLeave:a})})})}const nd={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},cv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],uv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function t2(){const s=cv[Math.floor(Math.random()*cv.length)],t=uv[Math.floor(Math.random()*uv.length)];return`${s} ${t}`}function e2(){return localStorage.getItem(`territory-player-name`)||t2()}function n2(){const[s,t]=W.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return W.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),s}function s2(){const s=n2(),{yjsEndpoint:t,yjsHeaders:i}=Bd(),[r,a]=W.useState(e2),o=u=>{a(u),localStorage.setItem(`territory-player-name`,u)};return s?Q.jsx(PM,{roomId:s,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Q.jsx(_O,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function i2(){return Q.jsx(Q1,{children:Q.jsx(EO,{children:Q.jsx(s2,{})})})}G1.createRoot(document.getElementById(`root`)).render(Q.jsx(i2,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index ed0f9efcf9..c3a79d32da 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From 498b54809d7e9bc728a4545250fb1a6ea0eab79e Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Wed, 1 Apr 2026 23:50:47 +0100 Subject: [PATCH 35/36] chore: update territory wars demo bundle - Local color assignment, enclosure steals, agent personalities - Rematch clears board, win overlay shows threshold Co-Authored-By: Claude Opus 4.6 (1M context) --- .../territory-wars/assets/index-BHXtFtbF.js | 42 ------------------- .../territory-wars/assets/index-CYvUTm66.js | 42 +++++++++++++++++++ .../public/demos/territory-wars/index.html | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 website/public/demos/territory-wars/assets/index-BHXtFtbF.js create mode 100644 website/public/demos/territory-wars/assets/index-CYvUTm66.js diff --git a/website/public/demos/territory-wars/assets/index-BHXtFtbF.js b/website/public/demos/territory-wars/assets/index-BHXtFtbF.js deleted file mode 100644 index 85182e1593..0000000000 --- a/website/public/demos/territory-wars/assets/index-BHXtFtbF.js +++ /dev/null @@ -1,42 +0,0 @@ -(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function uC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,`default`)?n.default:n}var vh={exports:{}},Va={};var N0;function fC(){if(N0)return Va;N0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var B0;function hC(){return B0||(B0=1,vh.exports=fC()),vh.exports}var Y=hC(),wh={exports:{}},$a={},bh={exports:{}},Eh={};var L0;function dC(){return L0||(L0=1,(function(n){function t(U,q){var W=U.length;U.push(q);t:for(;0>>1,ut=U[st];if(0>>1;st<_;){var H=2*(st+1)-1,Q=U[H],J=H+1,ot=U[J];if(0>l(Q,W))Jl(ot,Q)?(U[st]=ot,U[J]=W,st=J):(U[st]=Q,U[H]=W,st=H);else if(Jl(ot,W))U[st]=ot,U[J]=W,st=J;else break t}}return q}function l(U,q){var W=U.sortIndex-q.sortIndex;return W!==0?W:U.id-q.id}if(n.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var p=[],g=[],y=1,m=null,v=3,b=!1,w=!1,E=!1,T=!1,B=typeof setTimeout==`function`?setTimeout:null,D=typeof clearTimeout==`function`?clearTimeout:null,O=typeof setImmediate<`u`?setImmediate:null;function M(U){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=U)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function G(U){if(E=!1,M(U),!w)if(i(p)!==null)w=!0,k||(k=!0,et());else{var q=i(g);q!==null&&ht(G,q.startTime-U)}}var k=!1,L=-1,X=5,tt=-1;function F(){return T?!0:!(n.unstable_now()-ttU&&F());){var st=m.callback;if(typeof st==`function`){m.callback=null,v=m.priorityLevel;var ut=st(m.expirationTime<=U);if(U=n.unstable_now(),typeof ut==`function`){m.callback=ut,M(U),q=!0;break e}m===i(p)&&r(p),M(U)}else r(p);m=i(p)}if(m!==null)q=!0;else{var _=i(g);_!==null&&ht(G,_.startTime-U),q=!1}}break t}finally{m=null,v=W,b=!1}q=void 0}}finally{q?et():k=!1}}}var et;if(typeof O==`function`)et=function(){O(at)};else if(typeof MessageChannel<`u`){var wt=new MessageChannel,Bt=wt.port2;wt.port1.onmessage=at,et=function(){Bt.postMessage(null)}}else et=function(){B(at,0)};function ht(U,q){L=B(function(){U(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125st?(U.sortIndex=W,t(g,U),i(p)===null&&U===i(g)&&(E?(D(L),L=-1):E=!0,ht(G,W-st))):(U.sortIndex=ut,t(p,U),w||b||(w=!0,k||(k=!0,et()))),U},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(U){var q=v;return function(){var W=v;v=q;try{return U.apply(this,arguments)}finally{v=W}}}})(Eh)),Eh}var I0;function pC(){return I0||(I0=1,bh.exports=dC()),bh.exports}var Ch={exports:{}},gt={};var H0;function gC(){if(H0)return gt;H0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),y=Symbol.for(`react.lazy`),m=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function B(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||w}B.prototype.isReactComponent={},B.prototype.setState=function(_,H){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,H,`setState`)},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function D(){}D.prototype=B.prototype;function O(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||w}var M=O.prototype=new D;M.constructor=O,E(M,B.prototype),M.isPureReactComponent=!0;var G=Array.isArray;function k(){}var L={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function tt(_,H,Q){var J=Q.ref;return{$$typeof:n,type:_,key:H,ref:J!==void 0?J:null,props:Q}}function F(_,H){return tt(_.type,H,_.props)}function at(_){return typeof _==`object`&&_!==null&&_.$$typeof===n}function et(_){var H={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Q){return H[Q]})}var wt=/\/+/g;function Bt(_,H){return typeof _==`object`&&_!==null&&_.key!=null?et(``+_.key):H.toString(36)}function ht(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(k,k):(_.status=`pending`,_.then(function(H){_.status===`pending`&&(_.status=`fulfilled`,_.value=H)},function(H){_.status===`pending`&&(_.status=`rejected`,_.reason=H)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function U(_,H,Q,J,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var vt=!1;if(_===null)vt=!0;else switch(it){case`bigint`:case`string`:case`number`:vt=!0;break;case`object`:switch(_.$$typeof){case n:case t:vt=!0;break;case y:return vt=_._init,U(vt(_._payload),H,Q,J,ot)}}if(vt)return ot=ot(_),vt=J===``?`.`+Bt(_,0):J,G(ot)?(Q=``,vt!=null&&(Q=vt.replace(wt,`$&/`)+`/`),U(ot,H,Q,``,function($e){return $e})):ot!=null&&(at(ot)&&(ot=F(ot,Q+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(wt,`$&/`)+`/`)+vt)),H.push(ot)),1;vt=0;var xt=J===``?`.`:J+`:`;if(G(_))for(var bt=0;bt<_.length;bt++)J=_[bt],it=xt+Bt(J,bt),vt+=U(J,H,Q,it,ot);else if(bt=b(_),typeof bt==`function`)for(_=bt.call(_),bt=0;!(J=_.next()).done;)J=J.value,it=xt+Bt(J,bt++),vt+=U(J,H,Q,it,ot);else if(it===`object`){if(typeof _.then==`function`)return U(ht(_),H,Q,J,ot);throw H=String(_),Error(`Objects are not valid as a React child (found: `+(H===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:H)+`). If you meant to render a collection of children, use an array instead.`)}return vt}function q(_,H,Q){if(_==null)return _;var J=[],ot=0;return U(_,J,``,``,function(it){return H.call(Q,it,ot++)}),J}function W(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Q){(_._status===0||_._status===-1)&&(_._status=1,_._result=Q)},function(Q){(_._status===0||_._status===-1)&&(_._status=2,_._result=Q)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var st=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var H=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,H,Q){q(_,function(){H.apply(this,arguments)},Q)},count:function(_){var H=0;return q(_,function(){H++}),H},toArray:function(_){return q(_,function(H){return H})||[]},only:function(_){if(!at(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return gt.Activity=m,gt.Children=ut,gt.Component=B,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=O,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return L.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,H,Q){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var J=E({},_.props),ot=_.key;if(H!=null)for(it in H.key!==void 0&&(ot=``+H.key),H)!X.call(H,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&H.ref===void 0||(J[it]=H[it]);var it=arguments.length-2;if(it===1)J.children=Q;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),xh.exports=yC(),xh.exports}var $0;function SC(){if($0)return $a;$0=1;var n=pC(),t=Gd(),i=mC();function r(e){var s=`https://react.dev/errors/`+e;if(1ut||(e.current=st[ut],st[ut]=null,ut--)}function Q(e,s){ut++,st[ut]=e.current,e.current=s}var J=_(null),ot=_(null),it=_(null),vt=_(null);function xt(e,s){switch(Q(it,s),Q(ot,e),Q(J,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&&(e=e.namespaceURI)?r0(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=r0(s),e=a0(s,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(J),Q(J,e)}function bt(){H(J),H(ot),H(it)}function $e(e){e.memoizedState!==null&&Q(vt,e);var s=J.current,a=a0(s,e.type);s!==a&&(Q(ot,e),Q(J,a))}function Ge(e){ot.current===e&&(H(J),H(ot)),vt.current===e&&(H(vt),Ia._currentValue=W)}var $n,Jr;function wn(e){if($n===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);$n=s&&s[1]||``,Jr=-1)`:-1f||x[c]!==j[f]){var K=` -`+x[c].replace(` at new `,` at `);return e.displayName&&K.includes(``)&&(K=K.replace(``,e.displayName)),K}while(1<=c&&0<=f);break}}}finally{Xr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?wn(a):``}function nt(e,s){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn(`Lazy`);case 13:return e.child!==s&&s!==null?wn(`Suspense Fallback`):wn(`Suspense`);case 19:return wn(`SuspenseList`);case 0:case 15:return Fr(e.type,!1);case 11:return Fr(e.type.render,!1);case 1:return Fr(e.type,!0);case 31:return wn(`Activity`);default:return``}}function P(e){try{var s=``,a=null;do s+=nt(e,a),a=e,e=e.return;while(e);return s}catch(c){return` -Error generating stack: `+c.message+` -`+c.stack}}var dt=Object.prototype.hasOwnProperty,pt=n.unstable_scheduleCallback,St=n.unstable_cancelCallback,Jt=n.unstable_shouldYield,rn=n.unstable_requestPaint,de=n.unstable_now,ti=n.unstable_getCurrentPriorityLevel,Gn=n.unstable_ImmediatePriority,ki=n.unstable_UserBlockingPriority,vs=n.unstable_NormalPriority,Gb=n.unstable_LowPriority,Ip=n.unstable_IdlePriority,Yb=n.log,Qb=n.unstable_setDisableYieldValue,Zr=null,Ye=null;function ws(e){if(typeof Yb==`function`&&Qb(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Zr,e)}catch{}}var Qe=Math.clz32?Math.clz32:Fb,Jb=Math.log,Xb=Math.LN2;function Fb(e){return e>>>=0,e===0?32:31-(Jb(e)/Xb|0)|0}var Ol=256,Rl=262144,Dl=4194304;function ei(e){var s=e&42;if(s!==0)return s;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ml(e,s,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ei(c):(S&=C,S!==0?f=ei(S):a||(a=C&~e,a!==0&&(f=ei(a))))):(C=c&~h,C!==0?f=ei(C):S!==0?f=ei(S):a||(a=c&~e,a!==0&&(f=ei(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function Wr(e,s){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&s)===0}function Zb(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hp(){var e=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function au(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function Pr(e,s){e.pendingLanes|=s,s!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wb(e,s,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,j=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var iE=/[\n"\\]/g;function ln(e){return e.replace(iE,function(s){return`\\`+s.charCodeAt(0).toString(16)+` `})}function hu(e,s,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),s!=null?S===`number`?(s===0&&e.value===``||e.value!=s)&&(e.value=``+an(s)):e.value!==``+an(s)&&(e.value=``+an(s)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),s!=null?du(e,S,an(s)):a!=null?du(e,S,an(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+an(C):e.removeAttribute(`name`)}function Pp(e,s,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),s!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||s!=null)){fu(e);return}a=a!=null?``+an(a):``,s=s!=null?``+an(s):a,C||s===e.value||(e.value=s),e.defaultValue=s}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),fu(e)}function du(e,s,a){s===`number`&&zl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Li(e,s,a,c){if(e=e.options,s){s={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),Su=!1;if(Jn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){Su=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{Su=!1}var Es=null,vu=null,Nl=null;function ag(){if(Nl)return Nl;var e,s=vu,a=s.length,c,f=`value`in Es?Es.value:Es.textContent,h=f.length;for(e=0;e=aa),hg=` `,dg=!1;function pg(e,s){switch(e){case`keyup`:return kE.indexOf(s.keyCode)!==-1;case`keydown`:return s.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gg(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Ki=!1;function zE(e,s){switch(e){case`compositionend`:return gg(s);case`keypress`:return s.which!==32?null:(dg=!0,hg);case`textInput`:return e=s.data,e===hg&&dg?null:e;default:return null}}function jE(e,s){if(Ki)return e===`compositionend`||!xu&&pg(e,s)?(e=ag(),Nl=vu=Es=null,Ki=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=Cg(a)}}function _g(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?_g(e,s.parentNode):`contains`in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Tg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=zl(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==`string`}catch{a=!1}if(a)e=s.contentWindow;else break;s=zl(e.document)}return s}function Au(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||s===`textarea`||e.contentEditable===`true`)}var VE=Jn&&`documentMode`in document&&11>=document.documentMode,Vi=null,Ou=null,ua=null,Ru=!1;function Ag(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ru||Vi==null||Vi!==zl(c)||(c=Vi,`selectionStart`in c&&Au(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Do(Ou,`onSelect`),0>=S,f-=S,Dn=1<<32-Qe(s)+f|a<mt?(Tt=lt,lt=null):Tt=lt.sibling;var Ut=N(R,lt,z[mt],V);if(Ut===null){lt===null&&(lt=Tt);break}e&<&&Ut.alternate===null&&s(R,lt),A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,lt=Tt}if(mt===z.length)return a(R,lt),Ot&&Fn(R,mt),ct;if(lt===null){for(;mtmt?(Tt=lt,lt=null):Tt=lt.sibling;var $s=N(R,lt,Ut.value,V);if($s===null){lt===null&&(lt=Tt);break}e&<&&$s.alternate===null&&s(R,lt),A=h($s,A,mt),kt===null?ct=$s:kt.sibling=$s,kt=$s,lt=Tt}if(Ut.done)return a(R,lt),Ot&&Fn(R,mt),ct;if(lt===null){for(;!Ut.done;mt++,Ut=z.next())Ut=$(R,Ut.value,V),Ut!==null&&(A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Ot&&Fn(R,mt),ct}for(lt=c(lt);!Ut.done;mt++,Ut=z.next())Ut=I(lt,R,mt,Ut.value,V),Ut!==null&&(e&&Ut.alternate!==null&<.delete(Ut.key===null?mt:Ut.key),A=h(Ut,A,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&<.forEach(function(cC){return s(R,cC)}),Ot&&Fn(R,mt),ct}function Ht(R,A,z,V){if(typeof z==`object`&&z!==null&&z.type===E&&z.key===null&&(z=z.props.children),typeof z==`object`&&z!==null){switch(z.$$typeof){case b:t:{for(var ct=z.key;A!==null;){if(A.key===ct){if(ct=z.type,ct===E){if(A.tag===7){a(R,A.sibling),V=f(A,z.props.children),V.return=R,R=V;break t}}else if(A.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===X&&hi(ct)===A.type){a(R,A.sibling),V=f(A,z.props),ya(V,z),V.return=R,R=V;break t}a(R,A);break}else s(R,A);A=A.sibling}z.type===E?(V=li(z.props.children,R.mode,V,z.key),V.return=R,R=V):(V=Yl(z.type,z.key,z.props,null,R.mode,V),ya(V,z),V.return=R,R=V)}return S(R);case w:t:{for(ct=z.key;A!==null;){if(A.key===ct)if(A.tag===4&&A.stateNode.containerInfo===z.containerInfo&&A.stateNode.implementation===z.implementation){a(R,A.sibling),V=f(A,z.children||[]),V.return=R,R=V;break t}else{a(R,A);break}else s(R,A);A=A.sibling}V=Nu(z,R.mode,V),V.return=R,R=V}return S(R);case X:return z=hi(z),Ht(R,A,z,V)}if(ht(z))return rt(R,A,z,V);if(et(z)){if(ct=et(z),typeof ct!=`function`)throw Error(r(150));return z=ct.call(z),ft(R,A,z,V)}if(typeof z.then==`function`)return Ht(R,A,Pl(z),V);if(z.$$typeof===O)return Ht(R,A,Xl(R,z),V);to(R,z)}return typeof z==`string`&&z!==``||typeof z==`number`||typeof z==`bigint`?(z=``+z,A!==null&&A.tag===6?(a(R,A.sibling),V=f(A,z),V.return=R,R=V):(a(R,A),V=ju(z,R.mode,V),V.return=R,R=V),S(R)):a(R,A)}return function(R,A,z,V){try{ga=0;var ct=Ht(R,A,z,V);return tr=null,ct}catch(lt){if(lt===Pi||lt===Zl)throw lt;var kt=Xe(29,lt,null,R.mode);return kt.lanes=V,kt.return=R,kt}}}var pi=Fg(!0),Zg=Fg(!1),As=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xu(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Os(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rs(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(zt&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=Gl(e),zg(e,null,a),s}return $l(e,c,s,a),Gl(e)}function ma(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Kp(e,a)}}function Fu(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var Zu=!1;function Sa(){if(Zu){var e=Wi;if(e!==null)throw e}}function va(e,s,a,c){Zu=!1;var f=e.updateQueue;As=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,j=x.next;x.next=null,S===null?h=j:S.next=j,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=j:C.next=j,K.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,K=j=x=null,C=h;do{var N=C.lane&-536870913,I=N!==C.lane;if(I?(_t&N)===N:(c&N)===N){N!==0&&N===Zi&&(Zu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ft=C;N=s;var Ht=a;switch(ft.tag){case 1:if(rt=ft.payload,typeof rt==`function`){$=rt.call(Ht,$,N);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ft.payload,N=typeof rt==`function`?rt.call(Ht,$,N):rt,N==null)break t;$=m({},$,N);break t;case 2:As=!0}}N=C.callback,N!==null&&(e.flags|=64,I&&(e.flags|=8192),I=f.callbacks,I===null?f.callbacks=[N]:I.push(N))}else I={lane:N,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(j=K=I,x=$):K=K.next=I,S|=N;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;I=C,C=I.next,I.next=null,f.lastBaseUpdate=I,f.shared.pending=null}}while(!0);K===null&&(x=$),f.baseState=x,f.firstBaseUpdate=j,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),zs|=S,e.lanes=S,e.memoizedState=$}}function Wg(e,s){if(typeof e!=`function`)throw Error(r(191,e));e.call(s)}function Pg(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=U.T,C={};U.T=C,mf(e,!1,s,a);try{var x=f(),j=U.S;if(j!==null&&j(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var K=WE(x,c);Ea(e,s,K,tn(e))}else Ea(e,s,c,tn(e))}catch($){Ea(e,s,{then:function(){},status:`rejected`,reason:$},tn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),U.T=S}}function i1(){}function gf(e,s,a,c){if(e.tag!==5)throw Error(r(476));var f=My(e).queue;Dy(e,f,s,W,a===null?i1:function(){return ky(e),a(c)})}function My(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:W},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&&(e.memoizedState=s),s}function ky(e){var s=My(e);s.next===null&&(s=e.alternate.memoizedState),Ea(e,s.next.queue,{},tn())}function yf(){return xe(Ia)}function Uy(){return te().memoizedState}function zy(){return te().memoizedState}function r1(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=tn();e=Os(a);var c=Rs(s,e,a);c!==null&&(Ke(c,s,a),ma(c,s,a)),s={cache:$u()},e.payload=s;return}s=s.return}}function a1(e,s,a){var c=tn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},uo(e)?Ny(s,a):(a=Uu(e,s,a,c),a!==null&&(Ke(a,e,c),By(a,s,c)))}function jy(e,s,a){var c=tn();Ea(e,s,a,c)}function Ea(e,s,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(uo(e))Ny(s,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var S=s.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,Je(C,S))return $l(e,s,f,0),Kt===null&&Vl(),!1}catch{}if(a=Uu(e,s,f,c),a!==null)return Ke(a,e,c),By(a,s,c),!0}return!1}function mf(e,s,a,c){if(c={lane:2,revertLane:Xf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},uo(e)){if(s)throw Error(r(479))}else s=Uu(e,a,c,2),s!==null&&Ke(s,e,2)}function uo(e){var s=e.alternate;return e===yt||s!==null&&s===yt}function Ny(e,s){nr=so=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function By(e,s,a){if((a&4194048)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Kp(e,a)}}var Ca={readContext:xe,use:ao,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Ca.useEffectEvent=Xt;var Ly={readContext:xe,use:ao,useCallback:function(e,s){return Me().memoizedState=[e,s===void 0?null:s],e},useContext:xe,useEffect:by,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,oo(4194308,4,_y.bind(null,s,e),a)},useLayoutEffect:function(e,s){return oo(4194308,4,e,s)},useInsertionEffect:function(e,s){oo(4,2,e,s)},useMemo:function(e,s){var a=Me();s=s===void 0?null:s;var c=e();if(gi){ws(!0);try{e()}finally{ws(!1)}}return a.memoizedState=[c,s],c},useReducer:function(e,s,a){var c=Me();if(a!==void 0){var f=a(s);if(gi){ws(!0);try{a(s)}finally{ws(!1)}}}else f=s;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=a1.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var s=Me();return e={current:e},s.memoizedState=e},useState:function(e){e=uf(e);var s=e.queue,a=jy.bind(null,yt,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:df,useDeferredValue:function(e,s){var a=Me();return pf(a,e,s)},useTransition:function(){var e=uf(!1);return e=Dy.bind(null,yt,e.queue,!0,!1),Me().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var c=yt,f=Me();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),Kt===null)throw Error(r(349));(_t&127)!==0||ry(c,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,by(ly.bind(null,c,h,e),[e]),c.flags|=2048,ir(9,{destroy:void 0},ay.bind(null,c,h,a,s),null),a},useId:function(){var e=Me(),s=Kt.identifierPrefix;if(Ot){var a=Mn,c=Dn;a=(c&~(1<<32-Qe(c)-1)).toString(32)+a,s=`_`+s+`R_`+a,a=io++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[Ee]=s,h[Ne]=c;t:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break t;for(;S.sibling===null;){if(S.return===null||S.return===s)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=h;t:switch(Te(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&ns(s)}}return Yt(s),Mf(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&&s.stateNode!=null)e.memoizedProps!==c&&ns(s);else{if(typeof c!=`string`&&s.stateNode===null)throw Error(r(166));if(e=it.current,Xi(s)){if(e=s.stateNode,a=s.memoizedProps,c=null,f=Ce,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[Ee]=s,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||s0(e.nodeValue,a)),e||_s(s,!0)}else e=Mo(e).createTextNode(c),e[Ee]=s,s.stateNode=e}return Yt(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(c=Xi(s),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ee]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),e=!1}else a=Hu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&256?(Ze(s),s):(Ze(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Xi(s),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ee]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),f=!1}else f=Hu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(Ze(s),s):(Ze(s),null)}return Ze(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(s.child.flags|=8192),yo(s,s.updateQueue),Yt(s),null);case 4:return bt(),e===null&&Pf(s.stateNode.containerInfo),Yt(s),null;case 10:return Wn(s.type),Yt(s),null;case 19:if(H(Pt),c=s.memoizedState,c===null)return Yt(s),null;if(f=(s.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Ft!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(h=no(e),h!==null){for(s.flags|=128,_a(c,!1),e=h.updateQueue,s.updateQueue=e,yo(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)jg(a,e),a=a.sibling;return Q(Pt,Pt.current&1|2),Ot&&Fn(s,c.treeForkCount),s.child}e=e.sibling}c.tail!==null&&de()>bo&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304)}else{if(!f)if(e=no(h),e!==null){if(s.flags|=128,f=!0,e=e.updateQueue,s.updateQueue=e,yo(s,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(s),null}else 2*de()-c.renderingStartTime>bo&&a!==536870912&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304);c.isBackwards?(h.sibling=s.child,s.child=h):(e=c.last,e!==null?e.sibling=h:s.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=de(),e.sibling=null,a=Pt.current,Q(Pt,f?a&1|2:a&1),Ot&&Fn(s,c.treeForkCount),e):(Yt(s),null);case 22:case 23:return Ze(s),Pu(),c=s.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),a=s.updateQueue,a!==null&&yo(s,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),e!==null&&H(fi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),Wn(se),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function f1(e,s){switch(Lu(s),s.tag){case 1:return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return Wn(se),bt(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 26:case 27:case 5:return Ge(s),null;case 31:if(s.memoizedState!==null){if(Ze(s),s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 13:if(Ze(s),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return H(Pt),null;case 4:return bt(),null;case 10:return Wn(s.type),null;case 22:case 23:return Ze(s),Pu(),e!==null&&H(fi),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 24:return Wn(se),null;case 25:return null;default:return null}}function om(e,s){switch(Lu(s),s.tag){case 3:Wn(se),bt();break;case 26:case 27:case 5:Ge(s);break;case 4:bt();break;case 31:s.memoizedState!==null&&Ze(s);break;case 13:Ze(s);break;case 19:H(Pt);break;case 10:Wn(s.type);break;case 22:case 23:Ze(s),Pu(),e!==null&&H(fi);break;case 24:Wn(se)}}function Ta(e,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Nt(s,s.return,C)}}function ks(e,s,a){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=s;var x=a,j=C;try{j()}catch(K){Nt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Nt(s,s.return,K)}}function cm(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{Pg(s,a)}catch(c){Nt(e,e.return,c)}}}function um(e,s,a){a.props=yi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Nt(e,s,c)}}function Aa(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Nt(e,s,f)}}function kn(e,s){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Nt(e,s,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Nt(e,s,f)}else a.current=null}function fm(e){var s=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(s){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Nt(e,e.return,f)}}function kf(e,s,a){try{var c=e.stateNode;U1(c,e.type,a,s),c[Ne]=s}catch(f){Nt(e,e.return,f)}}function hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Is(e.type)||e.tag===4}function Uf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||hm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Is(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zf(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Qn));else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode,s=null),e=e.child,e!==null))for(zf(e,s,a),e=e.sibling;e!==null;)zf(e,s,a),e=e.sibling}function mo(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(c===27&&Is(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,s,a),e=e.sibling;e!==null;)mo(e,s,a),e=e.sibling}function dm(e){var s=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);Te(s,c,a),s[Ee]=e,s[Ne]=a}catch(h){Nt(e,e.return,h)}}var ss=!1,ae=!1,jf=!1,pm=typeof WeakSet==`function`?WeakSet:Set,ge=null;function h1(e,s){if(e=e.containerInfo,nh=Lo,e=Tg(e),Au(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,j=0,K=0,$=e,N=null;e:for(;;){for(var I;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(I=$.firstChild)!==null;)N=$,$=I;for(;;){if($===e)break e;if(N===a&&++j===f&&(C=S),N===h&&++K===c&&(x=S),(I=$.nextSibling)!==null)break;$=N,N=$.parentNode}$=I}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(sh={focusedElem:e,selectionRange:a},Lo=!1,ge=s;ge!==null;)if(s=ge,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,ge=e;else for(;ge!==null;){switch(s=ge,h=s.alternate,e=s.flags,s.tag){case 0:if((e&4)!==0&&(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),Te(h,c,a),h[Ee]=e,pe(h),c=h;break t;case`link`:var S=w0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;CHt&&(S=Ht,Ht=ft,ft=S);var R=xg(C,ft),A=xg(C,Ht);if(R&&A&&(I.rangeCount!==1||I.anchorNode!==R.node||I.anchorOffset!==R.offset||I.focusNode!==A.node||I.focusOffset!==A.offset)){var z=$.createRange();z.setStart(R.node,R.offset),I.removeAllRanges(),ft>Ht?(I.addRange(z),I.extend(A.node,A.offset)):(z.setEnd(A.node,A.offset),I.addRange(z))}}}}for($=[],I=C;I=I.parentNode;)I.nodeType===1&&$.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var V=$[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Lo=!!nh,sh=nh=null}finally{zt=f,q.p=c,U.T=a}}e.current=s,ce=2}}function qm(){if(ce===2){ce=0;var e=Ns,s=cr,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var c=q.p;q.p=2;var f=zt;zt|=4;try{gm(e,s.alternate,s)}finally{zt=f,q.p=c,U.T=a}}ce=3}}function Km(){if(ce===4||ce===3){ce=0,rn();var e=Ns,s=cr,a=os,c=Om;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ce=5:(ce=0,cr=Ns=null,Vm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(js=null),ou(a),s=s.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Zr,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=U.T,f=q.p,q.p=2,U.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,U.T=null,a=Kf,Kf=null;var h=Ns,S=os;if(ce=0,cr=Ns=null,os=0,(zt&6)!==0)throw Error(r(331));var C=zt;if(zt|=4,_m(h.current),Em(h,h.current,S,a),zt=C,Ua(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,U.T=c,Vm(e,s)}}function Gm(e,s,a){s=cn(a,s),s=bf(e.stateNode,s,2),e=Rs(e,s,2),e!==null&&(Pr(e,2),Un(e))}function Nt(e,s,a){if(e.tag===3)Gm(e,e,a);else for(;s!==null;){if(s.tag===3){Gm(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(js===null||!js.has(c))){e=cn(a,e),a=Yy(2),c=Rs(s,a,2),c!==null&&(Qy(a,c,s,e),Pr(c,2),Un(c));break}}s=s.return}}function Yf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new g1;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(a)||(Lf=!0,f.add(a),e=w1.bind(null,e,s,a),s.then(e,e))}function w1(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Kt===e&&(_t&a)===a&&(Ft===4||Ft===3&&(_t&62914560)===_t&&300>de()-wo?(zt&2)===0&&ur(e,0):If|=a,or===_t&&(or=0)),Un(e)}function Ym(e,s){s===0&&(s=Hp()),e=ai(e,s),e!==null&&(Pr(e,s),Un(e))}function b1(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Ym(e,a)}function E1(e,s){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Ym(e,a)}function C1(e,s){return pt(e,s)}var Ao=null,hr=null,Qf=!1,Oo=!1,Jf=!1,Ls=0;function Un(e){e!==hr&&e.next===null&&(hr===null?Ao=hr=e:hr=hr.next=e),Oo=!0,Qf||(Qf=!0,_1())}function Ua(e,s){if(!Jf&&Oo){Jf=!0;do for(var a=!1,c=Ao;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Qe(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Fm(c,h))}else h=_t,h=Ml(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Fm(c,h));c=c.next}while(a);Jf=!1}}function x1(){Qm()}function Qm(){Oo=Qf=!1;var e=0;Ls!==0&&j1()&&(e=Ls);for(var s=de(),a=null,c=Ao;c!==null;){var f=c.next,h=Jm(c,s);h===0?(c.next=null,a===null?Ao=f:a.next=f,f===null&&(hr=a)):(a=c,(e!==0||(h&3)!==0)&&(Oo=!0)),c=f}ce!==0&&ce!==5||Ua(e),Ls!==0&&(Ls=0)}function Jm(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,$=x.initiatorType;K&&i0($)&&(x=x.responseEnd,S+=K*(x`u`?null:document;function y0(e,s,a){var c=dr;if(c&&typeof s==`string`&&s){var f=ln(s);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),g0.has(f)||(g0.add(f),e={rel:e,crossOrigin:a,href:s},c.querySelector(f)===null&&(s=c.createElement(`link`),Te(s,`link`,e),pe(s),c.head.appendChild(s)))}}function $1(e){cs.D(e),y0(`dns-prefetch`,e,null)}function G1(e,s){cs.C(e,s),y0(`preconnect`,e,s)}function Y1(e,s,a){cs.L(e,s,a);var c=dr;if(c&&e&&s){var f=`link[rel="preload"][as="`+ln(s)+`"]`;s===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+ln(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+ln(a.imageSizes)+`"]`)):f+=`[href="`+ln(e)+`"]`;var h=f;switch(s){case`style`:h=pr(e);break;case`script`:h=gr(e)}gn.has(h)||(e=m({rel:`preload`,href:s===`image`&&a&&a.imageSrcSet?void 0:e,as:s},a),gn.set(h,e),c.querySelector(f)!==null||s===`style`&&c.querySelector(Ba(h))||s===`script`&&c.querySelector(La(h))||(s=c.createElement(`link`),Te(s,`link`,e),pe(s),c.head.appendChild(s)))}}function Q1(e,s){cs.m(e,s);var a=dr;if(a&&e){var c=s&&typeof s.as==`string`?s.as:`script`,f=`link[rel="modulepreload"][as="`+ln(c)+`"][href="`+ln(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=gr(e)}if(!gn.has(h)&&(e=m({rel:`modulepreload`,href:e},s),gn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),Te(c,`link`,e),pe(c),a.head.appendChild(c)}}}function J1(e,s,a){cs.S(e,s,a);var c=dr;if(c&&e){var f=Ni(c).hoistableStyles,h=pr(e);s=s||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":s},a),(a=gn.get(h))&&uh(e,a);var x=S=c.createElement(`link`);pe(x),Te(x,`link`,e),x._p=new Promise(function(j,K){x.onload=j,x.onerror=K}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Uo(S,s,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function X1(e,s){cs.X(e,s);var a=dr;if(a&&e){var c=Ni(a).hoistableScripts,f=gr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=m({src:e,async:!0},s),(s=gn.get(f))&&fh(e,s),h=a.createElement(`script`),pe(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function F1(e,s){cs.M(e,s);var a=dr;if(a&&e){var c=Ni(a).hoistableScripts,f=gr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=m({src:e,async:!0,type:`module`},s),(s=gn.get(f))&&fh(e,s),h=a.createElement(`script`),pe(h),Te(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function m0(e,s,a,c){var f=(f=it.current)?ko(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(s=pr(a.href),a=Ni(f).hoistableStyles,c=a.get(s),c||(c={type:`style`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=pr(a.href);var h=Ni(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),gn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},gn.set(e,a),h||Z1(f,e,a,S.state))),s&&c===null)throw Error(r(528,``));return S}if(s&&c!==null)throw Error(r(529,``));return null;case`script`:return s=a.async,a=a.src,typeof a==`string`&&s&&typeof s!=`function`&&typeof s!=`symbol`?(s=gr(a),a=Ni(f).hoistableScripts,c=a.get(s),c||(c={type:`script`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function pr(e){return`href="`+ln(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function S0(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Z1(e,s,a,c){e.querySelector(`link[rel="preload"][as="style"][`+s+`]`)?c.loading=1:(s=e.createElement(`link`),c.preload=s,s.addEventListener(`load`,function(){return c.loading|=1}),s.addEventListener(`error`,function(){return c.loading|=2}),Te(s,`link`,a),pe(s),e.head.appendChild(s))}function gr(e){return`[src="`+ln(e)+`"]`}function La(e){return`script[async]`+e}function v0(e,s,a){if(s.count++,s.instance===null)switch(s.type){case`style`:var c=e.querySelector(`style[data-href~="`+ln(a.href)+`"]`);if(c)return s.instance=c,pe(c),c;var f=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),pe(c),Te(c,`style`,f),Uo(c,a.precedence,e),s.instance=c;case`stylesheet`:f=pr(a.href);var h=e.querySelector(Ba(f));if(h)return s.state.loading|=4,s.instance=h,pe(h),h;c=S0(a),(f=gn.get(f))&&uh(c,f),h=(e.ownerDocument||e).createElement(`link`),pe(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),s.state.loading|=4,Uo(h,a.precedence,e),s.instance=h;case`script`:return h=gr(a.src),(f=e.querySelector(La(h)))?(s.instance=f,pe(f),f):(c=a,(f=gn.get(h))&&(c=m({},a),fh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),pe(f),Te(f,`link`,c),e.head.appendChild(f),s.instance=f);case`void`:return null;default:throw Error(r(443,s.type))}else s.type===`stylesheet`&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,Uo(c,a.precedence,e));return s.instance}function Uo(e,s,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function W1(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof s.precedence!=`string`||typeof s.href!=`string`||s.href===``)break;return!0;case`link`:if(typeof s.rel!=`string`||typeof s.href!=`string`||s.href===``||s.onLoad||s.onError)break;switch(s.rel){case`stylesheet`:return e=s.disabled,typeof s.precedence==`string`&&e==null;default:return!0}case`script`:if(s.async&&typeof s.async!=`function`&&typeof s.async!=`symbol`&&!s.onLoad&&!s.onError&&s.src&&typeof s.src==`string`)return!0}return!1}function E0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function P1(e,s,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=pr(c.href),h=s.querySelector(Ba(f));if(h){s=h._p,s!==null&&typeof s==`object`&&typeof s.then==`function`&&(e.count++,e=jo.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=h,pe(h);return}h=s.ownerDocument||s,c=S0(c),(f=gn.get(f))&&uh(c,f),h=h.createElement(`link`),pe(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),Te(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=jo.bind(e),s.addEventListener(`load`,a),s.addEventListener(`error`,a))}}var hh=0;function tC(e,s){return e.stylesheets&&e.count===0&&Bo(e,e.stylesheets),0hh?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function Bo(e,s){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,s.forEach(eC,e),No=null,jo.call(e))}function eC(e,s){if(!(s.state.loading&4)){var a=No.get(e);if(a)var c=a.get(null);else{a=new Map,No.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),wh.exports=SC(),wh.exports}var wC=vC(),Z=Gd();const bC={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk3NjY0NH0.F67aNfIfZTYJHWg1hI8aFjlXlWqRRv1R9XdnRpRPCLg`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTc2NjU4fQ.hP1i-w7N4NIYQUXGSMJDh8kL6JJaTTmh84Ha2e7qVbk`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},Mv=Z.createContext(null);function Yd(){const n=Z.useContext(Mv);if(!n)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return n}function Go(n){const t=bC[n];if(!t)throw new Error(`Missing environment variable: ${n}`);return t}function EC({children:n}){const t=Go(`VITE_YJS_URL`),i=Go(`VITE_DS_URL`),r=Z.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_YJS_TOKEN`)}`}),[]),l=Z.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_DS_TOKEN`)}`}),[]),o=Z.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return Y.jsx(Mv.Provider,{value:o,children:n})}var Yo={exports:{}},_h,Y0;function CC(){if(Y0)return _h;Y0=1;function n(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return _h=n,_h}var Q0;function xC(){if(Q0)return Yo.exports;Q0=1;var n=CC();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=n(r),g=null,y=null,m=0,v=null,b={push:M,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(F){if(!(F>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=F,!b.paused)for(;g&&m=d||b.paused?y?(y.next=et,y=et):(g=et,y=et,b.saturated()):(m++,u.call(o,et.value,et.worked))}function G(F,at){var et=p.get();et.context=o,et.release=k,et.value=F,et.callback=at||i,et.errorHandler=v,m>=d||b.paused?g?(et.next=g,g=et):(g=et,y=et,b.saturated()):(m++,u.call(o,et.value,et.worked))}function k(F){F&&p.release(F);var at=g;at&&m<=d?b.paused?m--:(y===g&&(y=null),g=at.next,at.next=null,u.call(o,at.value,at.worked),y===null&&b.empty()):--m===0&&b.drain()}function L(){g=null,y=null,b.drain=i}function X(){g=null,y=null,b.drain(),b.drain=i}function tt(F){v=F}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,y=o.errorHandler,m=o.value;o.value=null,o.callback=i,o.errorHandler&&y(d,m),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(B){T(null,B)},T)}var g=t(o,p,d),y=g.push,m=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(B,D){y(E,function(O,M){if(O){D(O);return}B(M)})});return T.catch(i),T}function b(E){var T=new Promise(function(B,D){m(E,function(O,M){if(O){D(O);return}B(M)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var B=g.drain;g.drain=function(){typeof B==`function`&&B(),T(),g.drain=B}}})});return E}}return Yo.exports=t,Yo.exports.promise=l,Yo.exports}var _C=xC();const kv=uC(_C),_n=`Stream-Next-Offset`,Ic=`Stream-Cursor`,Hc=`Stream-Up-To-Date`,Nn=`Stream-Closed`,Th=`Stream-Seq`,TC=`Stream-TTL`,AC=`Stream-Expires-At`,J0=`Producer-Id`,Qo=`Producer-Epoch`,X0=`Producer-Seq`,OC=`Producer-Expected-Seq`,RC=`Producer-Received-Seq`,Ah=`offset`,Jo=`live`,DC=`stream-sse-data-encoding`;var Fs=class Uv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new Uv(r,o,u,l,i)}},Qd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Wt=class od extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=F0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new od(d,u,r,l)}static fromFetchError(t){const i=F0(t.status);return new od(t.message,i,t.status,t.json??t.text)}};function F0(n){switch(n){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var MC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},zv=class extends Wt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(n,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,n),this.name=`StreamClosedError`,this.finalOffset=t}},kC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const UC=[429,503],Jd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function zC(n){if(!n)return 0;const t=Number(n);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(n);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function jv(n,t=Jd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],y=p[1];let m=i,v=0;for(;;)try{const b=await n(...p);if(b.ok)return b;throw await Fs.fromResponse(b,g.toString())}catch(b){if(u?.(),y?.signal?.aborted)throw new Qd;if(b instanceof Fs&&!UC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Fs?zC(b.headers[`retry-after`]):0,E=Math.random()*m,T=Math.min(E,r),B=Math.max(w,T);if(o){const D=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${B}ms (${D}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(D=>setTimeout(D,B)),m=Math.min(m*l,r)}}}}const jC=[201,204,205];function NC(n){return async(...t)=>{const i=t[0],r=await n(...t);try{if(r.status<200||jC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Qd:new Fs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function BC(n){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof n[Symbol.asyncIterator]==`function`}function LC(n){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof n[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(n,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(n,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Oh(n){return BC(n)||LC(n),n}async function*Z0(n,t){const i=n.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` -`).replace(/\r/g,` -`);const g=l.split(` -`);l=g.pop()??``;for(const y of g)if(y===``){if(o.type&&o.data.length>0){const m=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:m};else if(o.type===`control`)try{const v=JSON.parse(m);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(y.startsWith(`event:`)){const m=y.slice(6);o.type=m.startsWith(` `)?m.slice(1):m}else if(y.startsWith(`data:`)){const m=y.slice(5);o.data.push(m.startsWith(` `)?m.slice(1):m)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Xd=class{shouldContinueLive(n,t){return!(n&&this.upToDate||t===!1||this.streamClosed)}},Nv=class cd extends Xd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new cd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new cd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Fd(this)}},Rh=class wr extends Xd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new wr({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new wr({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new Nv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new wr({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Fd(this)}},Fd=class ud extends Xd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new ud(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new ud(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const W0=`PAUSE_STREAM`;var IC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(n){this.url=n.url,this.contentType=n.contentType,this.live=n.live,this.startOffset=n.startOffset;const t={offset:n.initialOffset,cursor:n.initialCursor,upToDate:n.initialUpToDate,streamClosed:n.initialStreamClosed};this.#i=n.startSSE?new Rh(t):new Nv(t),this.#t=n.firstResponse.headers,this.#e=n.firstResponse.status,this.#n=n.firstResponse.statusText,this.#s=n.firstResponse.ok,this.#a=!1,this.#c=n.isJsonMode,this.#l=n.abortController,this.#p=n.fetchNext,this.#d=n.startSSE,this.#v={minConnectionDuration:n.sseResilience?.minConnectionDuration??1e3,maxShortConnections:n.sseResilience?.maxShortConnections??3,backoffBaseDelay:n.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:n.sseResilience?.backoffMaxDelay??5e3,logWarnings:n.sseResilience?.logWarnings??!0},this.#E=n.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(n.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const n=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,n),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,n)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(n=>{this.#S=n}),this.#u?.abort(W0))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Fd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Wt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(n){this.#b?.(),this.#f(n)}#w(n){if(this.#x!==null)throw new Wt(`Cannot call ${n}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=n}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(n){this.#i=this.#i.withResponseMetadata({offset:n.headers.get(_n)||void 0,cursor:n.headers.get(Ic)||void 0,upToDate:n.headers.has(Hc),streamClosed:n.headers.get(Nn)?.toLowerCase()===`true`}),this.#t=n.headers,this.#e=n.status,this.#n=n.statusText,this.#s=n.ok}#U(n){this.#i=this.#i.withSSEControl(n)}#z(){this.#i instanceof Rh||(this.#i=new Rh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const n=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=n.state,n.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(n.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,n.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?Z0(t.body,this.#u.signal):null}async#B(n){const{done:t,value:i}=await n.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,n):(this.#U(i),i.upToDate?{type:`response`,response:qC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(n,t){const i=[n];for(;;){const{done:r,value:l}=await t.next();if(r){const o=fd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:fd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(n){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(n.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&n.body)this.#z(),this.#u=new AbortController,i=Z0(n.body,this.#u.signal);else{if(r.enqueue(n),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===W0){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const n=this.#C(),t=[];try{let r=await n.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await n.read()}}finally{n.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Wt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:n,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),n}bodyStream(){return this.#w(`bodyStream`),Oh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const n=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await n.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const y=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${y}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await n.read()}this.#r(),r.close()},cancel:()=>{n.releaseLock(),this.cancel()}});return Oh(i)}textStream(){this.#w(`textStream`);const n=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(n.decode(i,{stream:!0}))},flush(i){const r=n.decode();r&&i.enqueue(r)}}));return Oh(t)}subscribeJson(n){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),m=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(m)}catch(w){const E=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await n({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(n){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),y=await o.arrayBuffer();await n({data:new Uint8Array(y),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(n){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Dh(o,this.offset,this.cursor,this.streamClosed),y=await o.text();await n({text:y,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(n){this.#l.abort(n),this.#b?.(),this.#r()}get closed(){return this.#g}};function Dh(n,t,i,r){const l=n.headers.get(_n),o=n.headers.get(Ic),u=n.headers.has(Hc),d=n.headers.get(Nn)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function HC(n){const t=n.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Wt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;lm.length>0).map(m=>HC(m));if(y.length===0)g=new ArrayBuffer(0);else if(y.length===1){const m=y[0];g=m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}else{const m=y.reduce((w,E)=>w+E.length,0),v=new Uint8Array(m);let b=0;for(const w of y)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const y=[];for(const m of n){const v=m.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&y.push(b)}else y.push(v)}g=`[${y.join(`,`)}]`}else g=n.join(``);return new Response(g,{status:200,headers:p})}async function Za(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function hs(n,t,i){const r=n.status;if(r===404)throw new Wt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(n.headers.get(Nn)?.toLowerCase()===`true`){const d=n.headers.get(_n)??void 0;throw new zv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Wt(o,u,409)}throw r===400?new Wt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Wt.fromResponse(n,t)}async function nc(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const P0=new Set;function KC(){if(!(typeof process>`u`))return`production`}function VC(){return typeof globalThis.window<`u`}function $C(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function GC(n){try{return new URL(n)}catch{const t=$C();if(t)try{return new URL(n,t)}catch{return}return}}function Bv(n,t){if(t===!1||KC()===`test`||!VC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=n instanceof URL?n.toString():n,l=GC(r);l&&l.protocol===`http:`&&(P0.has(l.origin)||(P0.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function YC(n){if(!n.url)throw new Wt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=n.headers,i=n.params;for(;;)try{return await QC({...n,headers:t,params:i})}catch(r){if(n.onError){const l=await n.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function QC(n){const t=n.url instanceof URL?n.url.toString():n.url;Bv(t,n.warnOnHttp);const i=new URL(t),r=n.offset??`-1`;i.searchParams.set(Ah,r);const l=n.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Jo,l);const o=await nc(n.params);for(const[k,L]of Object.entries(o))i.searchParams.set(k,L);const u=await Za(n.headers),d=new AbortController;n.signal&&n.signal.addEventListener(`abort`,()=>d.abort(n.signal?.reason),{once:!0});const p=n.fetch??((...k)=>fetch(...k)),g=n.backoffOptions??Jd,y=jv(p,g);let m;try{m=await y(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(k){throw k instanceof Qd?new Wt(`Stream request was aborted`,`UNKNOWN`):k}const v=m.headers.get(`content-type`)??void 0,b=m.headers.get(_n)??r,w=m.headers.get(Ic)??void 0,E=m.headers.has(Hc),T=m.headers.get(Nn)?.toLowerCase()===`true`,B=n.json===!0||(v?.includes(`application/json`)??!1),O=m.headers.get(DC)===`base64`?`base64`:void 0,M=async(k,L,X,tt)=>{const F=new URL(t);F.searchParams.set(Ah,k),tt||(l===`sse`?F.searchParams.set(Jo,`sse`):(l===!0||l===`long-poll`)&&F.searchParams.set(Jo,`long-poll`)),L&&F.searchParams.set(`cursor`,L);const at=await nc(n.params);for(const[Bt,ht]of Object.entries(at))F.searchParams.set(Bt,ht);const et=await Za(n.headers),wt=await y(F.toString(),{method:`GET`,headers:et,signal:X});return wt.ok||await hs(wt,t),wt},G=l===`sse`?async(k,L,X)=>{const tt=new URL(t);tt.searchParams.set(Ah,k),tt.searchParams.set(Jo,`sse`),L&&tt.searchParams.set(`cursor`,L);const F=await nc(n.params);for(const[wt,Bt]of Object.entries(F))tt.searchParams.set(wt,Bt);const at=await Za(n.headers),et=await y(tt.toString(),{method:`GET`,headers:at,signal:X});return et.ok||await hs(et,t),et}:void 0;return new IC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:B,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:m,abortController:d,fetchNext:M,startSSE:G,sseResilience:n.sseResilience,encoding:O})}var tS=class extends Error{currentEpoch;constructor(n){super(`Producer epoch is stale. Current server epoch: ${n}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=n}},JC=class extends Error{expectedSeq;receivedSeq;constructor(n,t){super(`Producer sequence gap: expected ${n}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=n,this.receivedSeq=t}};function eS(n){return n?n.split(`;`)[0].trim().toLowerCase():``}var Lv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(n,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=n,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=kv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Wt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(n){if(this.#o)throw new Wt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof n==`string`)t=new TextEncoder().encode(n);else if(n instanceof Uint8Array)t=n;else throw new Wt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(n){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=n,await this.flush();const t=await this.#v(n);return this.#u=t,t}async#v(n){const t=this.#t.contentType??`application/octet-stream`,i=eS(t)===`application/json`;let r;if(n!==void 0){const g=typeof n==`string`?new TextEncoder().encode(n):n;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[J0]:this.#e,[Qo]:this.#n.toString(),[X0]:l.toString(),[Nn]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===403){const g=d.headers.get(Qo),y=g?parseInt(g,10):this.#n;if(this.#a){const m=y+1;return this.#n=m,this.#s=0,this.#v(n)}throw new tS(y)}throw await Fs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const n=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:n,seq:t}).catch(()=>{})}):this.#y.push({batch:n,seq:t}).catch(()=>{})}async#O(n){const{batch:t,seq:i}=n,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(n,t,i){let r=this.#S.get(n);r||(r=new Map,this.#S.set(n,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(n,t,i){const r=this.#t.contentType??`application/octet-stream`,l=eS(r)===`application/json`;let o;if(l)o=`[${n.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const m=n.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(m);let b=0;for(const w of n)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[J0]:this.#e,[Qo]:i.toString(),[X0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(_n)??``,duplicate:!1};if(g.status===403){const m=g.headers.get(Qo),v=m?parseInt(m,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(n,0,b)}throw new tS(v)}if(g.status===409){const m=g.headers.get(OC),v=m?parseInt(m,10):0;if(v0&&this.#d(n),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Mh(n){return n?n.split(`;`)[0].trim().toLowerCase():``}function XC(n){return n!=null&&typeof n.then==`function`}var jn=class Ya{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){WC(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=kv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Jd},l=jv(this.#n,r);this.#e=NC(l)}static async create(t){const i=new Ya(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ya(t);return await i.head(),i}static async head(t){return new Ya(t).head()}static async delete(t){return new Ya(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await hs(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(_n)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(Nn)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[TC]=String(t.ttlSeconds)),t?.expiresAt&&(i[AC]=t.expiresAt),t?.closed&&(i[Nn]=`true`);const o=FC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await hs(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await hs(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[Nn]=`true`;let o;t?.body!==void 0&&(Mh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(Nn)?.toLowerCase()===`true`){const g=u.headers.get(_n)??void 0;throw new zv(this.url,g)}return u.ok||await hs(u,this.url),{finalOffset:u.headers.get(_n)??``}}async append(t,i){const r=XC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Th]=i.seq);const u=Mh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await hs(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let m=t.length-1;m>=0;m--)if(t[m].seq!==void 0){o=t[m].seq;break}o&&(i[Th]=o);const u=Mh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const m=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(m&&!v){const b=t.map(B=>B.data),w=b.reduce((B,D)=>B+D.length,0),E=new Uint8Array(w);let T=0;for(const B of b)E.set(B,T),T+=B.length;d=E}else if(v&&!m)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(D=>typeof D.data==`string`?b.encode(D.data):D.data),E=w.reduce((D,O)=>D+O.length,0),T=new Uint8Array(E);let B=0;for(const D of w)T.set(D,B),B+=D.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const m of t)m.signal&&p.push(m.signal);const g=p.length>0?AbortSignal.any(p):void 0,y=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});y.ok||await hs(y,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Th]=i.seq);const u=ZC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await hs(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new Lv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return YC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Za(this.#t.headers)}async#f(){const t=await Za(this.#t.headers),i=new URL(this.url),r=await nc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function FC(n){if(n!==void 0)return typeof n==`string`?new TextEncoder().encode(n):n instanceof Uint8Array||n instanceof Blob||n instanceof FormData||n instanceof ReadableStream||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?n:new TextEncoder().encode(JSON.stringify(n))}function ZC(n){if(n instanceof ReadableStream)return n.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=n[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function WC(n){if(!n.url)throw new MC;if(n.signal&&!(n.signal instanceof AbortSignal))throw new kC;Bv(n.url,n.warnOnHttp)}const PC=`__includes_scalar__`;class _i{}class zr extends _i{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class yn extends _i{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Re extends _i{constructor(t){super(),this.path=t,this.type=`ref`}}class Ue extends _i{constructor(t){super(),this.value=t,this.type=`val`}}class Ve extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class Iv extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class Ti extends _i{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function jr(n){return n instanceof Iv||n instanceof Ve||n instanceof Re||n instanceof Ue||n instanceof Ti}function Zd(n){return typeof n==`object`&&`expression`in n?n.expression:n}function nS(n){return typeof n==`object`&&`expression`in n?n.expression:n}function sS(n){return typeof n==`object`&&`expression`in n&&n.residual===!0}function tx(n){return{expression:n,residual:!0}}function ex(n,t){if(n.from.alias===t)return n.from;for(const i of n.join||[])if(i.from.alias===t)return i.from}function al(n,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(n.select){const l=n.select[r];if(l&&l.type===`ref`)return al(n,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=ex(n,r);return o?o.type===`queryRef`?al(o.query,new Re(l),i):{collection:o.collection,path:l}:void 0}}}class vn extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class iS extends vn{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ai extends vn{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class nx extends Ai{constructor(){super(`Collection requires a config`)}}class sx extends Ai{constructor(){super(`Collection requires a sync config`)}}class ix extends Ai{constructor(){super(`Schema must implement the standard-schema interface`)}}class rS extends Ai{constructor(){super(`Schema validation must be synchronous`)}}class bl extends vn{constructor(t){super(t),this.name=`CollectionStateError`}}class rx extends bl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class ax extends bl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class lx extends bl{constructor(){super(`Collection is in error state`)}}class ox extends bl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Vn extends vn{constructor(t){super(t),this.name=`CollectionOperationError`}}class cx extends Vn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class ux extends Vn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class fx extends Vn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class hx extends Vn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class dx extends Vn{constructor(){super(`The first argument to update is missing`)}}class px extends Vn{constructor(){super(`No keys were passed to update`)}}class gx extends Vn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class yx extends Vn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class mx extends Vn{constructor(){super(`No keys were passed to delete`)}}class Sx extends Vn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Wd extends vn{constructor(t){super(t),this.name=`MissingHandlerError`}}class vx extends Wd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class wx extends Wd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class bx extends Wd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class ys extends vn{constructor(t){super(t),this.name=`TransactionError`}}class Ex extends ys{constructor(){super(`mutationFn is required when creating a transaction`)}}class Cx extends ys{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class xx extends ys{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class _x extends ys{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class Tx extends ys{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class kh extends ys{constructor(){super(`No pending sync transaction to write to`)}}class Uh extends ys{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class Ax extends ys{constructor(){super(`No pending sync transaction to commit`)}}class Ox extends ys{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class Oi extends vn{constructor(t){super(t),this.name=`QueryBuilderError`}}class Rx extends Oi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class Dx extends Oi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class Mx extends Oi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Xo extends Oi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class kx extends Oi{constructor(){super(`Join condition must be an equality expression`)}}class Ux extends Oi{constructor(){super(`Query must have a from clause`)}}class aS extends Oi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: - - ❌ .where(({ user }) => user.id === 'abc') - ✅ .where(({ user }) => eq(user.id, 'abc')) - -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class ze extends vn{constructor(t){super(t),this.name=`QueryCompilationError`}}class zx extends ze{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class jx extends ze{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class Nx extends ze{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class Bx extends ze{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class Lx extends ze{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Hv extends ze{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class Ix extends ze{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class Hx extends ze{constructor(t){super(`Unsupported FROM type: ${t}`)}}class qx extends ze{constructor(t){super(`Unknown expression type: ${t}`)}}class Kx extends ze{constructor(){super(`Reference path cannot be empty`)}}class Vx extends ze{constructor(t){super(`Unknown function: ${t}`)}}class lS extends ze{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Ri extends vn{constructor(t){super(t),this.name=`JoinError`}}class $x extends Ri{constructor(t){super(`Unsupported join type: ${t}`)}}class Gx extends Ri{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Yx extends Ri{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Qx extends Ri{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class Jx extends Ri{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Xx extends Ri{constructor(){super(`Invalid join condition`)}}class Fx extends Ri{constructor(t){super(`Unsupported join source type: ${t}`)}}class qc extends vn{constructor(t){super(t),this.name=`GroupByError`}}class Zx extends qc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Wx extends qc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class Px extends qc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class t_ extends qc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class oS extends vn{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class e_ extends vn{constructor(t){super(t),this.name=`QueryOptimizerError`}}class n_ extends e_{constructor(){super(`Cannot combine empty expression list`)}}class s_ extends ze{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class i_ extends ze{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class r_ extends ze{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Bn(n,t){return sc(n,t,new Map)}function sc(n,t,i){if(n===t)return!0;if(n==null||t==null||typeof n!=typeof t)return!1;if(n instanceof Date)return t instanceof Date?n.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(n instanceof RegExp)return t instanceof RegExp?n.source===t.source&&n.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(n instanceof Map){if(!(t instanceof Map)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const l=Array.from(n.entries()).every(([o,u])=>t.has(o)&&sc(u,t.get(o),i));return i.delete(n),l}if(t instanceof Map)return!1;if(n instanceof Set){if(!(t instanceof Set)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Array.from(n),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(n),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(n),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)&&!(n instanceof DataView)&&!(t instanceof DataView)){const r=n,l=t;if(r.length!==l.length)return!1;for(let o=0;osc(l,t[o],i));return i.delete(n),r}if(Array.isArray(t))return!1;if(typeof n==`object`){if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Object.keys(n),l=Object.keys(t);if(r.length!==l.length)return i.delete(n),!1;const o=r.every(u=>u in t&&sc(n[u],t[u],i));return i.delete(n),o}return!1}const a_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function Zs(n){if(n==null||typeof n!=`object`)return!1;const t=n[Symbol.toStringTag];return typeof t==`string`&&a_.has(t)}const qv={direction:`asc`,nulls:`first`,stringSort:`locale`},zh=new WeakMap;let l_=1;function cS(n){if(zh.has(n))return zh.get(n);const t=l_++;return zh.set(n,t),t}const Pd=(n,t,i)=>{const{nulls:r}=i;if(n==null&&t==null)return 0;if(n==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof n==`string`&&typeof t==`string`&&i.stringSort===`locale`)return n.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(n)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof n==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=cS(n),d=cS(t);return u-d}if(l)return 1;if(o)return-1}return nt?1:0},o_=(n,t,i)=>Pd(t,n,{...i,nulls:i.nulls===`first`?`last`:`first`});function Wa(n){return(t,i)=>n.direction===`asc`?Pd(t,i,n):o_(t,i,n)}const c_=Wa({direction:`asc`,nulls:`first`,stringSort:`locale`});function u_(n,t){if(n.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?g_(n):p_(n);case`func`:return y_(n,t);default:throw new qx(n.type)}}function p_(n){const[t,...i]=n.path;if(!t)throw new Kx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function g_(n){const t=n.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function y_(n,t){const i=n.args.map(r=>tp(r,t));switch(n.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Er(r(o)),d=Er(l(o));return ye(u)||ye(d)?null:h_(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ye(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ye(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return ye(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Er(r(o)),d=l(o);return ye(u)?null:Array.isArray(d)?d.some(p=>Er(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:uS(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:uS(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=jh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=jh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=jh(d);return p?d_(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new Vx(n.name)}}function uS(n,t,i){if(typeof n!=`string`||typeof t!=`string`)return!1;const r=i?n.toLowerCase():n;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class m_{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function fS(n,t,i,r,l){const o=n;return{...n,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const hd=[`$synced`,`$origin`,`$key`,`$collectionId`];function S_(n){return hd.includes(n)}function Vv(n){return n.some(t=>S_(t))}function El(n,t,i){if(Vv(t))return;const r=i??{...qv,...n.compareOptions};for(const l of n.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new m_(l)}function v_(n){if(n.length===0)return new Set;if(n.length===1)return new Set(n[0]);let t=new Set(n[0]);for(let i=1;i=2){const o=r.split(`.`),u=El(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,y=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:v_(l)}}return{canOptimize:!1,matchingKeys:new Set}}function __(n,t){if(n.type!==`func`||n.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of n.args){const l=ep(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:w_(r)}}return{canOptimize:!1,matchingKeys:new Set}}function T_(n,t){if(n.type!==`func`||n.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=n.args[0],r=n.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=El(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const y of g)d.add(y)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function $v(n){return n.config.autoIndex===`eager`}function Kc(n,t,i,r,l){if(Vv(t)||!$v(i))return;const o=r??{...qv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function A_(n,t){if(!$v(t))return;const i=O_(n);for(const{fieldName:r,fieldPath:l}of i)Kc(r,l,t)}function O_(n){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(n),t}class R_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Nh=3e4;function Bh(n,t){if(t.length<=Nh)n.push(...t);else for(let i=0;i0)l=o;else return o}return r}class M_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof n==`string`?-1:1}function ll(n){return JSON.stringify(n,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const U_=we(),z_=we(),j_=we(),N_=we(),B_=we();function we(){return Math.random()*(2**31-1)>>>0}const Gv=new ArrayBuffer(8),L_=new DataView(Gv),Gs=new Uint8Array(Gv);class Cl{constructor(){this.hash=U_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(B_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(z_);for(let i=0;i>>8&255)}return;case`number`:L_.setFloat64(0,t,!0),this.writeByte(Gs[0]),this.writeByte(Gs[1]),this.writeByte(Gs[2]),this.writeByte(Gs[3]),this.writeByte(Gs[4]),this.writeByte(Gs[5]),this.writeByte(Gs[6]),this.writeByte(Gs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(N_)):this.update(j_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const I_=we(),H_=we(),q_=we(),K_=we(),V_=we(),$_=we(),G_=we(),Y_=we(),Q_=we(),J_=we(),X_=we(),F_=we(),Z_=we(),W_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function P_(n){const t=n[Symbol.toStringTag];return typeof t==`string`&&W_.has(t)}const tT=128,ol=new WeakMap;function ke(n){const t=new Cl;return Yv(t,n),t.digest()}function eT(n){const t=ol.get(n);if(t!==void 0)return t;let i;if(n instanceof Date)i=nT(n);else if(typeof Buffer<`u`&&n instanceof Buffer||n instanceof Uint8Array)if(n.byteLength<=tT)i=sT(n);else return pd(n);else{if(n instanceof File)return pd(n);if(P_(n))i=iT(n);else{let r=n,l=Y_;n instanceof Array&&(l=Q_),n instanceof Map&&(l=J_,r=[...n.entries()]),n instanceof Set&&(l=X_,r=[...n.entries()]),i=rT(r,l)}}return ol.set(n,i),i}function nT(n){const t=new Cl;return t.update(G_),t.update(n.getTime()),t.digest()}function sT(n){const t=new Cl;t.update(F_),t.update(n.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ee(this.#t.filter(([i,r])=>t(i)))}negate(){return new ee(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Bh(i,this.#t),Bh(i,t.getInner()),new ee(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Lh.getStringId(u)}|${Lh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Lh.getStringId(p);const y=d+`|`+g;t.set(y,(t.get(y)||0)+u),i.has(y)||i.set(y,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ee(l)}#n(){const t=new R_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const y=u?ke(p):p;u&&!i.has(y)&&i.set(y,p),t.update(y,m=>m+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const y=u?i.get(p):p;d.push([y,g])}return new ee(d)}extend(t){const i=t instanceof ee?t.getInner():t;Bh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class oT{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class On{#t=[];sendData(t){t instanceof ee||(t=new ee(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new oT(t)}}class Qv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Di extends Qv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class cT extends Qv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class np extends Di{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class uT{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new On;return new fT(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class Rn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class fT extends Rn{sendData(t){this.writer.sendData(t)}}class hT extends Di{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ee;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Jv(){return n=>{const t=new Rn(n.graph,new On),i=new hT(n.graph.getNextOperatorId(),n.connectReader(),t.writer);return n.graph.addOperator(i),t}}const Qa=Symbol(`NO_PREFIX`);class dS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Pa(t),l=this.get(r);if(ic(l)){const[o,u]=l;if(Pa(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||ke(o)===ke(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Ja;p.set(ke(o),l),p.set(ke(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Ja extends Map{addValue(t,i){if(i===0)return this.size===0;const r=ke(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Js{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Js;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ic(i))yield i;else{if(i===void 0)return;if(i instanceof Ja)for(const r of i.values())yield r;else for(const r of i.values())if(ic(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ic(u)){this.#n(t,u,r,l);return}if(u instanceof Ja){const d=Pa(r);if(d!==Qa){const p=new dS;p.set(Qa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Pa(r),p=Pa(o);if(p===d&&(o===r||ke(o)===ke(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Qa&&d===Qa){const g=new Ja;g.set(ke(o),i),g.set(ke(r),[r,l]),this.#t.set(t,g)}else{const g=new dS;if(p===d){const y=new Ja;y.set(ke(o),i),y.set(ke(r),[r,l]),g.set(p,y)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ee(i)}}function Pa(n){return Array.isArray(n)&&(typeof n[0]==`string`||typeof n[0]==`number`||typeof n[0]==`bigint`)?n[0]:Qa}function ic(n){return Array.isArray(n)}class dT extends Di{#t=new Js;#e=new Js;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,y]of u){const m=d.get(g)??0;d.set(g,m+y)}for(const[g,y]of o){const m=p.get(g)??0;p.set(g,m+y)}for(const[g,y]of p)d.has(g)||(i.push([[r,g],-y]),this.#e.addValue(r,[g,-y]));for(const[g,y]of d)p.has(g)||y!==0&&(i.push([[r,g],y]),this.#e.addValue(r,[g,y]));for(const[g,y]of d){const m=p.get(g);if(m!==void 0){const v=y-m;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ee(i))}}function Xv(n){return t=>{const i=new Rn(t.graph,new On),r=new dT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class pT extends Di{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=ke(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[ke(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[ke(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ee(i))}}function gT(n=t=>t){return t=>{const i=new Rn(t.graph,new On),r=new pT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class yT extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ps(n){return t=>{const i=new Rn(t.graph,new On),r=new yT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}const mT=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Cr(n,t,i){const r=i[0];if(t!=null&&n>=t)throw new Error(n+` >= `+t);if(n.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(n[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+Cr(n.slice(u),t.slice(u),i)}const l=n?i.indexOf(n[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+Cr(n.slice(1),null,i)}function Fv(n){if(n.length!==Zv(n[0]))throw new Error(`invalid integer part of order key: `+n)}function Zv(n){if(n>=`a`&&n<=`z`)return n.charCodeAt(0)-97+2;if(n>=`A`&&n<=`Z`)return 90-n.charCodeAt(0)+2;throw new Error(`invalid order key head: `+n)}function Xa(n){const t=Zv(n[0]);if(t>n.length)throw new Error(`invalid order key: `+n);return n.slice(0,t)}function pS(n,t){if(n===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+n);const i=Xa(n);if(n.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+n)}function gS(n,t){Fv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function ST(n,t){Fv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function vT(n,t,i=mT){if(n!=null&&pS(n,i),t!=null&&pS(t,i),n!=null&&t!=null&&n>=t)throw new Error(n+` >= `+t);if(n==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+Cr(``,g,i);if(p{const o=n(i,l);return o!==0?o:dd(t,r)}}class sp{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=k_(o,u),g=[];p.forEach(m=>{const v=this.#t[m];v&&g.push(v)});const y=[];return d.forEach(m=>{const v=this.#t[m];v&&y.push(v)}),{moveIns:g,moveOuts:y,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:SS(this.#t[r-1]),o=r===this.#t.length?null:SS(this.#t[r]),u=vT(l,o),d=yS(t,u);if(this.#t.splice(r,0,d),rthis.#e(mS(i),mS(r)))}}class Pv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof sp))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function yc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],1])}}function mc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],-1])}}class wT extends Di{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Wv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new sp(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Pv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>yc(d,r)),u.moveOuts.forEach(d=>mc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);yc(d.moveIn,l),mc(d.moveOut,l),this.#l(o,u)}}function bT(n,t){return i=>{const r=new Rn(i.graph,new On),l=new wT(i.graph.getNextOperatorId(),i.connectReader(),r.writer,n,t);return i.graph.addOperator(l),r}}class ET extends cT{#t=new Js;#e=new Js;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Js.fromMultiSets(this.inputAMessages()),i=Js.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ee;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[g,null]],y)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#t.getIterator(l))y!==0&&r.add([l,[g,null]],p?-y:+y)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[null,g]],y)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#e.getIterator(l))y!==0&&r.add([l,[null,g]],p?-y:+y)}}}function tw(n,t=`inner`){return i=>{if(i.graph!==n.graph)throw new Error(`Cannot join streams from different graphs`);const r=new Rn(i.graph,new On),l=new ET(i.graph.getNextOperatorId(),i.connectReader(),n.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class CT extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function le(n){return t=>{const i=new Rn(t.graph,new On),r=new CT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class xT extends Di{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function gd(n){return t=>{const i=new Rn(t.graph,new On),r=new xT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class _T extends np{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function TT(n){return t=>{const i=new Rn(t.graph,new On),r=new _T(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class AT extends Di{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Wv(l));this.#t=new Pv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new sp(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>yc(o,r)),l.moveOuts.forEach(o=>mc(o,r)),l.changes&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);yc(o.moveIn,l),mc(o.moveOut,l)}}function OT(n,t){const i=t||{};return r=>{const l=new Rn(r.graph,new On),o=new AT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,n,i);return r.graph.addOperator(o),l}}function vS(n){return`pipe`in n}function wS(n,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!vS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>vS(l))),r=>{const l=`__original_key__`;return r.pipe(le(d=>{const p=n(d),g=ll(p),y={};y[l]=p;for(const[m,v]of Object.entries(i))y[m]=v.preMap(d);return[g,y]})).pipe(Xv(d=>{let p=0;for(const[m,v]of d)p+=v;if(p<=0)return[];const g={},y=d[0]?.[0]?.[l];g[l]=y;for(const[m,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[m],E]);g[m]=v.reduce(b)}return[[g,1]]})).pipe(le(([d,p])=>{const g=p[l],y={};Object.assign(y,g);for(const[m,v]of Object.entries(i))v.postMap?y[m]=v.postMap(p[m]):y[m]=p[m];return[d,y]}))}}function RT(n=t=>t){return{preMap:t=>n(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function DT(n=t=>t){return{preMap:t=>n(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function MT(n=t=>t){return{preMap:t=>({sum:n(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function kT(n){const t=n??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const zT={sum:RT,count:DT,avg:MT,min:kT,max:UT};function jT(n,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(bT((g,y)=>d(n(g),n(y)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Jv())}function NT(n,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(n((g,y)=>d(t(g),t(y)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Jv())}function BT(n,t){return NT(OT,n,t)}const Ih=`__virtual_synced__`,Hh=`__virtual_has_local__`;function bS(n){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(n)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:LT,count:IT,avg:HT,min:qT,max:KT}=zT;function VT(n,t){const i=new Map,r=[...n];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Nr(o))continue;const u=r.findIndex(d=>Sc(o,d));if(u===-1)throw new Zx(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function ES(n,t,i,r,l,o,u){const d={[Ih]:{preMap:([,w])=>bS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Hh]:{preMap:([,w])=>bS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[D,O]of Object.entries(r))if(O.type===`agg`)w[D]=Zo(O);else if(Nr(O)){const{transformed:M,extracted:G}=yd(O,T);for(const[k,L]of Object.entries(G))w[k]=Zo(L);E[D]=ue(M)}}const B=u?([,D])=>({__singleGroup:!0,__correlationKey:D?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(n=n.pipe(wS(B,w)),n=n.pipe(le(([,D])=>{const M={...D.$selected||{}};if(r){for(const[F,at]of Object.entries(r))at.type===`agg`&&(M[F]=D[F]);CS(M,D,E)}const G=u?D.__correlationKey:void 0,k=G!==void 0?`single_group_${ll(G)}`:`single_group`,L={...D,$selected:M},X=D[Ih],tt=D[Hh];return L.$synced=X??!0,L.$origin=tt?`local`:`remote`,L.$key=k,L.$collectionId=o??L.$collectionId,u&&G!==void 0&&(L[u]={__correlationKey:G}),[k,L]})),i&&i.length>0)for(const D of i){const O=nS(D),M=vc(O,r||{},`$selected`),G=ue(M);n=n.pipe(ps(([,k])=>{const L={$selected:k.$selected};return _r(G(L))}))}if(l&&l.length>0)for(const D of l)n=n.pipe(ps(([,O])=>{const M={$selected:O.$selected};return _r(D(M))}));return n}const p=VT(t,r),g=t.map(w=>ue(w)),y=([,w])=>{const E={...w};delete E.$selected;const T={};for(let B=0;B{const E=w.$selected||{},T={};if(r){for(const[L,X]of Object.entries(r))if(X.type===`agg`)T[L]=w[L];else if(!v[L]){const tt=p.selectToGroupByIndex.get(L);tt!==void 0?T[L]=w[`__key_${tt}`]:T[L]=E[L]}CS(T,w,v)}else for(let L=0;L0)for(const w of i){const E=nS(w),T=vc(E,r||{}),B=ue(T);n=n.pipe(ps(([,D])=>{const O={$selected:D.$selected};return B(O)}))}if(l&&l.length>0)for(const w of l)n=n.pipe(ps(([,E])=>{const T={$selected:E.$selected};return _r(w(T))}));return n}function Sc(n,t){if(!n||!t||n.type!==t.type)return!1;switch(n.type){case`ref`:return!n.path||!t.path||n.path.length!==t.path.length?!1:n.path.every((i,r)=>i===t.path[r]);case`val`:return n.value===t.value;case`func`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Sc(i,t.args[r]));case`agg`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Sc(i,t.args[r]));default:return!1}}function Zo(n){const t=ue(n.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(n.name.toLowerCase()){case`sum`:return LT(i);case`count`:return IT(l);case`avg`:return HT(i);case`min`:return qT(r);case`max`:return KT(r);default:throw new Wx(n.name)}}function vc(n,t,i=`$selected`){switch(n.type){case`agg`:{const r=n;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&$T(r,o))return new Re([i,l]);throw new Px(r.name)}case`func`:{const r=n,l=r.args.map(o=>vc(o,t));return new Ve(r.name,l)}case`ref`:return n;case`val`:return n;default:throw new t_(n.type)}}function CS(n,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(n[r]=t[r]);for(const[r,l]of Object.entries(i))n[r]=l({$selected:n});for(const r of Object.keys(n))r.startsWith(`__agg_`)&&delete n[r]}function Nr(n){return jr(n)?n.type===`agg`?!0:n.type===`func`&&`args`in n?n.args.some(t=>Nr(t)):!1:!1}function yd(n,t){if(n.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Re([`$selected`,i]),extracted:{[i]:n}}}if(n.type===`func`){const i={},r=n.args.map(l=>{const o=yd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Ve(n.name,r),extracted:i}}return{transformed:n,extracted:{}}}function $T(n,t){return n.name===t.name&&n.args.length===t.args.length&&n.args.every((i,r)=>Sc(i,t.args[r]))}function GT(n,t,i,r,l,o,u,d,p,g){const y=i.map(E=>{const T=vc(E.expression,r,`$selected`);return{compiledExpression:ue(T),compareOptions:md(E,l)}}),m=E=>{const T=E;return i.length>1?y.map(B=>B.compiledExpression(T)):i.length===1?y[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const B=E,D=T;for(let O=0;O1?String(M.path[0]):n.from.alias}}if(B){const k=i.every(F=>F.expression.type===`ref`)?i.map(F=>{const at=F.expression,et=al(n,at,l);return ue(et?new Re(et.path):F.expression,!0)}):void 0;w={alias:D,offset:p??0,limit:d,comparator:(F,at)=>{if(i.length===1){const et=F&&B(F),wt=at&&B(at);return v(et,wt)}if(k){const et=wt=>wt&&k.map(Bt=>Bt(wt));return v(et(F),et(at))}return 0},valueExtractorForRawRow:F=>{if(i.length===1)return B(F);if(k)return k.map(at=>at(F))},firstColumnValueExtractor:B,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=F=>{o[tt].dataNeeded=()=>{const at=F();return Math.max(0,w.limit-at)}}}}return g?t.pipe(jT(m,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(BT(m,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function md(n,t){return n.compareOptions.stringSort!==void 0?n.compareOptions:{...t.compareOptions,direction:n.compareOptions.direction,nulls:n.compareOptions.nulls}}function YT(n,t={}){const i=r=>{const l=[];for(const[o,u]of n.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?tl(t.where):void 0,l=JT(n,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=b_(r,n);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=tl(r);return i(o)}}catch(r){console.warn(`${n.id?`[${n.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=tl(t.where);return t.optimizedOnly?void 0:i(l)}}function tl(n){const t=Kv(n);return i=>{try{const r=t(i);return _r(r)}catch{return!1}}}function QT(n,t){const i=tl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&n(l)}}function JT(n,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const m=g.path,v=md(p,n);Kc(m[0],m,n,v);const b=El(n,m,v);if(b&&b.supports(`gt`)){const w=E=>{const T=n.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of n.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const y of t){const m=Wa(y.compareOptions),v=xS(p.value,y.expression),b=xS(g.value,y.expression),w=m(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function xS(n,t){if(t.type===`ref`){const i=t;let r=n;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:Kv(t)(n)}class _S{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=dd(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const rc=`__tanstack_db_direct`;class XT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),y=o?r.find(D=>D.truncate)?.optimisticSnapshot:null;let m,v;const b=new Set;for(const D of r){for(const O of D.operations)b.add(O.key);for(const[O]of D.rowMetadataWrites)b.add(O)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const D of b){const O=this.get(D);O!==void 0&&w.set(D,O)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,B=new Map;for(const D of this.transactions.values())if(D.state===`completed`)for(const O of D.mutations)this.isThisCollection(O.collection)&&O.optimistic&&B.set(O.key,{type:O.type,value:O.modified});for(const D of r){if(D.truncate){const O=new Set([...this.syncedData.keys(),...y?.upserts.keys()||[]]);for(const M of O){if(y?.deletes.has(M))continue;const G=y?.upserts.get(M)||this.syncedData.get(M);G!==void 0&&E.push({type:`delete`,key:M,value:G})}m=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const M of b)w.delete(M);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const O of D.operations){const M=O.key;this.syncedKeys.add(M);const G=this.isLocalOnly||this.pendingLocalChanges.has(M)||this.pendingLocalOrigins.has(M)||m?.has(M)===!0||v?.has(M)===!0?`local`:`remote`;switch(O.type){case`insert`:this.syncedData.set(M,O.value),this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break;case`update`:{if(T===`partial`){const k=Object.assign({},this.syncedData.get(M),O.value);this.syncedData.set(M,k)}else this.syncedData.set(M,O.value);this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}case`delete`:this.syncedData.delete(M),this.syncedMetadata.delete(M),this.rowOrigins.delete(M),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}}for(const[O,M]of D.rowMetadataWrites){if(M.type===`delete`){this.syncedMetadata.delete(O);continue}this.syncedMetadata.set(O,M.value)}for(const[O,M]of D.collectionMetadataWrites){if(M.type===`delete`){this.syncedCollectionMetadata.delete(O);continue}this.syncedCollectionMetadata.set(O,M.value)}}if(o){const D=new Set;for(const G of r)for(const k of G.operations)(k.type===`insert`||k.type===`update`)&&D.add(k.key);const O=new Map(y.upserts),M=new Set(y.deletes);for(const[G,k]of O)if(!M.has(G))if(D.has(G)){let L=!1;for(let X=E.length-1;X>=0;X--){const tt=E[X];if(tt.key===G&&tt.type===`insert`){tt.value=k,L=!0;break}}L||E.push({type:`insert`,key:G,value:k})}else E.push({type:`insert`,key:G,value:k});if(E.length>0&&M.size>0){const G=[];for(const k of E)k.type===`insert`&&M.has(k.key)||G.push(k);E.length=0,E.push(...G)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&y){for(const[D,O]of y.upserts)this.optimisticUpserts.set(D,O);for(const D of y.deletes)this.optimisticDeletes.add(D)}for(const D of this.transactions.values())if(![`completed`,`failed`].includes(D.state)){for(const O of D.mutations)if(this.isThisCollection(O.collection)&&O.optimistic)switch(O.type){case`insert`:case`update`:this.optimisticUpserts.set(O.key,O.modified),this.optimisticDeletes.delete(O.key);break;case`delete`:this.optimisticUpserts.delete(O.key),this.optimisticDeletes.add(O.key);break}}for(const D of b){const O=w.get(D),M=this.get(D),G=this.getVirtualPropsSnapshotForState(D,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:B}),k=this.getVirtualPropsSnapshotForState(D),L=G.$synced!==k.$synced||G.$origin!==k.$origin,X=O!==void 0?fS(O,D,this.collection.id,()=>G.$synced,()=>G.$origin):void 0,tt=B.get(D);let F=!1;tt&&(tt.type===`delete`&&O!==void 0&&M===void 0&&Bn(tt.value,O)||M!==void 0&&Bn(tt.value,M))&&(F=!0);const at=L&&O!==void 0&&M!==void 0&&Bn(O,M);if(!(F&&!at))if(O===void 0&&M!==void 0){const et=B.get(D);if(et){const wt=et.value,Bt=fS(wt,D,this.collection.id,()=>G.$synced,()=>G.$origin);E.push({type:`update`,key:D,value:M,previousValue:Bt})}else E.push({type:`insert`,key:D,value:M})}else O!==void 0&&M===void 0?E.push({type:`delete`,key:D,value:X??O}):O!==void 0&&M!==void 0&&(!Bn(O,M)||at)&&E.push({type:`update`,key:D,value:M,previousValue:X??O})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new _S((i,r)=>i.compareCreatedAt(r)),this.syncedData=new _S(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const m of this.transactions.values()){const v=m.metadata[rc]===!0;if(m.state===`completed`){for(const b of m.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(m.state===`failed`)for(const b of m.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const m of this.pendingSyncedTransactions)for(const v of m.operations)o.add(v.key);const u=[];for(const[m,v]of this.pendingOptimisticUpserts)o.has(m)||this.pendingOptimisticDirectUpserts.has(m)?this.optimisticUpserts.set(m,v):u.push(m);for(const m of u)this.pendingOptimisticUpserts.delete(m),this.pendingLocalOrigins.delete(m);const d=[];for(const m of this.pendingOptimisticDeletes)o.has(m)||this.pendingOptimisticDirectDeletes.has(m)?this.optimisticDeletes.add(m):d.push(m);for(const m of d)this.pendingOptimisticDeletes.delete(m),this.pendingLocalOrigins.delete(m);const p=[];for(const m of this.transactions.values())[`completed`,`failed`].includes(m.state)||p.push(m);for(const m of p)for(const v of m.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const y=g.filter(m=>!!(!this.recentlySyncedKeys.has(m.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const m=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)m.add(w.key);const v=y.filter(b=>!(b.type===`delete`&&m.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else y.length>0&&this.indexes.updateIndexes(y),this.changes.emitEvents(y,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),y=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:y}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:y,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function ew(){const n=new Map;function t(i){const r=i.join(`.`);if(n.has(r))return n.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return n.set(r,l),l}return t([])}function vi(n){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,y=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,y)||Object.defineProperty(p,y,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(n.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&n.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...n,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&n.includes(u))return{enumerable:!0,configurable:!0}}})}function TS(n){const t=vi(n),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ne(n){return ac(n)?new Re(n.__path):n&&typeof n==`object`&&`type`in n&&(n.type===`func`||n.type===`ref`||n.type===`val`||n.type===`agg`)?n:new Ue(n)}function ac(n){return n&&typeof n==`object`&&n.__refProxy===!0}function Sd(n,t){return new Ve(`eq`,[ne(n),ne(t)])}function AS(n,t){return new Ve(`gt`,[ne(n),ne(t)])}function FT(n,t){return new Ve(`gte`,[ne(n),ne(t)])}function vd(n,t){return new Ve(`lt`,[ne(n),ne(t)])}function wd(n,t,...i){const r=[n,t,...i];return new Ve(`and`,r.map(l=>ne(l)))}function ZT(n,t,...i){const r=[n,t,...i];return new Ve(`or`,r.map(l=>ne(l)))}function WT(n,t){return new Ve(`in`,[ne(n),ne(t)])}class PT{constructor(t){this.query=t}}class tA{constructor(t){this.query=t}}class nw{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function eA(n,t){if(t.length===0||n.length===0)return;if(n.length===1){const{expression:r,compareOptions:l}=n[0];return(l.direction===`asc`?AS:vd)(r,new Ue(t[0]))}const i=[];for(let r=0;rwd(y,m)))}}return i.length===1?i[0]:i.reduce((r,l)=>ZT(r,l))}class nA extends nw{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&A_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?QT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,y=wd(g,p);i.where=y}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],y=this.orderByIndex,m=this.options.whereExpression,v=m?tl(m):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const F=this.collection.get(tt);return F===void 0?!1:v?.(F)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],F=this.collection.currentStateAsChanges({where:Sd(tt,new Ue(g))});if(F){const at=F.map(wt=>wt.key).filter(wt=>!this.sentKeys.has(wt)&&b(wt));T.push(...at);const et=y.take(i-T.length,g,b);T.push(...et)}else T=y.take(i,g,b)}else T=y.takeFromStart(i,b);const B=()=>Math.max(i-E.length,0),D=()=>T.length===0,O=t[0].expression,M=O.type===`ref`?ue(new Re(O.path),!0):null;for(;B()>0&&!D();){const tt=new Set;for(const F of T){const at=this.collection.get(F);E.push({type:`insert`,key:F,value:at}),w=M?M(at):at,tt.add(F)}T=y.take(B(),w,b)}const G=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let k;if(r!==void 0&&r.length>0){const tt=eA(t,r);if(tt){const{expression:F}=t[0],at=r[0];let et;if(at instanceof Date){const wt=new Date(at.getTime()+1);et=wd(FT(F,new Ue(at)),vd(F,new Ue(wt)))}else et=Sd(F,new Ue(at));k={whereFrom:tt,whereCurrent:et,lastKey:this.lastSentKey}}}const L={where:m,limit:i,orderBy:t,cursor:k,offset:l??G,subscription:this},X=this.collection._sync.loadSubset(L);u?.(X),this.loadedSubsets.push(L),o&&this.trackLoadSubsetPromise(X)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class sA{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=ew(),p=r(d);o=ne(p)}const u=new nA(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new ox;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const iA=n=>setTimeout(()=>{n({didTimeout:!0,timeRemaining:()=>50})},0),rA=n=>{clearTimeout(n)},aA=typeof window<`u`&&`requestIdleCallback`in window?(n,t)=>window.requestIdleCallback(n,t):(n,t)=>iA(n),qh=typeof window<`u`&&`cancelIdleCallback`in window?n=>window.cancelIdleCallback(n):rA,sw=class fs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return fs.instance||(fs.instance=new fs),fs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){fs.instance&&(fs.instance.timeoutId!==null&&clearTimeout(fs.instance.timeoutId),fs.instance=null)}};sw.instance=null;let Kh=sw;class lA{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new ax(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new bl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new rx(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||Kh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){Kh.getInstance().cancel(this),this.idleCallbackId!==null&&(qh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&qh(this.idleCallbackId),this.idleCallbackId=aA(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),Kh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(qh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const ip=Symbol(`liveQueryInternal`);class oA{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=cA(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new kh;if(r.committed)throw new Uh;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const y=this.state.syncedData.get(l);if(y!==void 0&&Bn(y,i.value))o=`update`;else{const b=this.config.utils[ip];throw new hx(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Ax;if(i.committed)throw new Ox;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new kh;if(i.committed)throw new Uh;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ai(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new kh;if(t.committed)throw new Uh;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new lx);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new oS(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new oS(this.id,t)})}this.preloadPromise=null}}function cA(n){if(typeof n==`function`)return{cleanup:n};if(typeof n==`object`)return n}const OS=1;function lc(n,t){return n===t?0:nYs(r)??null);if(n instanceof Date)return{__type:`date`,value:n.toISOString()};if(n instanceof Set)return{__type:`set`,values:Array.from(n).map(l=>Ys(l)??null).sort((l,o)=>lc(wi(l),wi(o)))};if(n instanceof Map)return{__type:`map`,entries:Array.from(n.entries()).map(([l,o])=>({key:Ys(l)??null,value:Ys(o)??null})).sort((l,o)=>lc(wi(l.key),wi(o.key)))};if(n instanceof RegExp)return{__type:`regexp`,value:n.toString()};const t={},i=Object.entries(n).sort(([r],[l])=>lc(r,l));for(const[r,l]of i){const o=Ys(l);o!==void 0&&(t[r]=o)}return t}function wi(n){return n===null?`null`:Array.isArray(n)?`[${n.map(wi).join(`,`)}]`:typeof n!=`object`?JSON.stringify(n):`{${Object.keys(n).sort((r,l)=>lc(r,l)).map(r=>`${JSON.stringify(r)}:${wi(n[r])}`).join(`,`)}}`}function fA(n,t,i,r,l){const o=uA(r),u=Ys(t)??null,d=Ys(l),g=Ys({signatureVersion:OS,expression:u,options:d??null})??null,y=wi(g);return{signatureVersion:OS,signature:y,indexId:n,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function bd(n){if(n===null||typeof n!=`object`)return n;if(Array.isArray(n))return n.map(i=>bd(i));const t={};for(const[i,r]of Object.entries(n))t[i]=bd(r);return t}function hA(n){return JSON.parse(JSON.stringify(n))}class dA{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=ew(),o=t(l),u=ne(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ai(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=fA(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:hA(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:bd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var pA={};const gA=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),yA=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),mA=new Set([`set`,`delete`,`clear`,`add`]),SA=new Set([`entries`,`keys`,`values`,`forEach`]);function rp(n){return n!==null&&typeof n==`object`&&!(n instanceof Date)&&!(n instanceof RegExp)&&!Zs(n)}function vA(n,t,i,r){if(gA.has(n))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,y)=>{if(rp(g)){const m={tracker:i,prop:String(y)},{proxy:v}=r(g,m);return v}return g},d=function(g,y,m){const v=u(g,y);return o.call(this,v,y,m)};if(n===`reduce`||n===`reduceRight`){const g=function(y,m,v,b){const w=u(m,v);return o.call(this,y,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((n===`find`||n===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return n===`filter`&&Array.isArray(p)?p.map(g=>{const y=i.copy_.indexOf(g);return y!==-1?u(g,y):g}):p}}function wA(n,t){return function(){const i=n.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(rp(l)){const u={tracker:n,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function RS(n,t,i){return function(...r){const l=n.apply(t.copy_,r);return i(t),l}}function bA(n,t,i,r,l,o,u){if(SA.has(n)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(n===`forEach`){const m=p[0];if(typeof m==`function`){const v=function(b,w,E){const T=m.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(n===`entries`||n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator){const m=g,v=new Map;if(n===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=m.next();if(!w.done&&w.value&&typeof w.value==`object`){if(n===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:B}=o(w.value[1],T);w.value[1]=B}}else if(n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator)if(n===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:D=>{l.copy_ instanceof Map&&l.copy_.set(E,D)}},{proxy:B}=o(w.value,T);w.value=B}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:D=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(D),b.set(E,D))}},{proxy:B}=o(w.value,T);w.value=B}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...n){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...n):!t&&typeof process<`u`&&pA.DEBUG===`true`&&console.log(`[proxy]`,...n)}function ds(n,t=new WeakMap){if(n==null||typeof n!=`object`)return n;if(t.has(n))return t.get(n);if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n.source,n.flags);if(Array.isArray(n)){const l=[];return t.set(n,l),n.forEach((o,u)=>{l[u]=ds(o,t)}),l}if(ArrayBuffer.isView(n)&&!(n instanceof DataView)){const l=Object.getPrototypeOf(n).constructor,o=new l(n.length);t.set(n,o);for(let u=0;u{l.set(u,ds(o,t))}),l}if(n instanceof Set){const l=new Set;return t.set(n,l),n.forEach(o=>{l.add(ds(o,t))}),l}if(Zs(n))return n;const i={};t.set(n,i);for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=ds(n[l],t));const r=Object.getOwnPropertySymbols(n);for(const l of r)i[l]=ds(n[l],t);return i}let DS=0;function EA(){return DS+=1,DS}function ap(n,t){const i=new Map;function r(m,v){if(At(`Object ID:`,m.constructor.name),i.has(m))return i.get(m);{const b=ap(m,v);return i.set(m,b),b}}const l=new Map,o={copy_:ds(n),originalObject:ds(n),proxyCount:EA(),modified:!1,assigned_:{},parent:t,target:n};At(`createChangeProxy called for target`,n,o.proxyCount);function u(m){m.modified||(m.modified=!0),m.parent&&(At(`propagating change to parent`),`updateMap`in m.parent?m.parent.updateMap(m.copy_):`updateSet`in m.parent?m.parent.updateSet(m.copy_):(m.parent.tracker.copy_[m.parent.prop]=m.copy_,m.parent.tracker.assigned_[m.parent.prop]=!0),u(m.parent.tracker))}function d(m){if(At(`checkIfReverted called with assigned keys:`,Object.keys(m.assigned_)),Object.keys(m.assigned_).length===0&&Object.getOwnPropertySymbols(m.assigned_).length===0)return At(`No assigned properties, returning true`),!0;for(const b in m.assigned_)if(m.assigned_[b]===!0){const w=m.copy_[b],E=m.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,`original:`,E),!Bn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(m.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(m.assigned_);for(const b of v)if(m.assigned_[b]===!0){const w=m.copy_[b],E=m.originalObject[b];if(!Bn(w,E))return At(`Symbol property is different, returning false`),!1}else if(m.assigned_[b]===!1)return At(`Symbol property was deleted, returning false`),!1;return At(`All properties match original values, returning true`),!0}function p(m,v){At(`checkParentStatus called for child prop:`,v);const b=d(m);At(`Parent checkIfReverted returned:`,b),b&&(At(`Parent is fully reverted, clearing tracking`),m.modified=!1,m.assigned_={},m.parent&&(At(`Continuing up the parent chain`),p(m.parent.tracker,m.parent.prop)))}function g(m){if(At(`createObjectProxy`,m),l.has(m))return At(`proxyCache found match`),l.get(m);const v=new Proxy(m,{get(b,w){At(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const D=w.toString();if(yA.has(D))return RS(E,o,u);const O=vA(D,E,o,r);if(O)return O;if(w===Symbol.iterator)return wA(o,r)}if(b instanceof Map||b instanceof Set){const D=w.toString();if(mA.has(D))return RS(E,o,u);const O=bA(D,w,E,b,o,r,u);if(O)return O}return E.bind(b)}if(rp(E)){const D={tracker:o,prop:String(w)},{proxy:O}=r(T,D);return l.set(E,O),O}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,`new:`,E),Bn(T,E))At(`Value unchanged, not tracking`);else{const B=o.originalObject[w],D=Bn(E,B);if(At(`value:`,E,`original:`,B,`isRevertToOriginal:`,D),D){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=ds(B),At(`Checking if all properties reverted`);const O=d(o);At(`All reverted:`,O),O?(At(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(At(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(At(`Some properties still changed, keeping modified flag`),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=ds(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,B=Reflect.deleteProperty(b,w);return B&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),B}return!0}});return l.set(m,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At(`getChanges called, modified:`,o.modified),At(o),!o.modified)return At(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const m={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(m[v]=o.copy_[v]);return At(`Returning copy:`,m),m}}}function CA(n){const t=n.map(i=>ap(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function xA(n,t){const{proxy:i,getChanges:r}=ap(n);return t(i),r()}function _A(n,t){const{proxies:i,getChanges:r}=CA(n);return t(i),r()}function TA(){let n,t,i=!0;return{promise:new Promise((l,o)=>{n=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:n,reject:t,isPending:()=>i}}function AA(n){return typeof n==`object`&&n!==null&&typeof n.hasPendingGraphRun==`function`}class OA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const wc=new OA,bc=[];let cl=[],RA=0;function DA(n,t){switch(`${n.type}-${t.type}`){case`insert-update`:return{...n,type:`insert`,original:{},modified:t.modified,changes:{...n.changes,...t.changes},key:n.key,globalKey:n.globalKey,metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:n.original,changes:{...n.changes,...t.changes},metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${n.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Fa(n){const t=new zA(n);return bc.push(t),t}function oc(){if(cl.length>0)return cl.slice(-1)[0]}function MA(n){wc.clear(n.id),cl.push(n)}function kA(n){try{wc.flush(n.id)}finally{cl=cl.filter(t=>t.id!==n.id)}}function UA(n){const t=bc.findIndex(i=>i.id===n.id);t!==-1&&bc.splice(t,1)}let zA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new Ex;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=TA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=RA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&UA(this)}mutate(t){if(this.state!==`pending`)throw new xx;MA(this);try{t()}finally{kA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=DA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new _x;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of bc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new Tx;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class jA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=oc();if(!u&&!this.config.onInsert)throw new vx;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(y=>{const m=this.validateData(y,`insert`),v=this.config.getKey(m);if(this.state.has(v)||g.has(v))throw new fx(v);g.add(v);const b=this.generateGlobalKey(v,y),w={mutationId:crypto.randomUUID(),original:{},modified:m,changes:Object.fromEntries(Object.keys(y).map(E=>[E,m[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const y=Fa({metadata:{[rc]:!0},mutationFn:async m=>await this.config.onInsert({transaction:m.transaction,collection:this.collection})});return y.applyMutations(p),this.markPendingLocalOrigins(p),y.commit().catch(()=>{}),o.transactions.set(y.id,y),o.scheduleTransactionCleanup(y),o.recomputeOptimisticState(!0),y}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=oc();if(!u&&!this.config.onDelete)throw new bx;if(Array.isArray(r)&&r.length===0)throw new mx;const d=Array.isArray(r)?r:[r],p=[];for(const y of d){if(!this.state.has(y))throw new Sx(y);const m=this.generateGlobalKey(y,this.state.get(y)),v={mutationId:crypto.randomUUID(),original:this.state.get(y),modified:this.state.get(y),changes:this.state.get(y),globalKey:m,key:y,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(y)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Fa({autoCommit:!0,metadata:{[rc]:!0},mutationFn:async y=>this.config.onDelete({transaction:y.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new ix}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new rS;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new iS(i,v)}const g=p.value,y=Object.keys(t);return Object.fromEntries(y.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new rS;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new iS(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new cx(i):new ux(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new dx;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=oc();if(!o&&!this.config.onUpdate)throw new wx;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new px;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,y=d.map(w=>{const E=this.state.get(w);if(!E)throw new gx(w);return E});let m;u?m=_A(y,p):m=[xA(y[0],p)];const v=d.map((w,E)=>{const T=m[E];if(!T||Object.keys(T).length===0)return null;const B=y[E],D=this.validateData(T,`update`,w),O=Object.assign({},B,D),M=this.config.getKey(B),G=this.config.getKey(O);if(M!==G)throw new yx(M,G);const k=this.generateGlobalKey(G,O);return{mutationId:crypto.randomUUID(),original:B,modified:O,changes:Object.fromEntries(Object.keys(T).map(L=>[L,O[L]])),globalKey:k,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Fa({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Fa({metadata:{[rc]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class NA extends nw{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function lp(n){const t=new op(n);return n.utils?t.utils=n.utils:t.utils={},t}class op{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new nx;if(!t.sync)throw new sx;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ai(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new sA,this._events=new NA,this._indexes=new dA,this._lifecycle=new lA(t,this.id),this._mutations=new jA(t,this.id),this._state=new XT(t),this._sync=new oA(t,this.id),this.comparisonOpts=BA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return YT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function BA(n){if(n.defaultStringCollation){const t=n.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function LA(n){return!!n&&(typeof n==`object`||typeof n==`function`)&&typeof n.then==`function`}function IA(n){const{mutationFn:t,onMutate:i,...r}=n;return l=>{const o=Fa({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(LA(u))throw new Cx}),o}}function HA(n){const t=qA(n);let i=n,r,l=0;const o=10;for(;law(u)),l=lw(r),o=iw(n);for(const[u,d]of l.singleSource)KA(n,u)&&!o.has(u)&&t.set(u,d);return t}function KA(n,t){if(n.from.alias===t)return n.from.type===`collectionRef`;if(n.join){for(const i of n.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function iw(n){const t=new Set;if(n.join){const i=n.from.alias;for(const r of n.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function Ed(n){const t={...n,from:n.from.type===`queryRef`?new yn(Ed(n.from.query),n.from.alias):n.from,join:n.join?.map(i=>({...i,from:i.from.type===`queryRef`?new yn(Ed(i.from.query),i.from.alias):i.from}))};return VA(t)}function VA(n){if(!n.where||n.where.length===0)return n;if(!n.join||n.join.length===0){if(n.where.length>1){const d=xd(n.where),p=Ec(d);return{...n,where:[p]}}return n}const t=n.where.filter(d=>!sS(d)),r=xd(t).map(d=>aw(d)),l=lw(r),o=GA(n,l),u=n.where.filter(d=>sS(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function rw(n){return{...n,from:Cd(n.from),join:n.join?.map(t=>({...t,from:Cd(t.from)}))}}function Cd(n){if(n.type===`collectionRef`)return n;const t=rw(n.query);if($A(t)){const i=Cd(t.from);return i.type===`collectionRef`?new zr(i.collection,n.alias):new yn(i.query,n.alias)}return new yn(t,n.alias)}function $A(n){return(!n.where||n.where.length===0)&&!n.select&&(!n.groupBy||n.groupBy.length===0)&&(!n.having||n.having.length===0)&&(!n.orderBy||n.orderBy.length===0)&&(!n.join||n.join.length===0)&&n.limit===void 0&&n.offset===void 0&&!n.fnSelect&&(!n.fnWhere||n.fnWhere.length===0)&&(!n.fnHaving||n.fnHaving.length===0)}function xd(n){const t=[];for(const i of n){const r=Zd(i);t.push(...cp(r))}return t}function cp(n){if(n.type===`func`&&n.name===`and`){const t=[];for(const i of n.args)t.push(...cp(i));return t}else return[n]}function aw(n){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(n),{expression:n,touchedSources:t,hasNamespaceOnlyRef:i}}function lw(n){const t=new Map,i=[];for(const o of n)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Ec(u));const l=i.length>0?Ec(i):void 0;return{singleSource:r,multiSource:l}}function GA(n,t){const i=new Set,r=iw(n),l=new Map;for(const[m,v]of t.singleSource)r.has(m)||l.set(m,v);const o=MS(n.from,l,i),u=n.join?n.join.map(m=>({...m,from:MS(m.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[m,v]of t.singleSource)i.has(m)?p&&d.push(tx(v)):d.push(v);const g=d.length>1?[Ec(d.flatMap(m=>cp(Zd(m))))]:d;return{select:n.select,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,distinct:n.distinct,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function xr(n){return{from:n.from.type===`collectionRef`?new zr(n.from.collection,n.from.alias):new yn(xr(n.from.query),n.from.alias),select:n.select,join:n.join?n.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new zr(t.from.collection,t.from.alias):new yn(xr(t.from.query),t.from.alias)})):void 0,where:n.where?[...n.where]:void 0,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0}}function MS(n,t,i){const r=t.get(n.alias);if(!r)return n.type===`collectionRef`?new zr(n.collection,n.alias):new yn(xr(n.query),n.alias);if(n.type===`collectionRef`){const u={from:new zr(n.collection,n.alias),where:[r]};return i.add(n.alias),new yn(u,n.alias)}if(!ZA(n.query,r,n.alias))return new yn(xr(n.query),n.alias);if(PA(n.query,r,n.alias))return new yn(xr(n.query),n.alias);const l=n.query.where||[],o={...xr(n.query),where:[...l,r]};return i.add(n.alias),new yn(o,n.alias)}function YA(n,t,i){return n.select?ow(n.select)||WA(n.select,t,i):!1}function QA(n){return n.groupBy&&n.groupBy.length>0}function JA(n){return n.having&&n.having.length>0}function XA(n){return n.orderBy&&n.orderBy.length>0&&(n.limit!==void 0||n.offset!==void 0)}function FA(n){return n.fnSelect||n.fnWhere&&n.fnWhere.length>0||n.fnHaving&&n.fnHaving.length>0}function ZA(n,t,i){return!(YA(n,t,i)||QA(n)||JA(n)||XA(n)||FA(n))}function ow(n){for(const t of Object.values(n))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&ow(i))return!0}return!1}function up(n){const t=[];if(n==null||typeof n!=`object`)return t;switch(n.type){case`ref`:t.push(n);break;case`func`:case`agg`:for(const i of n.args??[])t.push(...up(i));break}return t}function WA(n,t,i){const r=new Set;for(const[o,u]of Object.entries(n))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Re||r.add(o);const l=up(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function PA(n,t,i){const r=up(t);if(r.every(o=>o.path[0]!==i))return!1;if(n.fnSelect)return!0;const l=n.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Re)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==n.from.alias||g!==u[1])return!0}return!1}function Ec(n){if(n.length===0)throw new n_;return n.length===1?n[0]:new Ve(`and`,n)}function tO(n,t,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D){let O=n;for(const M of t)O=eO(O,M,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D);return O}function eO(n,t,i,r,l,o,u,d,p,g,y,m,v,b,w,E,T,B,D){const O=t.from.type===`collectionRef`,{alias:M,input:G,collectionId:k}=sO(t.from,o,p,g,y,m,v,b,u,d,E,T,B,D);i[M]=G,O&&(T[M]=k);const L=p[r],X=p[k];if(!L)throw new lS(r);if(!X)throw new lS(k);const{activeSource:tt,lazySource:F}=rO(t.type,L,X),at=Object.keys(i),{mainExpr:et,joinedExpr:wt}=nO(t.left,t.right,at,M),Bt=ue(et),ht=ue(wt);let U=n.pipe(le(([W,st])=>[Er(Bt(st)),[W,st]])),q=G.pipe(le(([W,st])=>{const ut={[M]:st};return[Er(ht(ut)),[W,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new $x(t.type);if(tt){const W=tt===`main`?t.from:w.from,st=W.type===`queryRef`&&(W.query.limit||W.query.offset),ut=et.type===`func`||wt.type===`func`;if(!st&&!ut){const _=tt===`main`?M:l;m.add(_);const H=tt===`main`?U:q,J=al(w,tt===`main`?wt:et,F),ot=J.collection,it=J.path[0];it&&Kc(it,J.path,ot);const vt=H.pipe(TT(xt=>{const bt=B[_]||_,$e=g[bt];if(!$e)throw new s_(bt,_,F.id,Object.keys(g));if($e.hasLoadedInitialState())return;const Ge=xt.getInner().map(([[wn]])=>wn),$n=new Re(J.path);$e.requestSnapshot({where:WT($n,Ge),optimizedOnly:!0})||$e.requestSnapshot()}));tt===`main`?U=vt:q=vt}}return U.pipe(tw(q,t.type),iO(t.type))}function nO(n,t,i,r){const l=i.filter(d=>d!==r),o=_d(n),u=_d(t);if(o&&l.includes(o)&&u===r)return{mainExpr:n,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:n};throw!o||!u?new Yx:o===u?new Gx(o):l.includes(o)?u!==r?new Jx(r):new Xx:new Qx(o)}function _d(n){switch(n.type){case`ref`:return n.path[0]||null;case`func`:{const t=new Set;for(const i of n.args){const r=_d(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function sO(n,t,i,r,l,o,u,d,p,g,y,m,v,b){switch(n.type){case`collectionRef`:{const w=t[n.alias];if(!w)throw new Hv(n.alias,n.collection.id,Object.keys(t));return m[n.alias]=n.collection.id,{alias:n.alias,input:w,collectionId:n.collection.id}}case`queryRef`:{const w=g.get(n.query)||n.query,E=y(w,t,i,r,l,o,u,d,p,g);Object.assign(m,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(n.query),B=n.query.from.alias;if(!(!T&&n.alias===B))for(const[k,L]of E.sourceWhereClauses)b.set(k,L);const O=Object.keys(E.aliasToCollectionId).find(k=>E.aliasToCollectionId[k]===E.collectionId);O&&O!==n.alias&&(v[n.alias]=O);const G=E.pipeline.pipe(le(k=>{const[L,[X,tt]]=k;return[L,X]}));return{alias:n.alias,input:G,collectionId:E.collectionId}}default:throw new Fx(n.type)}}function iO(n){return function(t){return t.pipe(ps(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return n===`inner`?!!(u&&d):n===`left`?!!u:n===`right`?!!d:!0}),le(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],y={};return d&&Object.assign(y,d),g&&Object.assign(y,g),[`[${u},${p}]`,y]}))}}function rO(n,t,i){switch(n){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeoO(l,r)))}function uO(n){return n.type===`agg`}function fO(n){return n&&typeof n==`object`&&!jr(n)}function cw(n,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const y=[...n],m=g?l:new Re(p.split(`.`)),v=ue(m);i.push({kind:`merge`,targetPath:y,source:v})}else{const y=p,m=[...n];i.push({kind:`merge`,targetPath:m,source:v=>v[y]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});continue}if(fO(o)){cw([...n,r],o,i);continue}if(uO(o)||Nr(o))i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});else{if(o===void 0||!jr(o)){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>o});continue}if(o instanceof Ue){const u=o.value;i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:ue(o)})}}}const Tr=Symbol(`includesRouting`);function Cc(n,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,y,m){const v=p.get(n);if(v)return v;Ad(n);const{optimizedQuery:b,sourceWhereClauses:w}=HA(n);let E=b;g.set(E,n),Rd(E,n,g);const T={...t},B={},D={},O={},{alias:M,input:G,collectionId:k}=dO(E.from,T,i,r,l,o,u,d,p,g,B,D,w);O[M]=G;let L=G;if(y&&m){const ht=m.path.slice(1);L=G.pipe(le(([W,st])=>[mO(st,ht),[W,st]])).pipe(tw(y,`inner`)).pipe(ps(([W,[st]])=>st!=null),le(([W,[st,ut]])=>{const[_,H]=st,Q={...H,__correlationKey:W};return ut!=null&&(Q.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Q]})),O[M]=L}let X=L.pipe(le(([ht,U])=>{const{__parentContext:q,...W}=U,st={[M]:W};return q&&(Object.assign(st,q),st.__parentContext=q),[ht,st]}));if(E.join&&E.join.length>0&&(X=tO(X,E.join,O,k,M,T,p,g,i,r,l,o,u,d,n,Cc,B,D,w)),E.where&&E.where.length>0)for(const ht of E.where){const U=Zd(ht),q=ue(U);X=X.pipe(ps(([W,st])=>_r(q(st))))}if(E.fnWhere&&E.fnWhere.length>0)for(const ht of E.fnWhere)X=X.pipe(ps(([U,q])=>_r(ht(q))));const tt=[],F=[];if(E.select){const ht=gO(E.select);ht.length>0&&(E={...E,select:{...E.select}});for(const{key:U,subquery:q}of ht){const W=ue(q.correlationField);let st;if(q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:ue(Q)}));st=X.pipe(le(([Q,J])=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(J);let xt=ot[it.alias];for(let bt=0;bt[W(Q),null]));st=st.pipe(Xv(H=>H.map(([Q,J])=>[Q,J>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=Cc(ut,T,i,r,l,o,u,d,p,g,st,q.childCorrelationField);if(Object.assign(B,_.aliasToCollectionId),Object.assign(D,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const H=q.parentProjection.map(J=>({alias:J.path[0],field:J.path.slice(1),compiled:ue(J)})),Q=W;F.push({fieldName:q.fieldName,getRouting:J=>{const ot={};for(const it of H){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(J);let xt=ot[it.alias];for(let bt=0;bt({correlationKey:W(H),parentContext:null})});yO(E.select,U)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new zx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new jx;E.fnSelect?X=X.pipe(le(([ht,U])=>{const q=E.fnSelect(U);return[ht,{...U,$selected:q}]})):E.select?X=cO(X,E.select):X=X.pipe(le(([ht,U])=>{const q=!E.join&&!E.groupBy?U[M]:U;return[ht,{...U,$selected:q}]})),F.length>0&&(X=X.pipe(le(([ht,U])=>{const q={};for(const{fieldName:W,getRouting:st}of F)q[W]=st(U);return U.$selected[Tr]=q,[ht,U]})));const at=y?M:void 0;if(E.groupBy&&E.groupBy.length>0?X=ES(X,E.groupBy,E.having,E.select,E.fnHaving,k,at):E.select&&Object.values(E.select).some(U=>U.type===`agg`||Nr(U))&&(X=ES(X,[],E.having,E.select,E.fnHaving,k,at)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(U=>U.type===`agg`):!1))throw new Bx;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const ht of E.fnHaving)X=X.pipe(ps(([U,q])=>ht(q)));if(E.distinct&&(X=X.pipe(gT(([ht,U])=>U.$selected))),E.orderBy&&E.orderBy.length>0){const ht=y&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const H=_?.[M]?.__correlationKey,Q=_?.__parentContext;return Q!=null?JSON.stringify([H,Q]):H}:void 0,W=GT(n,X,E.orderBy,E.select||{},i[k],u,d,E.limit,E.offset,ht).pipe(le(([ut,[_,H]])=>{const Q=_.$selected,J=kS(Od(Q),_);if(y){const ot=_[M]?.__correlationKey,it=_.__parentContext??null;return delete J.__correlationKey,delete J.__parentContext,[ut,[J,H,ot,it]]}return[ut,[J,H]]})),st={collectionId:k,pipeline:W,sourceWhereClauses:w,aliasToCollectionId:B,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(n,st),st}else if(E.limit!==void 0||E.offset!==void 0)throw new Lx;const wt=X.pipe(le(([ht,U])=>{const q=U.$selected,W=kS(Od(q),U);if(y){const st=U[M]?.__correlationKey,ut=U.__parentContext??null;return delete W.__correlationKey,delete W.__parentContext,[ht,[W,void 0,st,ut]]}return[ht,[W,void 0]]})),Bt={collectionId:k,pipeline:wt,sourceWhereClauses:w,aliasToCollectionId:B,aliasRemapping:D,includes:tt.length>0?tt:void 0};return p.set(n,Bt),Bt}function hO(n){const t=new Set;if(n.from.type===`collectionRef`&&t.add(n.from.alias),n.join)for(const i of n.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Ad(n,t=new Set){const i=hO(n);for(const l of i)if(t.has(l))throw new Ix(l,Array.from(t));const r=new Set([...t,...i]);if(n.from.type===`queryRef`&&Ad(n.from.query,r),n.join)for(const l of n.join)l.from.type===`queryRef`&&Ad(l.from.query,r)}function dO(n,t,i,r,l,o,u,d,p,g,y,m,v){switch(n.type){case`collectionRef`:{const b=t[n.alias];if(!b)throw new Hv(n.alias,n.collection.id,Object.keys(t));return y[n.alias]=n.collection.id,{alias:n.alias,input:b,collectionId:n.collection.id}}case`queryRef`:{const b=g.get(n.query)||n.query,w=Cc(b,t,i,r,l,o,u,d,p,g);Object.assign(y,w.aliasToCollectionId),Object.assign(m,w.aliasRemapping);const E=g.has(n.query),T=n.query.from.alias;if(!(!E&&n.alias===T))for(const[G,k]of w.sourceWhereClauses)v.set(G,k);const D=Object.keys(w.aliasToCollectionId).find(G=>w.aliasToCollectionId[G]===w.collectionId);D&&D!==n.alias&&(m[n.alias]=D);const M=w.pipeline.pipe(le(G=>{const[k,[L,X]]=G,tt=Od(L);return[k,tt]}));return{alias:n.alias,input:M,collectionId:w.collectionId}}default:throw new Hx(n.type)}}function pO(n){return n instanceof Ue||n&&typeof n==`object`&&`type`in n&&n.type===`val`}function Od(n){return pO(n)?n.value:n}function kS(n,t){if(!n||typeof n!=`object`)return n;let i=!1;for(const r of hd)if(n[r]==null&&r in t){i=!0;break}if(!i)return n;for(const r of hd)n[r]==null&&r in t&&(n[r]=t[r]);return n}function Rd(n,t,i){if(n.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(n.from.query,t.from.query),Rd(n.from.query,t.from.query,i)),n.join&&t.join)for(let r=0;r1)return new Re(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Re([r[0]])}return new Re(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of n.args){const o=fp(l,t);r.push(o)}return new Ve(n.name,r)}}function hp(n,t){return n.map(r=>{const l=fp(r.expression,t);return{...r,expression:l}})}const hw=new WeakMap;function SO(n){return n.utils?.[ip]?.getBuilder?.()}function vO(n,t){hw.set(n,t)}function wO(n){return hw.get(n)}class Zt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Xo(i,d)}if(Array.isArray(t))throw new Xo(i,`array`);if(r.length!==1)throw r.length===0?new Xo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Xo(i,`string`):new Rx(i);const l=r[0],o=t[l];let u;if(o instanceof op)u=new zr(o,l);else if(o instanceof Zt){const d=o._getQuery();if(!d.from)throw new Dx(i);u=new yn(d,l)}else throw new Mx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Zt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=vi(d),g=i(p);let y,m;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)y=g.args[0],m=g.args[1];else throw new kx;const v={from:o,type:r,left:y,right:m},b=this.query.join||[];return new Zt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=ac(l)?ne(l):l;if(!jr(o))throw new aS(US(o));const u=this.query.where||[];return new Zt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?TS(i):vi(i),l=t(r),o=ac(l)?ne(l):l;if(!jr(o))throw new aS(US(o));const u=this.query.having||[];return new Zt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=vi(i);let l=t(r);ac(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=pw(l,i);return new Zt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?TS(r):vi(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=y=>({expression:ne(y),compareOptions:u}),p=Array.isArray(o)?o.map(y=>d(y)):[d(o)],g=this.query.orderBy||[];return new Zt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=Array.isArray(l)?l.map(d=>ne(d)):[ne(l)],u=this.query.groupBy||[];return new Zt({...this.query,groupBy:[...u,...o]})}limit(t){return new Zt({...this.query,limit:t})}offset(t){return new Zt({...this.query,offset:t})}distinct(){return new Zt({...this.query,distinct:!0})}findOne(){return new Zt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Zt({...t.query,select:void 0,fnSelect:i})},where(i){return new Zt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Zt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new Ux;return this.query}}function US(n){return n===null?`null`:n===void 0?`undefined`:typeof n==`object`?`object`:typeof n}function bO(n){return n===void 0?ne(null):n instanceof Iv||n instanceof Ve||n instanceof Re||n instanceof Ue?n:ne(n)}function dw(n){return n!==null&&typeof n==`object`&&!jr(n)&&!n.__refProxy}function pw(n,t=[]){if(!dw(n))return bO(n);const i={};for(const[r,l]of Object.entries(n)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Zt){i[r]=Vh(l,r,t,`collection`);continue}if(l instanceof PT){if(!(l.query instanceof Zt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Vh(l.query,r,t,`array`);continue}if(l instanceof tA){if(!(l.query instanceof Zt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Vh(l.query,r,t,`concat`);continue}i[r]=pw(l,t)}return i}function dp(n){const t=[];switch(n.type){case`ref`:t.push(n);break;case`func`:for(const i of n.args??[])t.push(...dp(i));break}return t}function EO(n,t){const i=typeof n==`object`&&`expression`in n?n.expression:n;return dp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Vh(n,t,i,r){const l=n._getQuery(),o=[l.from.alias];if(l.join)for(const O of l.join)o.push(O.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let O=0;O=2){for(let k=0;k eq(child.parentId, parent.id))`);const y=[...l.where];if(g>=0){const O=y[p],G=(typeof O==`object`&&`expression`in O?O.expression:O).args.filter((k,L)=>L!==g);if(G.length===1){const k=typeof O==`object`&&`expression`in O&&O.residual;y[p]=k?{expression:G[0],residual:!0}:G[0]}else{const k=new Ve(`and`,G),L=typeof O==`object`&&`expression`in O&&O.residual;y[p]=L?{expression:k,residual:!0}:k}}else y.splice(p,1);const m=[],v=[];for(const O of y)EO(O,i)?v.push(O):m.push(O);let b;if(v.length>0){const O=new Set;b=[];for(const M of v){const G=typeof M==`object`&&`expression`in M?M.expression:M;for(const k of dp(G))k.path[0]!=null&&i.includes(k.path[0])&&!O.has(k.path.join(`.`))&&(O.add(k.path.join(`.`)),b.push(k))}}const w={...l,where:m.length>0?m:void 0},E=w.select,T=E===void 0||dw(E);let B=w,D;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);D=PC,B={...w,select:{[D]:E}}}return new Ti(B,u,d,t,v.length>0?v:void 0,b,r,D)}function zS(n,t,i,r){if(n.type===`ref`&&t.type===`ref`){const l=n.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:n,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:n}}}function CO(n){const t=n(new Zt);return gw(t)}function gw(n){return n._getQuery()}function xO(n){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?r(d.query):pp(d)&&l(d))}return r(n),t}function yw(n){const t=n.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return yw(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(n)}`)}function _O(n){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?l(d.query):pp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(n),t}function pp(n){return!(n===null||typeof n!=`object`||n instanceof Ti||`type`in n&&typeof n.type==`string`||n.__refProxy)}function TO(n){const t=typeof n.query==`function`?CO(n.query):gw(n.query);if(t.select&&!pp(t.select))throw new Nx;return t}function AO(n,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&n.sendData(new ee(r)),r.length}function*OO(n){for(const t of n)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function RO(n,t){const i=[];for(const r of n){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function DO(n,t,i,r){let l=t,o=!1;for(const u of n){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function MO(n,t){const{orderBy:i,limit:r,offset:l}=n,o=r!==void 0&&l!==void 0?r+l:r,u=i?hp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const y=g.path;return Array.isArray(y)&&y.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function kO(n,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=n,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const y=ll({minValues:g??null,offset:d,limit:l});if(i===y)return;const m=hp(o,r);return{minValues:g,normalizedOrderBy:m,loadRequestKey:y}}const jS=Symbol.for(`@tanstack/db.collection-config-builder`);class UO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=fp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=RO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=AO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=MO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const y={},m=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const B=OO(T);this.sendChangesToPipelineWithTracking(B,y.current)},v=this.collection.subscribeChanges(m,{whereExpression:t,onStatusChange:r});y.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=hp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[jS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[jS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=kO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=DO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let zO=0;class jO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++zO}`,this.query=TO({query:t.query}),this.collections=xO(this.query);const i=_O(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=mw(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??yw(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[ip]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new r_;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??oc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const y of g)p.add(y)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;wc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=wc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new uT,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=Cc(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new i_(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(gd(y=>{const m=y.getInner();i.messagesCount+=m.length,m.reduce(KO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const y=p.size>0,m=HO(g);if(!y&&!m)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}y&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Dd(g,t.collection,this.id,y?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(gd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,b]=p,w=Br(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=y),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=Sw(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=wO(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const y=new UO(u,d,p,this),m=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(m);const v=y.subscribe();return this.subscriptions[u]=v,y.loadMoreIfNeeded.bind(y,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function mw(n){return(t,i)=>{const r=n.get(t),l=n.get(i);return r&&l?rl?1:0:0}}function NS(n){return n.materialization!==`collection`}function BS(n,t){if(!t)return n.materialization===`array`?[]:n.materialization===`concat`?``:void 0;if(n.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=n.scalarField?i.map(l=>l?.[n.scalarField]):i;return n.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function Sw(n,t){return n.map(i=>{const r=new Map;i.pipeline.pipe(gd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,b]=p,w=Br(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=y),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=Sw(i.childCompilationResult.includes,t)),l})}function NO(n){return n.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function BO(n){const t=new Set;if(!n.nestedSetups)return t;for(let i=0;i0&&(b.value=m.value,m.orderByIndex!==void 0&&(b.orderByIndex=m.orderByIndex))):v.set(y,{...m})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function LO(n,t,i){if(n.nestedSetups){for(const r of n.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Tr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Br(u,d);if(u!=null){n.nestedRoutingIndex.set(p,t);let g=n.nestedRoutingReverseIndex.get(t);g||(g=new Set,n.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Tr]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Br(u,d);if(u!=null){n.nestedRoutingIndex.delete(p);const g=n.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&n.nestedRoutingReverseIndex.delete(t))}}}}function IO(n,t){if(!n.nestedRoutingReverseIndex)return;const i=n.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)n.nestedRoutingIndex.delete(r);n.nestedRoutingReverseIndex.delete(t)}}function vw(n){for(const t of n)if(t.buffer.size>0||t.nestedSetups&&vw(t.nestedSetups))return!0;return!1}function Br(n,t){return t==null?n:JSON.stringify([n,t])}function LS(n,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?mw(u):void 0,y={collection:lp({id:`__child-collection:${n}-${t}-${ll(i)}`,getKey:m=>o.get(m),compare:p,sync:{rowUpdateMode:`full`,sync:m=>(d=m,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(y.includesStates=NO(l)),y}function Dd(n,t,i,r,l){for(const o of n){if(r){for(const[y,m]of r)if(m.inserts>0){const v=m.value,b=v[Tr]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Br(w,E);if(w!=null){if(!o.childRegistry.has(T)){const M=LS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,M)}let B=o.correlationToParentKeys.get(T);B||(B=new Set,o.correlationToParentKeys.set(T,B)),B.add(y);const D=BS(o,o.childRegistry.get(T));v[o.fieldName]=D;const O=t.get(y);O&&O!==v&&(O[o.fieldName]=D)}}}const u=NS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[y,m]of o.pendingChildChanges){let v=o.childRegistry.get(y);if(v||(v=LS(i,o.fieldName,y,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(y,v)),o.materialization===`collection`&&qO(t,o.fieldName,y,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of m)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}LO(o,y,m),d.set(y,{entry:v,childChanges:m})}o.pendingChildChanges.clear()}const p=BO(o);for(const[,{entry:y,childChanges:m}]of d)y.includesStates&&Dd(y.includesStates,y.collection,y.collection.id,m,y.syncMethods);for(const y of p){if(d.has(y))continue;const m=o.childRegistry.get(y);m?.includesStates&&Dd(m.includesStates,m.collection,m.collection.id,null,m.syncMethods)}const g=NS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const y=[];for(const m of g){const v=o.correlationToParentKeys.get(m);if(!v)continue;const b=o.childRegistry.get(m);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),B={...E};E[o.fieldName]=BS(o,b),y.push({type:`update`,key:T,value:E,previousValue:B})}}}y.length>0&&t._changes.emitEvents(y,!0)}if(r){for(const[y,m]of r)if(m.deletes>0&&m.inserts===0){const v=m.value[Tr]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Br(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(y),T.size===0&&(IO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Tr]}function HO(n){for(const t of n)if(t.pendingChildChanges.size>0||t.nestedSetups&&vw(t.nestedSetups))return!0;return!1}function qO(n,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=n.get(u);d&&(d[t]=l)}}function KO(n,[[t,i],r]){const[l,o]=i,u=n.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),n.set(t,u),n}function IS(n){return new jO(n).getConfig()}function $h(n){if(typeof n==`function`){const i=IS({query:n});return HS(i)}else{const t=n,i=IS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),HS(i)}}function HS(n){const t=lp(n),i=SO(n);return i&&vO(t,i),t}function ww(n){return n!=null&&`operation`in n.headers}function bw(n){return n!=null&&`control`in n.headers}var VO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(n,t){this.handlers.set(n,t),this.existingKeys.has(n)||this.existingKeys.set(n,new Set)}dispatchChange(n){if(!ww(n))return;n.headers.txid&&typeof n.headers.txid==`string`&&this.pendingTxids.add(n.headers.txid);const t=this.handlers.get(n.type);if(!t)return;let i=n.headers.operation;if(i!==`delete`&&(typeof n.value!=`object`||n.value===null))throw new Error(`StreamDB collections require object values; got ${typeof n.value} for type=${n.type}, key=${n.key}`);const l={...n.value??{}};l[t.primaryKey]=n.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(n.type)?.has(n.key)?`update`:`insert`);const o=this.existingKeys.get(n.type);i===`insert`||i===`update`?o?.add(n.key):o?.delete(n.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:n.type,key:n.key,operation:i}),u}}dispatchControl(n){if(bw(n))switch(n.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const n of this.pendingHandlers)try{n.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const n of this.pendingTxids){this.seenTxids.add(n);const t=this.txidResolvers.get(n);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(n)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const n of this.handlers.values())n.markReady();for(const n of this.preloadResolvers)n();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((n,t)=>{this.preloadResolvers.push(n),this.preloadRejecters.push(t)})}rejectAll(n){for(const t of this.preloadRejecters)t(n);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(n);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(n,t=5e3){return this.seenTxids.has(n)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(n);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(n)}r(new Error(`Timeout waiting for txid: ${n}`))},t);this.txidResolvers.has(n)||this.txidResolvers.set(n,[]),this.txidResolvers.get(n).push({resolve:i,reject:r,timeoutId:l})})}};function $O(n,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(n,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const qS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function GO(n,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} update: ${d.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const y=i[`~standard`].validate(o);if(`issues`in y)throw new Error(`Validation failed for ${n} update (oldValue): ${y.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${n} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${n} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:n,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function Ew(n){for(const r of Object.keys(n))if(qS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(qS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(n)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(n))i[r]={...l,...GO(l.type,l.primaryKey,l.schema)};return i}function Cw(n){const{streamOptions:t,state:i,actions:r}=n,l=new jn(t),o=new VO,u={};for(const[b,w]of Object.entries(i)){const E=lp({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:$O(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const y=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const B of T.items)ww(B)?o.dispatchChange(B):bw(B)&&o.dispatchControl(B);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(B){console.error(`[StreamDB] Error processing batch:`,B),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(B),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},m={stream:l,preload:async()=>{await y(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...m};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=IA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const gp=600,YO=gp/2*1e3,QO=3600*24,JO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Gh=Ew({rooms:{schema:JO,type:`stream`,primaryKey:`roomId`}}),XO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},KS=Ew({scores:{schema:XO,type:`stream`,primaryKey:`playerName`}});function FO(n,t){return Cw({streamOptions:{url:n,headers:t,contentType:`application/json`},state:Gh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Gh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Gh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const xw=Z.createContext(null);function _w(){const n=Z.useContext(xw);if(!n)throw new Error(`useRegistryContext must be used within RegistryProvider`);return n}function ZO({children:n}){const{dsEndpoint:t,dsHeaders:i}=Yd(),[r,l]=Z.useState({registryDB:null,error:null,isLoading:!0});return Z.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,m=await new jn({url:g,headers:i,contentType:`application/json`}).head();if(d()||(m.exists||await jn.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:QO}),o=await FO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?Y.jsxs(`div`,{style:VS.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`LOADING...`})]}):r.error||!r.registryDB?Y.jsxs(`div`,{style:VS.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})]}):Y.jsx(xw.Provider,{value:{registryDB:r.registryDB},children:n})}const VS={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`}},Yh=1;function WO(n,t=[]){const i=n&&typeof n==`object`&&typeof n.subscribeChanges==`function`&&typeof n.startSyncImmediate==`function`&&typeof n.id==`string`,r=Z.useRef(null),l=Z.useRef(null),o=Z.useRef(null),u=Z.useRef(0),d=Z.useRef(null),p=!r.current||i&&o.current!==n||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)n.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. - -Instead, use a query builder function: - const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) - -Or switch to syncMode "eager" if you want all data to sync automatically.`),n.startSyncImmediate(),r.current=n,o.current=n;else if(typeof n==`function`){const w=new Zt,E=n(w);if(E==null)r.current=null;else if(E instanceof op)E.startSyncImmediate(),r.current=E;else if(E instanceof Zt)r.current=$h({query:n,startSync:!0,gcTime:Yh});else if(E&&typeof E==`object`)r.current=$h({startSync:!0,gcTime:Yh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=$h({startSync:!0,gcTime:Yh,...n}),l.current=[...t];p&&(u.current=0,d.current=null);const g=Z.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const y=Z.useRef(null);(!y.current||p)&&(y.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const m=Z.useSyncExternalStore(g.current,y.current),v=Z.useRef(null),b=Z.useRef(null);if(!v.current||v.current.version!==m.version||v.current.collection!==m.collection){if(!m.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(m.collection.entries()),T=m.collection.config.singleResult;let B=null,D=null;b.current={get state(){return B||(B=new Map(w)),B},get data(){return D||(D=w.map(([,O])=>O)),T?D[0]:D},collection:m.collection,status:m.collection.status,isLoading:m.collection.status===`loading`,isReady:m.collection.status===`ready`,isIdle:m.collection.status===`idle`,isError:m.collection.status===`error`,isCleanedUp:m.collection.status===`cleaned-up`,isEnabled:!0}}v.current=m}return b.current}const qt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Wo=[{label:`32x32`,cols:32,rows:32},{label:`64x64`,cols:64,rows:64},{label:`128x128`,cols:128,rows:128}];function Qh(n,t){return`${n}__${t.cols}x${t.rows}`}function PO(){const n=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=n[Math.floor(Math.random()*n.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function tR({playerName:n,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=_w(),[l,o]=Z.useState(PO),[u,d]=Z.useState(1),[p,g]=Z.useState(!1),[y,m]=Z.useState(0),[v,b]=Z.useState(!1),[w,E]=Z.useState(``),[,T]=Z.useState(0);Z.useEffect(()=>{const k=setInterval(()=>T(L=>L+1),1e3);return()=>clearInterval(k)},[]);const{data:B=[]}=WO(k=>k.from({rooms:r.collections.rooms})),D=Date.now(),M=[...B.filter(k=>k.expiresAt>D)].sort((k,L)=>L.createdAt-k.createdAt),G=async()=>{if(!p){g(!0);try{const k=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,L=Wo[u],X=Qh(k,L),tt=Date.now(),F={roomId:X,name:k,boardSize:`${L.cols}x${L.rows}`,createdAt:tt,expiresAt:tt+gp*1e3};await r.actions.addRoom(F),o(``),i(X)}catch(k){console.error(`Failed to create room:`,k)}finally{g(!1)}}};return Y.jsxs(`div`,{style:me.container,children:[Y.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - .lobby-btn:active { opacity: 0.7; } - `}),Y.jsx(`div`,{style:me.title,children:`TERRITORY WARS`}),Y.jsx(`div`,{style:{fontSize:7,color:qt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Claim 20% territory or lead when time runs out.`}),Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`NAME`}),Y.jsx(`input`,{style:me.input,value:n,onChange:k=>t(k.target.value),placeholder:`Enter your name...`,maxLength:20})]}),Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`ROOM`}),Y.jsx(`input`,{style:me.input,value:l,onChange:k=>o(k.target.value),placeholder:`room name`,onKeyDown:k=>k.key===`Enter`&&G()}),Y.jsx(`div`,{style:me.cardTitle,children:`BOARD SIZE`}),Y.jsx(`div`,{style:{display:`flex`,gap:6,marginBottom:10},children:Wo.map((k,L)=>Y.jsx(`button`,{className:`lobby-btn`,style:{flex:1,padding:`6px 0`,fontSize:7,fontFamily:`inherit`,background:L===u?qt.accent:`transparent`,color:L===u?`#000`:qt.accent,border:`1px solid ${qt.accent}`,cursor:`pointer`,letterSpacing:1},onClick:()=>d(L),children:k.label},k.label))}),Y.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{...me.createBtn,flex:1,opacity:p?.6:1},onClick:G,disabled:p,children:p?`STARTING...`:`START`}),Y.jsx(`button`,{className:`lobby-btn`,style:{...me.joinBtn,flex:1},onClick:()=>b(!0),children:`JOIN`})]})]}),v&&Y.jsx(`div`,{style:{position:`fixed`,inset:0,background:`rgba(27,27,31,0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:10},onClick:()=>b(!1),children:Y.jsxs(`div`,{style:{...me.card,marginBottom:0},onClick:k=>k.stopPropagation(),children:[Y.jsx(`div`,{style:me.cardTitle,children:`JOIN ROOM`}),Y.jsx(`input`,{style:me.input,value:w,onChange:k=>E(k.target.value),placeholder:`enter room name`,autoFocus:!0,onKeyDown:k=>{if(k.key===`Enter`&&w.trim()){const L=M.find(X=>X.name===w.trim());i(L?L.roomId:Qh(w.trim(),Wo[u]))}}}),Y.jsxs(`div`,{style:{display:`flex`,gap:6},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{...me.joinBtn,flex:1},onClick:()=>b(!1),children:`CANCEL`}),Y.jsx(`button`,{className:`lobby-btn`,style:{...me.createBtn,flex:1,opacity:w.trim()?1:.4},disabled:!w.trim(),onClick:()=>{if(w.trim()){const k=M.find(L=>L.name===w.trim());i(k?k.roomId:Qh(w.trim(),Wo[u]))}},children:`JOIN`})]})]})}),M.length>0&&Y.jsxs(`div`,{style:me.card,children:[Y.jsx(`div`,{style:me.cardTitle,children:`ROOMS`}),Y.jsx(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:M.slice(y*3,y*3+3).map(k=>Y.jsx(eR,{room:k,onJoin:()=>i(k.roomId)},k.roomId))}),M.length>3&&Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[Y.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:qt.bg,color:qt.dim,border:`1px solid ${qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y===0?.3:1},disabled:y===0,onClick:()=>m(k=>k-1),children:`<`}),Y.jsxs(`span`,{style:{fontSize:7,color:qt.dim,lineHeight:`24px`},children:[y+1,`/`,Math.ceil(M.length/3)]}),Y.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:qt.bg,color:qt.dim,border:`1px solid ${qt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y>=Math.ceil(M.length/3)-1?.3:1},disabled:y>=Math.ceil(M.length/3)-1,onClick:()=>m(k=>k+1),children:`>`})]})]})]})}function eR({room:n,onJoin:t}){const[i,r]=Z.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(n.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return Y.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:qt.bg,border:`1px solid ${qt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[Y.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:Y.jsx(`span`,{style:{fontSize:8,color:i?qt.accent:qt.text,cursor:`pointer`},children:i?`COPIED`:n.name})}),Y.jsx(`button`,{className:`lobby-btn`,style:{background:qt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const me={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:qt.bg,color:qt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:qt.accent,marginBottom:6},card:{background:qt.card,border:`1px solid ${qt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:qt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:qt.bg,border:`1px solid ${qt.border}`,padding:`8px 10px`,color:qt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:qt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},joinBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:`transparent`,color:qt.accent,border:`1px solid ${qt.accent}`,cursor:`pointer`,letterSpacing:2}},Tn=()=>new Map,Md=n=>{const t=Tn();return n.forEach((i,r)=>{t.set(r,i)}),t},Ps=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r},nR=(n,t)=>{const i=[];for(const[r,l]of n)i.push(t(l,r));return i},sR=(n,t)=>{for(const[i,r]of n)if(t(r,i))return!0;return!1},Lr=()=>new Set,Jh=n=>n[n.length-1],iR=(n,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(n);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ei((this._observers.get(t)||Tn()).values()).forEach(r=>r(...i))}destroy(){this._observers=Tn()}};const In=Math.floor,cc=Math.abs,Aw=(n,t)=>nn>t?n:t,Ow=n=>n!==0?n<0:1/n<0,$S=1,GS=2,Xh=4,Fh=8,ul=32,gs=64,sn=128,$c=31,kd=63,bi=127,lR=2147483647,xc=Number.MAX_SAFE_INTEGER,YS=Number.MIN_SAFE_INTEGER,oR=Number.isInteger||(n=>typeof n==`number`&&isFinite(n)&&In(n)===n),cR=String.fromCharCode,uR=n=>n.toLowerCase(),fR=/^\s*/g,hR=n=>n.replace(fR,``),dR=/([A-Z])/g,QS=(n,t)=>hR(n.replace(dR,i=>`${t}${uR(i)}`)),pR=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lfl.encode(n),yR=fl?gR:pR;let el=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});el&&el.decode(new Uint8Array).length===1&&(el=null);const mR=(n,t)=>rR(t,()=>n).join(``);let xl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}};const Gc=()=>new xl,SR=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(SR(n));let i=0;for(let r=0;r{const i=n.cbuf.length;i-n.cpos{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Ud=Se,Mt=(n,t)=>{for(;t>bi;)Se(n,sn|bi&t),t=In(t/128);Se(n,bi&t)},mp=(n,t)=>{const i=Ow(t);for(i&&(t=-t),Se(n,(t>kd?sn:0)|(i?gs:0)|kd&t),t=In(t/64);t>0;)Se(n,(t>bi?sn:0)|bi&t),t=In(t/128)},zd=new Uint8Array(3e4),wR=zd.length/3,bR=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Mt(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=Aw(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array($r(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},en=(n,t)=>{Mt(n,t.byteLength),Yc(n,t)},Sp=(n,t)=>{vR(n,t);const i=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,i},CR=(n,t)=>Sp(n,4).setFloat32(0,t,!1),xR=(n,t)=>Sp(n,8).setFloat64(0,t,!1),_R=(n,t)=>Sp(n,8).setBigInt64(0,t,!1),JS=new DataView(new ArrayBuffer(4)),TR=n=>(JS.setFloat32(0,n),JS.getFloat32(0)===n),hl=(n,t)=>{switch(typeof t){case`string`:Se(n,119),Ar(n,t);break;case`number`:oR(t)&&cc(t)<=lR?(Se(n,125),mp(n,t)):TR(t)?(Se(n,124),CR(n,t)):(Se(n,123),xR(n,t));break;case`bigint`:Se(n,122),_R(n,t);break;case`object`:if(t===null)Se(n,126);else if(Vc(t)){Se(n,117),Mt(n,t.length);for(let i=0;i0&&Mt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const FS=n=>{n.count>0&&(mp(n.encoder,n.count===1?n.s:-n.s),n.count>1&&Mt(n.encoder,n.count-2))};class uc{constructor(){this.encoder=new xl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(FS(this),this.count=1,this.s=t)}toUint8Array(){return FS(this),Ln(this.encoder)}}const ZS=n=>{if(n.count>0){const t=n.diff*2+(n.count===1?0:1);mp(n.encoder,t),n.count>1&&Mt(n.encoder,n.count-2)}};class Zh{constructor(){this.encoder=new xl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(ZS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return ZS(this),Ln(this.encoder)}}class AR{constructor(){this.sarr=[],this.s=``,this.lensE=new uc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new xl;return this.sarr.push(this.s),this.s=``,Ar(t,this.sarr.join(``)),Yc(t,this.lensE.toUint8Array()),Ln(t)}}const Hn=n=>new Error(n),An=()=>{throw Hn(`Method unimplemented`)},Sn=()=>{throw Hn(`Unexpected case`)},Rw=Hn(`Unexpected end of array`),Dw=Hn(`Integer out of Range`);let Qc=class{constructor(t){this.arr=t,this.pos=0}};const vp=n=>new Qc(n),OR=n=>n.pos!==n.arr.length,RR=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},nn=n=>RR(n,Rt(n)),Ir=n=>n.arr[n.pos++],Rt=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posxc)throw Dw}throw Rw},wp=n=>{let t=n.arr[n.pos++],i=t&kd,r=64;const l=(t&gs)>0?-1:1;if((t&sn)===0)return l*i;const o=n.arr.length;for(;n.posxc)throw Dw}throw Rw},DR=n=>{let t=Rt(n);if(t===0)return``;{let i=String.fromCodePoint(Ir(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(Ir(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},MR=n=>el.decode(nn(n)),Or=el?MR:DR,bp=(n,t)=>{const i=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,i},kR=n=>bp(n,4).getFloat32(0,!1),UR=n=>bp(n,8).getFloat64(0,!1),zR=n=>bp(n,8).getBigInt64(0,!1),jR=[n=>{},n=>null,wp,kR,UR,zR,n=>!1,n=>!0,Or,n=>{const t=Rt(n),i={};for(let r=0;r{const t=Rt(n),i=[];for(let r=0;rjR[127-Ir(n)](n);class WS extends Qc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),OR(this)?this.count=Rt(this)+1:this.count=-1),this.count--,this.s}}class fc extends Qc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=wp(this);const t=Ow(this.s);this.count=1,t&&(this.s=-this.s,this.count=Rt(this)+2)}return this.count--,this.s}}class Wh extends Qc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=wp(this),i=t&1;this.diff=In(t/2),this.count=1,i&&(this.count=Rt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class NR{constructor(t){this.decoder=new fc(t),this.str=Or(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const BR=crypto.getRandomValues.bind(crypto),Mw=()=>BR(new Uint32Array(1))[0],LR=`10000000-1000-4000-8000`+-1e11,IR=()=>LR.replace(/[018]/g,n=>(n^Mw()&15>>n/4).toString(16)),PS=n=>new Promise(n);Promise.all.bind(Promise);const tv=n=>n===void 0?null:n;class HR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let kw=new HR,qR=!0;try{typeof localStorage<`u`&&localStorage&&(kw=localStorage,qR=!1)}catch{}const KR=kw,pl=Symbol(`Equality`),Uw=(n,t)=>n===t||!!n?.[pl]?.(t)||!1,VR=n=>typeof n==`object`,$R=Object.assign,GR=Object.keys,YR=(n,t)=>{for(const i in n)t(n[i],i)},_c=n=>GR(n).length,QR=n=>{for(const t in n)return!1;return!0},_l=(n,t)=>{for(const i in n)if(!t(n[i],i))return!1;return!0},Ep=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),JR=(n,t)=>n===t||_c(n)===_c(t)&&_l(n,(i,r)=>(i!==void 0||Ep(t,r))&&Uw(t[r],i)),XR=Object.freeze,zw=n=>{for(const t in n){const i=n[t];(typeof i==`object`||typeof i==`function`)&&zw(n[t])}return XR(n)},Cp=(n,t,i=0)=>{try{for(;i{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[pl]!=null)return n[pl](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(n);var jw={};const gl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let zn;const ZR=()=>{if(zn===void 0)if(gl){zn=Tn();const n=process.argv;let t=null;for(let i=0;i{if(n.length!==0){const[t,i]=n.split(`=`);zn.set(`--${QS(t,`-`)}`,i),zn.set(`-${QS(t,`-`)}`,i)}})):zn=Tn();return zn},jd=n=>ZR().has(n),Tc=n=>tv(gl?jw[n.toUpperCase().replaceAll(`-`,`_`)]:KR.getItem(n)),Nw=n=>jd(`--`+n)||Tc(n)!==null,WR=Nw(`production`),PR=gl&&FR(jw.FORCE_COLOR,[`true`,`1`,`2`]),tD=PR||!jd(`--no-colors`)&&!Nw(`no-color`)&&(!gl||process.stdout.isTTY)&&(!gl||jd(`--color`)||Tc(`COLORTERM`)!==null||(Tc(`TERM`)||``).includes(`color`)),eD=n=>new Uint8Array(n),nD=n=>{const t=eD(n.byteLength);return t.set(n),t};class sD{constructor(t,i){this.left=t,this.right=i}}const us=(n,t)=>new sD(n,t),ev=n=>n.next()>=.5,Ph=(n,t,i)=>In(n.next()*(i+1-t)+t),Bw=(n,t,i)=>In(n.next()*(i+1-t)+t),xp=(n,t,i)=>Bw(n,t,i),iD=n=>cR(xp(n,97,122)),rD=(n,t=0,i=20)=>{const r=xp(n,t,i);let l=``;for(let o=0;ot[xp(n,0,t.length-1)],aD=Symbol(`0schema`);class lD{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(mR(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Nd=(n,t)=>n===t?!0:n==null||t==null||n.constructor!==t.constructor?!1:n[pl]?Uw(n,t):Vc(n)?yp(n,i=>Tw(t,r=>Nd(i,r))):VR(n)?_l(n,(i,r)=>Nd(i,t[r])):!1;class je{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Nd(i,r)}equals(t){return this.constructor===t.constructor&&hc(this.shape,t.shape)}[aD](){return!0}[pl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){An()}get nullable(){return Gr(this,Wc)}get optional(){return new Hw(this)}cast(t){return nv(t,this),t}expect(t){return nv(t,this),t}}class _p extends je{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const oe=(n,t=null)=>new _p(n,t);oe(_p);class Tp extends je{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const be=n=>new Tp(n);oe(Tp);class Jc extends je{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Xc=(...n)=>new Jc(n),Lw=oe(Jc),oD=RegExp.escape||(n=>n.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),Iw=n=>{if(Hr.check(n))return[oD(n)];if(Lw.check(n))return n.shape.map(t=>t+``);if(Xw.check(n))return[`[+-]?\\d+.?\\d*`];if(Fw.check(n))return[`.*`];if(Ac.check(n))return n.shape.map(Iw).flat(1);Sn()};class cD extends je{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(Iw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}oe(cD);const uD=Symbol(`optional`);class Hw extends je{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[uD](){return!0}}const fD=oe(Hw);class hD extends je{check(t,i){return i?.extend(null,`never`,typeof t),!1}}oe(hD);class Fc extends je{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Fc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):_l(this.shape,(r,l)=>{const o=this._isPartial&&!Ep(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const dD=n=>new Fc(n),pD=oe(Fc),gD=be(n=>n!=null&&(n.constructor===Object||n.constructor==null));class qw extends je{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&_l(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const Kw=(n,t)=>new qw(n,t),yD=oe(qw);class Vw extends je{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&_l(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const mD=(...n)=>new Vw(n);oe(Vw);class $w extends je{constructor(t){super(),this.shape=t.length===1?t[0]:new Ap(t)}check(t,i){const r=Vc(t)&&yp(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const Gw=(...n)=>new $w(n),SD=oe($w),vD=be(n=>Vc(n));class Yw extends je{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const wD=(n,t=null)=>new Yw(n,t);oe(Yw);const bD=wD(je);class ED extends je{constructor(t){super(),this.len=t.length-1,this.args=mD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const CD=oe(ED),xD=be(n=>typeof n==`function`);class _D extends je{constructor(t){super(),this.shape=t}check(t,i){const r=yp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}oe(_D,n=>n.shape.length>0);class Ap extends je{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=Tw(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Gr=(...n)=>n.findIndex(t=>Ac.check(t))>=0?Gr(...n.map(t=>yl(t)).map(t=>Ac.check(t)?t.shape:[t]).flat(1)):n.length===1?n[0]:new Ap(n),Ac=oe(Ap),Qw=()=>!0,Oc=be(Qw),TD=oe(Tp,n=>n.shape===Qw),Op=be(n=>typeof n==`bigint`),AD=be(n=>n===Op),Jw=be(n=>typeof n==`symbol`);be(n=>n===Jw);const Rr=be(n=>typeof n==`number`),Xw=be(n=>n===Rr),Hr=be(n=>typeof n==`string`),Fw=be(n=>n===Hr),Zc=be(n=>typeof n==`boolean`),OD=be(n=>n===Zc),Zw=Xc(void 0);oe(Jc,n=>n.shape.length===1&&n.shape[0]===void 0);Xc(void 0);const Wc=Xc(null),RD=oe(Jc,n=>n.shape.length===1&&n.shape[0]===null);oe(Uint8Array);oe(_p,n=>n.shape===Uint8Array);const DD=Gr(Rr,Hr,Wc,Zw,Op,Zc,Jw);(()=>{const n=Gw(Oc),t=Kw(Hr,Oc),i=Gr(Rr,Hr,Wc,Zc,n,t);return n.shape=i,t.shape.values=i,i})();const yl=n=>{if(bD.check(n))return n;if(gD.check(n)){const t={};for(const i in n)t[i]=yl(n[i]);return dD(t)}else{if(vD.check(n))return Gr(...n.map(yl));if(DD.check(n))return Xc(n);if(xD.check(n))return oe(n)}Sn()},nv=WR?()=>{}:(n,t)=>{const i=new lD;if(!t.check(n,i))throw Hn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class MD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:yl(t),h:i}),this}else(t){return this.if(Oc,t)}done(){return(t,i)=>{for(let r=0;rnew MD(n),Ww=kD(Oc).if(Xw,(n,t)=>Ph(t,YS,xc)).if(Fw,(n,t)=>rD(t)).if(OD,(n,t)=>ev(t)).if(AD,(n,t)=>BigInt(Ph(t,YS,xc))).if(Ac,(n,t)=>mr(t,td(t,n.shape))).if(pD,(n,t)=>{const i={};for(const r in n.shape){let l=n.shape[r];if(fD.check(l)){if(ev(t))continue;l=l.shape}i[r]=Ww(l,t)}return i}).if(SD,(n,t)=>{const i=[],r=Bw(t,0,42);for(let l=0;ltd(t,n.shape)).if(RD,(n,t)=>null).if(CD,(n,t)=>{const i=mr(t,n.res);return()=>i}).if(TD,(n,t)=>mr(t,td(t,[Rr,Hr,Wc,Zw,Op,Zc,Gw(Rr),Kw(Gr(`a`,`b`,`c`),Rr)]))).if(yD,(n,t)=>{const i={},r=Ph(t,0,3);for(let l=0;lWw(yl(t),n),Pc=typeof document<`u`?document:{};be(n=>n.nodeType===BD);typeof DOMParser<`u`&&new DOMParser;be(n=>n.nodeType===zD);be(n=>n.nodeType===jD);const UD=n=>nR(n,(t,i)=>`${i}:${t};`).join(``),zD=Pc.ELEMENT_NODE,jD=Pc.TEXT_NODE,ND=Pc.DOCUMENT_NODE,BD=Pc.DOCUMENT_FRAGMENT_NODE;be(n=>n.nodeType===ND);const ms=Symbol,Pw=ms(),tb=ms(),LD=ms(),ID=ms(),HD=ms(),eb=ms(),qD=ms(),Rp=ms(),KD=ms(),VD=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[],r=Tn();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...nb(n)),sb.forEach(t=>t.print(n))},QD=(...n)=>{console.warn(...nb(n)),n.unshift(Rp),sb.forEach(t=>t.print(n))},sb=Lr(),ib=n=>({[Symbol.iterator](){return this},next:n}),JD=(n,t)=>ib(()=>{let i;do i=n.next();while(!i.done&&!t(i.value));return i}),ed=(n,t)=>ib(()=>{const{done:i,value:r}=n.next();return{done:i,value:i?void 0:t(r)}});class Dp{constructor(t,i){this.clock=t,this.len=i}}class tu{constructor(){this.clients=new Map}}const rb=(n,t,i)=>t.clients.forEach((r,l)=>{const o=n.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=n.length-1;for(;i<=r;){const l=In((i+r)/2),o=n[l],u=o.clock;if(u<=t){if(t{const i=n.clients.get(t.client);return i!==void 0&&XD(i,t.clock)!==null},Mp=n=>{n.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new Dp(l.clock,$r(l.len,o.clock+o.len-l.clock)):(r{const t=new tu;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{Ps(n.clients,t,()=>[]).push(new Dp(i,r))},kp=(n,t)=>{Mt(n.restEncoder,t.clients.size),Ei(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{n.resetDsCurVal(),Mt(n.restEncoder,i);const l=r.length;Mt(n.restEncoder,l);for(let o=0;o{const t=new tu,i=Rt(n.restDecoder);for(let r=0;r0){const u=Ps(t.clients,l,()=>[]);for(let d=0;d{const r=new tu,l=Rt(n.restDecoder);for(let o=0;o0){const o=new eu;return Mt(o.restEncoder,0),kp(o,r),o.toUint8Array()}return null},lb=Mw;class Yr extends aR{constructor({guid:t=IR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=lb(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new fb,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=PS(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>PS(g=>{const y=m=>{(m===void 0||m===!0)&&(this.off(`sync`,y),g())};this.on(`sync`,y)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ei(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Ae){const r=Ps(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Ae&&l!==i)if(l===Ae){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Mr)}getText(t=``){return this.get(t,Kr)}getMap(t=``){return this.get(t,qr)}getXmlElement(t=``){return this.get(t,Vr)}getXmlFragment(t=``){return this.get(t,Ci)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ei(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Yr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class WD{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Rt(this.restDecoder)}readDsLen(){return Rt(this.restDecoder)}}class PD extends WD{readLeftID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readRightID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readClient(){return Rt(this.restDecoder)}readInfo(){return Ir(this.restDecoder)}readString(){return Or(this.restDecoder)}readParentInfo(){return Rt(this.restDecoder)===1}readTypeRef(){return Rt(this.restDecoder)}readLen(){return Rt(this.restDecoder)}readAny(){return dl(this.restDecoder)}readBuf(){return nD(nn(this.restDecoder))}readJSON(){return JSON.parse(Or(this.restDecoder))}readKey(){return Or(this.restDecoder)}}class tM{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Rt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Rt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Dc extends tM{constructor(t){super(t),this.keys=[],Rt(t),this.keyClockDecoder=new Wh(nn(t)),this.clientDecoder=new fc(nn(t)),this.leftClockDecoder=new Wh(nn(t)),this.rightClockDecoder=new Wh(nn(t)),this.infoDecoder=new WS(nn(t),Ir),this.stringDecoder=new NR(nn(t)),this.parentInfoDecoder=new WS(nn(t),Ir),this.typeRefDecoder=new fc(nn(t)),this.lenDecoder=new fc(nn(t))}readLeftID(){return new Dr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Dr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return dl(this.restDecoder)}readBuf(){return nn(this.restDecoder)}readJSON(){return dl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=$r(r,t[0].id.clock);const l=qn(t,r);Mt(n.restEncoder,t.length-l),n.writeClient(i),Mt(n.restEncoder,r);const o=t[l];o.write(n,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{ve(t,o)>l&&r.set(o,l)}),Up(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Mt(n.restEncoder,r.size),Ei(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{iM(n,t.clients.get(l),l,o)})},rM=(n,t)=>{const i=Tn(),r=Rt(n.restDecoder);for(let l=0;l{const r=[];let l=Ei(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new fb,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let y=u.refs[u.i++];const m=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(y.constructor!==xn){const w=Ps(m,y.id.client,()=>ve(t,y.id.client))-y.id.clock;if(w<0)r.push(y),g(y.id.client,y.id.clock-1),v();else{const E=y.getMissing(n,t);if(E!==null){r.push(y);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,ve(t,E)),v();else{y=T.refs[T.i++];continue}}else(w===0||w0)y=r.pop();else if(u!==null&&u.i0){const b=new eu;return ob(b,d,new Map),Mt(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},lM=(n,t)=>ob(n,t.doc.store,t.beforeState),oM=(n,t,i,r=new Dc(n))=>$t(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=rM(r,u),g=aM(l,d,p),y=d.pendingStructs;if(y){for(const[v,b]of y.missing)if(bb)&&y.missing.set(v,b)}y.update=fv([y.update,g.update])}}else d.pendingStructs=g;const m=sv(r,l,d);if(d.pendingDs){const v=new Dc(vp(d.pendingDs));Rt(v.restDecoder);const b=sv(v,l,d);m&&b?d.pendingDs=fv([m,b]):d.pendingDs=m||b}else d.pendingDs=m;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,cb(l.doc,v)}},i,!1),cb=(n,t,i,r=Dc)=>{const l=vp(t);oM(l,n,i,new r(l))},iv=(n,t,i)=>cb(n,t,i,PD);class cM{constructor(){this.l=[]}}const rv=()=>new cM,av=(n,t)=>n.l.push(t),lv=(n,t)=>{const i=n.l,r=i.length;n.l=i.filter(l=>t!==l),r===n.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},ub=(n,t,i)=>Cp(n.l,[t,i]);class Dr{constructor(t,i){this.client=t,this.clock=i}}const Po=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,Dt=(n,t)=>new Dr(n,t),uM=n=>{for(const[t,i]of n.doc.share.entries())if(i===n)return t;throw Sn()},br=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ab(t.ds,n.id),Bd=(n,t)=>{const i=Ps(n.meta,Bd,Lr),r=n.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class fb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Up=n=>{const t=new Map;return n.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},ve=(n,t)=>{const i=n.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},hb=(n,t)=>{let i=n.clients.get(t.id.client);if(i===void 0)i=[],n.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw Sn()}i.push(t)},qn=(n,t)=>{let i=0,r=n.length-1,l=n[r],o=l.id.clock;if(o===t)return r;let u=In(t/(o+l.length-1)*r);for(;i<=r;){if(l=n[u],o=l.id.clock,o<=t){if(t{const i=n.clients.get(t.client);return i[qn(i,t.clock)]},nd=fM,Ld=(n,t,i)=>{const r=qn(t,i),l=t[r];return l.id.clock{const i=n.doc.store.clients.get(t.client);return i[Ld(n,i,t.clock)]},ov=(n,t,i)=>{const r=t.clients.get(i.client),l=qn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==mn&&r.splice(l+1,0,Nc(n,o,i.clock-o.id.clock+1)),o},hM=(n,t,i)=>{const r=n.clients.get(t.id.client);r[qn(r,t.id.clock)]=i},db=(n,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Ld(n,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!sR(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Mp(t.deleteSet),lM(n,t),kp(n,t.deleteSet),!0),uv=(n,t,i)=>{const r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ps(n.changed,t,Lr).add(i)},dc=(n,t)=>{let i=n[t],r=n[t-1],l=t;for(;l>0;i=r,r=n[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof fe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&n.splice(t+1-o,o),o},pM=(n,t,i)=>{for(const[r,l]of n.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=qn(o,d.clock),y=o[g];g{n.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=Aw(l.length-1,1+qn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+dc(l,p)}})},pb=(n,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(y=>y.target._item===null||!y.target._item.deleted),p.forEach(y=>{y.currentTarget=g,y._path=null}),p.sort((y,m)=>y.path.length-m.path.length),d.push(()=>{ub(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&zM(i)})}),Cp(d,[])}finally{r.gc&&pM(o,l,r.gcFilter),gM(o,l),i.afterState.forEach((y,m)=>{const v=i.beforeState.get(m)||0;if(v!==y){const b=l.clients.get(m),w=$r(qn(b,v),1);for(let E=b.length-1;E>=w;)E-=1+dc(b,E)}});for(let y=u.length-1;y>=0;y--){const{client:m,clock:v}=u[y].id,b=l.clients.get(m),w=qn(b,v);w+11||w>0&&dc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(YD(Rp,Pw,`[yjs] `,tb,eb,`Changed the client-id because another client seems to be using it.`),r.clientID=lb()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const y=new nM;cv(y,i)&&r.emit(`update`,[y.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const y=new eu;cv(y,i)&&r.emit(`updateV2`,[y.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(y=>{y.clientID=r.clientID,y.collectionid==null&&(y.collectionid=r.collectionid),r.subdocs.add(y)}),g.forEach(y=>r.subdocs.delete(y)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(y=>y.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,n])):pb(n,t+1)}}},$t=(n,t,i=null,r=!0)=>{const l=n._transactionCleanups;let o=!1,u=null;n._transaction===null&&(o=!0,n._transaction=new dM(n,i,r),l.push(n._transaction),l.length===1&&n.emit(`beforeAllTransactions`,[n]),n.emit(`beforeTransaction`,[n._transaction,n]));try{u=t(n._transaction)}finally{if(o){const d=n._transaction===l[0];n._transaction=null,d&&pb(l,0)}}return u};function*yM(n){const t=Rt(n.restDecoder);for(let i=0;i{if(n.constructor===mn){const{client:i,clock:r}=n.id;return new mn(Dt(i,r+t),n.length-t)}else if(n.constructor===xn){const{client:i,clock:r}=n.id;return new xn(Dt(i,r+t),n.length-t)}else{const i=n,{client:r,clock:l}=i.id;return new fe(Dt(r,l+t),null,Dt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},fv=(n,t=Dc,i=eu)=>{if(n.length===1)return n[0];const r=n.map(y=>new t(vp(y)));let l=r.map(y=>new mM(y,!0)),o=null;const u=new i,d=new SM(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===xn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const y=l[0],m=y.curr.id.client;if(o!==null){let v=y.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=y.next(),b=!0;if(v===null||v.id.client!==m||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(m!==o.struct.id.client)Ga(d,o.struct,o.offset),o={struct:v,offset:0},y.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===xn?o.struct.length-=w:v=vM(v,w)),o.struct.mergeWith(v)||(Ga(d,o.struct,o.offset),o={struct:v,offset:0},y.next())}}else o={struct:y.curr,offset:0},y.next();for(let v=y.curr;v!==null&&v.id.client===m&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==xn;v=y.next())Ga(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ga(d,o.struct,o.offset),o=null),wM(d);const p=r.map(y=>ZD(y)),g=FD(p);return kp(u,g),u.toUint8Array()},gb=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:Ln(n.encoder.restEncoder)}),n.encoder.restEncoder=Gc(),n.written=0)},Ga=(n,t,i)=>{n.written>0&&n.currClient!==t.id.client&&gb(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),Mt(n.encoder.restEncoder,t.id.clock+i)),t.write(n.encoder,i),n.written++},wM=n=>{gb(n);const t=n.encoder.restEncoder;Mt(t,n.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Jh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Jh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Jh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Hn(hv);const i=this.target,r=Lr(),l=Lr(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const bM=(n,t)=>{const i=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},De=()=>{QD(`Invalid access: Add Yjs type to a document before reading data.`)},yb=80;let zp=0;class EM{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=zp++}}const CM=n=>{n.timestamp=zp++},mb=(n,t,i)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=i,n.timestamp=zp++},xM=(n,t,i)=>{if(n.length>=yb){const r=n.reduce((l,o)=>l.timestamp{if(n._start===null||t===0||n._searchMarker===null)return null;const i=n._searchMarker.length===0?null:n._searchMarker.reduce((o,u)=>cc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&cc(i.index-l){for(let r=n.length-1;r>=0;r--){const l=n[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=$r(t,l.index+i))}},iu=(n,t,i)=>{const r=n,l=t.changedParentTypes;for(;Ps(l,n,()=>[]).push(i),n._item!==null;)n=n._item.parent;ub(r._eH,i,t)};class Ae{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=rv(),this._dEH=rv(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw An()}clone(){throw An()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){av(this._eH,t)}observeDeep(t){av(this._dEH,t)}unobserve(t){lv(this._eH,t)}unobserveDeep(t){lv(this._dEH,t)}toJSON(){}}const Sb=(n,t,i)=>{n.doc??De(),t<0&&(t=n._length+t),i<0&&(i=n._length+i);let r=i-t;const l=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},vb=n=>{n.doc??De();const t=[];let i=n._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=n._start;for(n.doc??De();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return Sl(n,(r,l)=>{i.push(t(r,l,n))}),i},_M=n=>{let t=n._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},bb=(n,t)=>{n.doc??De();const i=su(n,t);let r=n._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=n.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const y=()=>{g.length>0&&(l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new xi(g)),l.integrate(n,0),g=[])};r.forEach(m=>{if(m===null)g.push(m);else switch(m.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(m);break;default:switch(y(),m.constructor){case Uint8Array:case ArrayBuffer:l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Tl(new Uint8Array(m))),l.integrate(n,0);break;case Yr:l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Al(m)),l.integrate(n,0);break;default:if(m instanceof Ae)l=new fe(Dt(u,ve(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ss(m)),l.integrate(n,0);else throw new Error(`Unexpected content type in insert operation`)}}}),y()},Eb=()=>Hn(`Length exceeded!`),Cb=(n,t,i,r)=>{if(i>t._length)throw Eb();if(i===0)return t._searchMarker&&ml(t._searchMarker,i,r.length),Mc(n,t,null,r);const l=i,o=su(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Mc(n,t,l,i)},xb=(n,t,i,r)=>{if(r===0)return;const l=i,o=r,u=su(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw Eb();t._searchMarker&&ml(t._searchMarker,l,-o+r)},kc=(n,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(n)},jp=(n,t,i,r)=>{const l=t._map.get(i)||null,o=n.doc,u=o.clientID;let d;if(r==null)d=new xi([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new xi([r]);break;case Uint8Array:d=new Tl(r);break;case Yr:d=new Al(r);break;default:if(r instanceof Ae)d=new Ss(r);else throw new Error(`Unexpected content type`)}new fe(Dt(u,ve(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(n,0)},Np=(n,t)=>{n.doc??De();const i=n._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},_b=n=>{const t={};return n.doc??De(),n._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},Tb=(n,t)=>{n.doc??De();const i=n._map.get(t);return i!==void 0&&!i.deleted},AM=(n,t)=>{const i={};return n._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&br(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},tc=n=>(n.doc??De(),JD(n._map.entries(),t=>!t[1].deleted));class OM extends nu{}class Mr extends Ae{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Mr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Mr}clone(){const t=new Mr;return t.insert(0,this.toArray().map(i=>i instanceof Ae?i.clone():i)),t}get length(){return this.doc??De(),this._length}_callObserver(t,i){super._callObserver(t,i),iu(this,t,new OM(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{Cb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{TM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{xb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return bb(this,t)}toArray(){return vb(this)}slice(t=0,i=this.length){return Sb(this,t,i)}toJSON(){return this.map(t=>t instanceof Ae?t.toJSON():t)}map(t){return wb(this,t)}forEach(t){Sl(this,t)}[Symbol.iterator](){return _M(this)}_write(t){t.writeTypeRef(PM)}}const RM=n=>new Mr;class DM extends nu{constructor(t,i,r){super(t,i),this.keysChanged=r}}class qr extends Ae{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new qr}clone(){const t=new qr;return this.forEach((i,r)=>{t.set(r,i instanceof Ae?i.clone():i)}),t}_callObserver(t,i){iu(this,t,new DM(this,t,i))}toJSON(){this.doc??De();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Ae?l.toJSON():l}}),t}get size(){return[...tc(this)].length}keys(){return ed(tc(this),t=>t[0])}values(){return ed(tc(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return ed(tc(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??De(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Np(this,t)}has(t){return Tb(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,l){kc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(t2)}}const MM=n=>new qr,Xs=(n,t)=>n===t||typeof n==`object`&&typeof t==`object`&&n&&t&&JR(n,t);class Id{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&Sn(),this.right.content.constructor){case he:this.right.deleted||Qr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const dv=(n,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case he:t.right.deleted||Qr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?su(t,i):null;if(o){const u=new Id(o.p.left,o.p,o.index,l);return dv(n,u,i-o.index)}else{const u=new Id(null,t._start,0,l);return dv(n,u,i)}},Ab=(n,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===he&&Xs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=n.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,y=new fe(Dt(o,ve(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new he(d,u));y.integrate(n,0),i.right=y,i.forward()})},Qr=(n,t)=>{const{key:i,value:r}=t;r===null?n.delete(i):n.set(i,r)},Ob=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===he&&Xs(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Rb=(n,t,i,r)=>{const l=n.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Xs(g,p)){u.set(d,g);const{left:y,right:m}=i;i.right=new fe(Dt(o,ve(l.store,o)),y,y&&y.lastId,m,m&&m.id,t,null,new he(d,p)),i.right.integrate(n,0),i.forward()}}return u},sd=(n,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=n.doc,u=o.clientID;Ob(i,l);const d=Rb(n,t,i,l),p=r.constructor===String?new Kn(r):r instanceof Ae?new Ss(r):new Mi(r);let{left:g,right:y,index:m}=i;t._searchMarker&&ml(t._searchMarker,i.index,p.getLength()),y=new fe(Dt(u,ve(o.store,u)),g,g&&g.lastId,y,y&&y.id,t,null,p),y.integrate(n,0),i.right=y,i.index=m,i.forward(),Ab(n,t,i,d)},pv=(n,t,i,r,l)=>{const o=n.doc,u=o.clientID;Ob(i,l);const d=Rb(n,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===he));){if(!i.right.deleted)switch(i.right.content.constructor){case he:{const{key:p,value:g}=i.right.content,y=l[p];if(y!==void 0){if(Xs(y,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(n)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` -`;i.right=new fe(Dt(u,ve(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Kn(p)),i.right.integrate(n,0),i.forward()}Ab(n,t,i,d)},Db=(n,t,i,r,l)=>{let o=t;const u=Tn();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===he){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case he:{const{key:y,value:m}=g,v=r.get(y)??null;(u.get(y)!==g||v===m)&&(t.delete(n),d++,!p&&(l.get(y)??null)===m&&v!==m&&(v===null?l.delete(y):l.set(y,v))),!p&&!t.deleted&&Qr(l,g);break}}}t=t.right}return d},kM=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===he){const r=t.content.key;i.has(r)?t.delete(n):i.add(r)}t=t.left}},UM=n=>{let t=0;return $t(n.doc,i=>{let r=n._start,l=n._start,o=Tn();const u=Md(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case he:Qr(u,l.content);break;default:t+=Db(i,r,l,o,u),o=Md(u),r=l;break}l=l.right}}),t},zM=n=>{const t=new Set,i=n.doc;for(const[r,l]of n.afterState.entries()){const o=n.beforeState.get(r)||0;l!==o&&db(n,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===he&&u.constructor!==mn&&t.add(u.parent)})}$t(i,r=>{rb(n,n.deleteSet,l=>{if(l instanceof mn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===he?t.add(o):kM(r,l)});for(const l of t)UM(l)})},gv=(n,t,i)=>{const r=i,l=Md(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Ss:case Mi:case Kn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,y=0,m=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:m>0&&(b={delete:m}),m=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:y>0&&(b={retain:y},QR(p)||(b.attributes=$R({},p))),y=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case Ss:case Mi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=1);break;case Kn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=u.length);break;case he:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Xs(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Xs(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Xs(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Xs(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Qr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Kr extends Ae{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??De(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Kr}clone(){const t=new Kr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new jM(this,t,i);iu(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??De();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Kn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const l=new Id(null,this._start,0,new Map);for(let o=0;o0)&&sd(r,this,l,d,u.attributes||{})}else u.retain!==void 0?pv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&gv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??De();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const m={};let v=!1;o.forEach((w,E)=>{v=!0,m[E]=w});const b={insert:d};v&&(b.attributes=m),l.push(b),d=``}}const y=()=>{for(;p!==null;){if(br(p,t)||i!==void 0&&br(p,i))switch(p.content.constructor){case Kn:{const m=o.get(`ychange`);t!==void 0&&!br(p,t)?(m===void 0||m.user!==p.id.client||m.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!br(p,i)?(m===void 0||m.user!==p.id.client||m.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):m!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case Ss:case Mi:{g();const m={insert:p.content.getContent()[0]};if(o.size>0){const v={};m.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(m);break}case he:br(p,t)&&(g(),Qr(o,p.content));break}p=p.right}g()};return t||i?$t(u,m=>{t&&Bd(m,t),i&&Bd(m,i),y()},`cleanup`):y(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),sd(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);sd(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,l=>{gv(l,ec(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!1);u.right!==null&&pv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Np(this,t)}getAttributes(){return _b(this)}_write(t){t.writeTypeRef(e2)}}const NM=n=>new Kr;class id{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??De()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Vr||i.constructor===Ci)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ci extends Ae{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ci}clone(){const t=new Ci;return t.insert(0,this.toArray().map(i=>i instanceof Ae?i.clone():i)),t}get length(){return this.doc??De(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new id(this,t)}querySelector(t){t=t.toUpperCase();const r=new id(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ei(new id(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){iu(this,t,new IM(this,i,t))}toString(){return wb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),Sl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?$t(this.doc,r=>{Cb(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const l=t&&t instanceof Ae?t._item:t;Mc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Hn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{xb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return vb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return bb(this,t)}slice(t=0,i=this.length){return Sb(this,t,i)}forEach(t){Sl(this,t)}_write(t){t.writeTypeRef(s2)}}const BM=n=>new Ci;class Vr extends Ci{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new Vr(this.nodeName)}clone(){const t=new Vr(this.nodeName),i=this.getAttributes();return YR(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Ae?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{kc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{jp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Np(this,t)}hasAttribute(t){return Tb(this,t)}getAttributes(t){return t?AM(this,t):_b(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return Sl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(n2),t.writeKey(this.nodeName)}}const LM=n=>new Vr(n.readKey());class IM extends nu{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Uc extends qr{constructor(t){super(),this.hookName=t}_copy(){return new Uc(this.hookName)}clone(){const t=new Uc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(i2),t.writeKey(this.hookName)}}const HM=n=>new Uc(n.readKey());class zc extends Kr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new zc}clone(){const t=new zc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(r2)}}const qM=n=>new zc;class Bp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw An()}mergeWith(t){return!1}write(t,i,r){throw An()}integrate(t,i){throw An()}}const KM=0;class mn extends Bp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),hb(t.doc.store,this)}write(t,i){t.writeInfo(KM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Tl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Tl(this.content)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const VM=n=>new Tl(n.readBuf());class vl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new vl(this.len)}splice(t){const i=new vl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Rc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const $M=n=>new vl(n.readLen()),Mb=(n,t)=>new Yr({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Al{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Al(Mb(this.doc.guid,this.opts))}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const GM=n=>new Al(Mb(n.readString(),n.readAny()));class Mi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Mi(this.embed)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const YM=n=>new Mi(n.readJSON());class he{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new he(this.key,this.value)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const QM=n=>new he(n.readKey(),n.readJSON());class jc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new jc(this.arr)}splice(t){const i=new jc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=n.readLen(),i=[];for(let r=0;r{const t=n.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const ZM=n=>new Kn(n.readString()),WM=[RM,MM,NM,LM,BM,HM,qM],PM=0,t2=1,e2=2,n2=3,s2=4,i2=5,r2=6;class Ss{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Ss(this.type._copy())}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const a2=n=>new Ss(WM[n.readTypeRef()](n)),Nc=(n,t,i)=>{const{client:r,clock:l}=t.id,o=new fe(Dt(r,l+i),t,Dt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Dt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class fe extends Bp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?GS:0}set marker(t){(this.info&Fh)>0!==t&&(this.info^=Fh)}get marker(){return(this.info&Fh)>0}get keep(){return(this.info&$S)>0}set keep(t){this.keep!==t&&(this.info^=$S)}get countable(){return(this.info&GS)>0}get deleted(){return(this.info&Xh)>0}set deleted(t){this.deleted!==t&&(this.info^=Xh)}markDeleted(){this.info|=Xh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=ve(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ve(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Dr&&this.id.client!==this.parent.client&&this.parent.clock>=ve(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ov(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ws(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===mn||this.right&&this.right.constructor===mn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===fe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===fe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Dr){const r=nd(i,this.parent);r.constructor===mn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=ov(t,t.doc.store,Dt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Po(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Rc(t.deleteSet,this.id.client,this.id.clock,this.length),uv(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw Sn();this.content.gc(t),i?hM(t,this,new mn(this.id,this.length)):this.content=new vl(this.length)}write(t,i){const r=i>0?Dt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&$c|(r===null?0:sn)|(l===null?0:gs)|(o===null?0:ul);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=uM(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Dr?(t.writeParentInfo(!1),t.writeLeftID(d)):Sn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const kb=(n,t)=>l2[t&$c](n),l2=[()=>{Sn()},$M,JM,VM,ZM,YM,QM,a2,FM,GM,()=>{Sn()}],o2=10;class xn extends Bp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){Sn()}write(t,i){t.writeInfo(o2),Mt(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const Ub=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},zb=`__ $YJS$ __`;Ub[zb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);Ub[zb]=!0;const jb=Math.floor,c2=(n,t)=>nn>t?n:t,Nb=128,pc=127,f2=Number.MAX_SAFE_INTEGER,Bb=()=>new Set,Lb=Array.from,h2=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lwl.encode(n),p2=wl?d2:h2;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);class g2{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Ib=()=>new g2,y2=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(y2(n));let i=0;for(let r=0;r{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},kr=(n,t)=>{for(;t>pc;)Bc(n,Nb|pc&t),t=jb(t/128);Bc(n,pc&t)},Hd=new Uint8Array(3e4),m2=Hd.length/3,S2=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;kr(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=c2(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(u2(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},qb=(n,t)=>{kr(n,t.byteLength),b2(n,t)},Kb=n=>new Error(n),E2=Kb(`Unexpected end of array`),C2=Kb(`Integer out of Range`);class x2{constructor(t){this.arr=t,this.pos=0}}const qd=n=>new x2(n),yv=n=>n.pos!==n.arr.length,_2=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},Kd=n=>_2(n,sl(n)),mv=n=>n.arr[n.pos++],sl=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posf2)throw C2}throw E2},T2=n=>{let t=sl(n);if(t===0)return``;{let i=String.fromCodePoint(mv(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(mv(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},A2=n=>nl.decode(Kd(n)),O2=nl?A2:T2,Lc=Date.now,Ur=()=>new Map,Vb=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r};class R2{constructor(){this._observers=Ur()}on(t,i){return Vb(this._observers,t,Bb).add(i),i}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Lb((this._observers.get(t)||Ur()).values()).forEach(r=>r(...i))}destroy(){this._observers=Ur()}}class D2{constructor(){this._observers=Ur()}on(t,i){Vb(this._observers,t,Bb).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Lb((this._observers.get(t)||Ur()).values()).forEach(r=>r(...i))}destroy(){this._observers=Ur()}}const Sv=Symbol(`Equality`),M2=Object.keys,vv=n=>M2(n).length,k2=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),il=(n,t)=>{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[Sv]!=null)return n[Sv](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;i{const i=Lc();this.getLocalState()!==null&&rd/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&rd<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&z2(this,r,`timeout`)},jb(rd/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:Lc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),il(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const z2=(n,t,i)=>{const r=[];for(let l=0;l0&&(n.emit(`change`,[{added:[],updated:[],removed:r},i]),n.emit(`update`,[{added:[],updated:[],removed:r},i]))},wv=(n,t,i=n.states)=>{const r=t.length,l=Ib();kr(l,r);for(let o=0;o{const r=qd(t),l=Lc(),o=[],u=[],d=[],p=[],g=sl(r);for(let y=0;y0||d.length>0||p.length>0)&&n.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&n.emit(`update`,[{added:o,updated:u,removed:p},i])},N2={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},B2=15e3;var L2=class gc extends R2{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return N2[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&iv(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new jn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Lv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=y=>{l||(l=!0,g(y))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const y=new jn({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const m=await y.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=m.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await m.closed,p();continue}catch(m){if(g()){p();return}if(this.isNotFoundError(m)){if(d){o(m instanceof Error?m:new Error(String(m)));return}this.emit(`error`,[m instanceof Error?m:new Error(String(m))]),this.disconnect();return}if(d){o(m instanceof Error?m:new Error(String(m)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=Ib();return qb(i,t),Hb(i)}applyUpdates(t){if(t.length===0)return;const i=qd(t);for(;yv(i);){const r=Kd(i);iv(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=qd(t);for(;yv(i);){const r=Kd(i);try{j2(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(gc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},B2),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=wv(this.awareness,[this.awareness.clientID]);new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(gc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=wv(this.awareness,o);await new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(gc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new jn({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Wt&&t.code===`NOT_FOUND`||t instanceof Fs&&t.status===404}isAuthError(t){return t instanceof Wt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof Fs&&(t.status===401||t.status===403)}};const I2=64,H2=64,bv=120,q2=1500,Vd=.3,Ev=12e4,Cv=`#d0bcff`;function K2(n){const t=n.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:I2,rows:H2}}function rl(n){return n.getMap(`territoryCell`)}function Qs(n){return n.getMap(`players`)}function ru(n){return n.getMap(`gameState`)}function $d(n,t){const i=Qs(n),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function xv(n){const t=rl(n),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function V2(n,t){let i=0;return n.forEach(r=>{r.owner===t&&i++}),i}function $2(n,t,i,r,l){const o=new Set,u=new Set;t.forEach((y,m)=>{y.owner===n?o.add(m):l.has(y.owner)&&u.add(m)});const d=new Set,p=[];for(let y=0;y0;){const{x:y,y:m}=p.pop();for(const[v,b]of[[0,-1],[0,1],[-1,0],[1,0]]){const w=y+v,E=m+b;if(w<0||w>=i||E<0||E>=r)continue;const T=`${w},${E}`;o.has(T)||d.has(T)||(d.add(T),p.push({x:w,y:E}))}}const g=[];for(let y=0;yG.x===v&&G.y===b);if(E){const[G,k]=E,L=g+q2,X=Qs(n);return X.set(G,{...k,stunnedUntil:L}),X.set(t,{x:l.x,y:l.y,name:i,color:r,stunnedUntil:L}),{moved:!1,stunned:!0,x:l.x,y:l.y,stunnedUntil:L}}Qs(n).set(t,{x:v,y:b,name:i,color:r});const B=rl(n),D=Date.now();n.transact(()=>{B.set(`${v},${b}`,{owner:t,claimedAt:D})});const O=new Set([t]);$d(n,t).forEach((G,k)=>O.add(k));const M=$2(t,B,u,d,O);return M.length>0&&n.transact(()=>{for(const G of M)B.set(`${G.x},${G.y}`,{owner:t,claimedAt:D})}),{moved:!0,stunned:!1,x:v,y:b,stunnedUntil:0}}function _v(n){const t=ru(n);t.has(`gameStartedAt`)||n.transact(()=>{t.has(`gameStartedAt`)||t.set(`gameStartedAt`,Date.now())})}function Q2(n){const i=ru(n).get(`gameStartedAt`);return i!==void 0?i:null}function ad(n){const i=ru(n).get(`gameEndedAt`);return i!==void 0?i:null}function Tv(n){const t=ru(n);(!t.has(`gameEndedAt`)||t.get(`gameEndedAt`)===null)&&n.transact(()=>{t.set(`gameEndedAt`,Date.now())})}function Lp(n){const t=new Map;return n.forEach(i=>{t.set(i.owner,(t.get(i.owner)||0)+1)}),t}function J2(n,t,i){const r=Lp(n),l=Vd*t;for(const[o,u]of r)if(u>=l){const d=i.get(o);if(d)return{name:d.name,pct:Math.round(u/t*100)}}return null}function X2(n,t,i){const r=Lp(n);let l=0,o=``;if(r.forEach((d,p)=>{d>l&&(l=d,o=p)}),!o||l===0)return null;const u=i.get(o);return u?{name:u.name,pct:Math.round(l/t*100)}:null}const $b=Z.createContext(null);function F2(){const n=Z.useContext($b);if(!n)throw new Error(`useGameRoom must be used within GameRoom`);return n}function Z2(n,t){return Cw({streamOptions:{url:n,headers:t,contentType:`application/json`},state:KS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(KS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Av=Z.createContext(null);function W2({roomId:n,children:t}){const{dsEndpoint:i,dsHeaders:r}=Yd(),[l,o]=Z.useState(null),[u,d]=Z.useState(null);return Z.useEffect(()=>{let p=null,g=!1;const y=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(n)}`,w=await new jn({url:v,headers:r,contentType:`application/json`}).head();if(y()||(w.exists||await jn.create({url:v,headers:r,contentType:`application/json`}),p=await Z2(v,r),await p.preload(),y()))return;o(p)}catch(v){if(y())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[n,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?Y.jsx(Av.Provider,{value:{scoresDB:l},children:t}):Y.jsx(Av.Provider,{value:null,children:t})}const P2=1,Sr=8,Ov=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},vr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function tk(n,t){return n>256||t>256?2:n>64||t>64?4:14}function ek({onLeave:n}){const{doc:t,awareness:i,roomId:r,playerId:l,playerName:o,playerColor:u}=F2(),{cols:d,rows:p}=Z.useMemo(()=>K2(r),[r]),g=d*p,y=Z.useMemo(()=>tk(d,p),[d,p]),m=d<=100&&p<=100,[v,b]=Z.useState(new Map),[w,E]=Z.useState(new Map),[T,B]=Z.useState({x:0,y:0}),[D,O]=Z.useState(1),[M,G]=Z.useState(!1),[k,L]=Z.useState(!1),[X,tt]=Z.useState(null),[F,at]=Z.useState(Ev/1e3),et=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),wt=Z.useRef(void 0),Bt=Z.useRef(null),ht=Z.useRef({x:0,y:0,stunnedUntil:0}),U=Z.useMemo(()=>V2(v,l)*P2,[v,l]),q=Z.useMemo(()=>Math.round(U/g*100),[U,g]),W=Z.useMemo(()=>Lp(v),[v]),st=Z.useMemo(()=>{let nt=0,P=``;if(W.forEach((St,Jt)=>{St>nt&&(nt=St,P=Jt)}),!P||nt===0)return null;const dt=Math.round(nt/g*100);if(P===l)return{name:o,pct:dt};const pt=w.get(P);return pt?{name:pt.name,pct:dt}:null},[W,g,l,o,w]);Z.useEffect(()=>{const nt=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);ht.current={x:nt,y:P,stunnedUntil:0},B({x:nt,y:P});const dt=Qs(t);dt.set(l,{x:nt,y:P,name:o,color:u});const pt=rl(t);return t.transact(()=>{pt.set(`${nt},${P}`,{owner:l,claimedAt:Date.now()})}),_v(t),()=>{dt.delete(l)}},[t,l,o,u,d,p]),Z.useEffect(()=>{const nt=rl(t),P=()=>{const dt=xv(t);if(b(dt),ad(t)!==null)return;const pt=J2(dt,g,Qs(t));pt&&(tt(pt),Tv(t))};return nt.observe(P),P(),()=>nt.unobserve(P)},[t,g]),Z.useEffect(()=>{const nt=()=>{const dt=Q2(t);if(!dt)return;const pt=Date.now()-dt,St=Math.max(0,Ev-pt);if(at(Math.ceil(St/1e3)),St<=0&&ad(t)===null){const Jt=xv(t),rn=X2(Jt,g,Qs(t));tt(rn||{name:`Nobody`,pct:0}),Tv(t)}},P=setInterval(nt,1e3);return nt(),()=>clearInterval(P)},[t,g]),Z.useEffect(()=>{const nt=Qs(t),P=()=>{E($d(t,l))};return nt.observe(P),P(),()=>nt.unobserve(P)},[t,l]),Z.useEffect(()=>{const nt=()=>{const P=new Set,dt=new Set([o]);i.getStates().forEach((St,Jt)=>{if(Jt!==i.clientID){St.playerId&&P.add(St.playerId);const rn=St.user?.name;rn&&dt.add(rn)}}),O(St=>{const Jt=dt.size;return St===Jt?St:Jt});const pt=Qs(t);pt.forEach((St,Jt)=>{Jt!==l&&!P.has(Jt)&&pt.delete(Jt)})};return i.on(`change`,nt),nt(),()=>i.off(`change`,nt)},[i,t,l,o]),Z.useEffect(()=>{const nt=new Set,P=pt=>{if(pt.key in vr){pt.preventDefault();const St=!Bt.current;nt.add(pt.key),Bt.current=vr[pt.key],St&&xt.current?.(vr[pt.key])}},dt=pt=>{if(nt.delete(pt.key),pt.key in vr){let St=!1;for(const Jt of nt)if(Jt in vr){Bt.current=vr[Jt],St=!0;break}St||(Bt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,dt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,dt)}},[]);const ut=Z.useRef(null),_=Z.useRef(null),H=Z.useRef(0),Q=10,J=Z.useCallback((nt,P)=>{const dt=Date.now();if(dt-H.currentMath.abs(vs)?xt.current?.({dx:ki>0?1:-1,dy:0}):xt.current?.({dx:0,dy:vs>0?1:-1}),H.current=dt)},[y]),ot=Z.useCallback(nt=>{nt.preventDefault();const P=nt.touches[0];_.current={x:P.clientX,y:P.clientY},J(P.clientX,P.clientY)},[J]),it=Z.useCallback(nt=>{if(nt.preventDefault(),!_.current)return;const P=nt.touches[0],dt=P.clientX-_.current.x,pt=P.clientY-_.current.y;Math.abs(dt){_.current=null},[]),xt=Z.useRef(void 0),bt=Z.useCallback(nt=>{const P=ut.current;if(!P)return;const dt=P.createSVGPoint();dt.x=nt.clientX,dt.y=nt.clientY;const pt=P.getScreenCTM();if(!pt)return;const St=dt.matrixTransform(pt.inverse()),Jt=St.x/y-.5,rn=St.y/y-.5,de=ht.current,ti=Jt-de.x,Gn=rn-de.y;ti===0&&Gn===0||(Math.abs(ti)>Math.abs(Gn)?xt.current?.({dx:ti>0?1:-1,dy:0}):xt.current?.({dx:0,dy:Gn>0?1:-1}))},[y]),$e=Z.useCallback(()=>{n()},[n]);Z.useEffect(()=>{const nt=dt=>{if(ad(t)!==null)return;const pt=ht.current,St=Y2(t,l,o,u,{x:pt.x,y:pt.y},dt,d,p,pt.stunnedUntil);pt.stunnedUntil=St.stunnedUntil,St.moved&&(pt.x=St.x,pt.y=St.y,B({x:St.x,y:St.y}),i.setLocalState({...i.getLocalState(),x:St.x,y:St.y}))};xt.current=nt;const P=setInterval(()=>{const dt=Bt.current;dt&&nt(dt)},bv);return()=>clearInterval(P)},[t,l,o,u,d,p,i]);const Ge=d*y,$n=p*y,Jr=Z.useCallback(()=>{navigator.clipboard.writeText(et).catch(()=>{}),G(!0),clearTimeout(wt.current),wt.current=setTimeout(()=>G(!1),1200)},[et]);Z.useEffect(()=>()=>clearTimeout(wt.current),[]);const wn=Z.useMemo(()=>m?Y.jsxs(Y.Fragment,{children:[Array.from({length:d},(nt,P)=>Y.jsx(`line`,{x1:P*y,y1:0,x2:P*y,y2:$n,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(nt,P)=>Y.jsx(`line`,{x1:0,y1:P*y,x2:Ge,y2:P*y,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}):null,[d,p,Ge,$n,y,m]),Xr=Z.useMemo(()=>{const nt=new Map;return nt.set(l,u),w.forEach((P,dt)=>{nt.set(dt,P.color)}),nt},[l,u,w]),Fr=nt=>{const P=Math.floor(nt/60),dt=nt%60;return`${P}:${dt.toString().padStart(2,`0`)}`};return Y.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[Y.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } - .live-dot { animation: blink 1.5s ease-in-out infinite; } - @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } - .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),Y.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:Sr},children:[Y.jsx(`button`,{onClick:$e,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:Sr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),Y.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:Jr,title:`Click to copy room name`,children:[Y.jsx(`span`,{style:{color:Vt.accent},children:o}),Y.jsx(`span`,{style:{color:Vt.dim},children:`@`}),Y.jsx(`span`,{style:{color:M?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:M?`COPIED`:et})]}),Y.jsx(`span`,{style:{color:F<=30?`#FF3D71`:Vt.accent,fontVariantNumeric:`tabular-nums`},children:Fr(F)}),Y.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:()=>L(nt=>!nt),children:[D,` PLAYERS`,k&&Y.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o,color:u},...Array.from(w.entries()).map(([nt,P])=>({id:nt,name:P.name,color:P.color}))].map(nt=>{const P=W.get(nt.id)||0,dt=Math.round(P/g*100);return Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[Y.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[Y.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:nt.color,display:`inline-block`}}),nt.name]}),Y.jsxs(`span`,{style:{color:Vt.accent},children:[dt,`%`]})]},nt.id)})})]})]}),Y.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:Sr},children:[Y.jsxs(`div`,{children:[Y.jsxs(`span`,{style:{fontSize:Ov,color:Vt.accent},children:[q,`%`]}),` `,Y.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),Y.jsxs(`div`,{style:{textAlign:`right`},children:[Y.jsxs(`div`,{style:{marginBottom:st?4:0,color:st&&st.pct>=Math.round(Vd*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(Vd*100),`%`]}),st&&Y.jsxs(`div`,{children:[Y.jsx(`span`,{style:{color:Vt.dim},children:st.name}),` `,Y.jsxs(`span`,{style:{fontSize:Ov,color:Vt.accent},children:[st.pct,`%`]})]})]})]}),Y.jsxs(`svg`,{ref:ut,viewBox:`0 0 ${Ge} ${$n}`,onTouchStart:ot,onTouchMove:it,onTouchEnd:vt,onClick:bt,style:{width:`min(100%, calc(100dvh - 140px))`,maxWidth:Ge,height:`auto`,aspectRatio:`${d} / ${p}`,background:Vt.grid,border:`1px solid ${Vt.border}`,flexShrink:0,userSelect:`none`,WebkitUserSelect:`none`},children:[wn,Array.from(v.entries()).map(([nt,P])=>{const[dt,pt]=nt.split(`,`).map(Number),St=Xr.get(P.owner)||Vt.accent;return Y.jsx(`rect`,{x:dt*y,y:pt*y,width:y,height:y,fill:St,opacity:.5},nt)}),Array.from(w.entries()).map(([nt,P])=>{const dt=P.stunnedUntil!=null&&Date.now(){const nt=ht.current.stunnedUntil>0&&Date.now(){const nt=rl(t),P=t.getMap(`gameState`);t.transact(()=>{Array.from(nt.keys()).forEach(pt=>nt.delete(pt)),P.delete(`gameStartedAt`),P.delete(`gameEndedAt`)}),tt(null),_v(t)},style:{fontFamily:`inherit`,fontSize:Sr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),Y.jsx(`button`,{onClick:$e,style:{fontFamily:`inherit`,fontSize:Sr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}function nk({roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:l}){const{registryDB:o}=_w(),[{playerId:u,playerColor:d,doc:p,awareness:g}]=Z.useState(()=>{const D=`player-${Math.random().toString(36).slice(2,10)}`,O=new Yr,M=new U2(O);return M.setLocalState({user:{name:r,color:Cv},playerId:D,type:`human`}),{playerId:D,playerColor:Cv,doc:O,awareness:M}}),[y,m]=Z.useState(!0),[v,b]=Z.useState(!1),[w,E]=Z.useState(null),T=Z.useRef(null);Z.useEffect(()=>{const D=new L2({doc:p,baseUrl:t,docId:n,awareness:g,headers:i,connect:!1});return D.on(`synced`,O=>{b(O),O&&m(!1)}),D.on(`status`,O=>{O===`connected`&&m(!1)}),D.on(`error`,O=>{E(O),m(!1)}),g.getLocalState()===null&&g.setLocalState({user:{name:r,color:d},playerId:u,type:`human`}),T.current=D,D.connect(),()=>{D.destroy(),T.current=null}},[n,p,g,t,i,r,d,u]),Z.useEffect(()=>{const O=setInterval(()=>{const M=new Set([u]);if(g.getStates().forEach(L=>{L.playerId&&M.add(L.playerId)}),[...M].sort()[0]!==u)return;const k=o.collections.rooms.toArray.find(L=>L.roomId===n);if(k)try{o.actions.addRoom({...k,expiresAt:Date.now()+gp*1e3})}catch{}},YO);return()=>clearInterval(O)},[g,o,n,u]),Z.useEffect(()=>()=>{p.destroy()},[p]);const B=Z.useMemo(()=>({doc:p,awareness:g,roomId:n,playerId:u,playerName:r,playerColor:d,isSynced:v,isLoading:y}),[p,g,n,u,r,d,v,y]);return w?Y.jsxs(`div`,{style:ld.center,children:[Y.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),Y.jsx(`button`,{onClick:l,style:ld.btn,children:`BACK`})]}):y?Y.jsxs(`div`,{style:ld.center,children:[Y.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),Y.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):Y.jsx($b.Provider,{value:B,children:Y.jsx(W2,{roomId:n,children:Y.jsx(ek,{onLeave:l})})})}const ld={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},Rv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],Dv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function sk(){const n=Rv[Math.floor(Math.random()*Rv.length)],t=Dv[Math.floor(Math.random()*Dv.length)];return`${n} ${t}`}function ik(){return localStorage.getItem(`territory-player-name`)||sk()}function rk(){const[n,t]=Z.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return Z.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),n}function ak(){const n=rk(),{yjsEndpoint:t,yjsHeaders:i}=Yd(),[r,l]=Z.useState(ik),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return n?Y.jsx(nk,{roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):Y.jsx(tR,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function lk(){return Y.jsx(EC,{children:Y.jsx(ZO,{children:Y.jsx(ak,{})})})}wC.createRoot(document.getElementById(`root`)).render(Y.jsx(lk,{})); diff --git a/website/public/demos/territory-wars/assets/index-CYvUTm66.js b/website/public/demos/territory-wars/assets/index-CYvUTm66.js new file mode 100644 index 0000000000..7c68f0abe2 --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-CYvUTm66.js @@ -0,0 +1,42 @@ +(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function hC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,`default`)?n.default:n}var bh={exports:{}},Va={};var L0;function dC(){if(L0)return Va;L0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var I0;function pC(){return I0||(I0=1,bh.exports=dC()),bh.exports}var F=pC(),Eh={exports:{}},$a={},Ch={exports:{}},xh={};var H0;function gC(){return H0||(H0=1,(function(n){function t(k,q){var Z=k.length;k.push(q);t:for(;0>>1,ut=k[st];if(0>>1;st<_;){var L=2*(st+1)-1,Y=k[L],Q=L+1,ot=k[Q];if(0>l(Y,Z))Ql(ot,Y)?(k[st]=ot,k[Q]=Z,st=Q):(k[st]=Y,k[L]=Z,st=L);else if(Ql(ot,Z))k[st]=ot,k[Q]=Z,st=Q;else break t}}return q}function l(k,q){var Z=k.sortIndex-q.sortIndex;return Z!==0?Z:k.id-q.id}if(n.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,M=typeof clearTimeout==`function`?clearTimeout:null,R=typeof setImmediate<`u`?setImmediate:null;function A(k){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=k)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function V(k){if(E=!1,A(k),!w)if(i(p)!==null)w=!0,I||(I=!0,nt());else{var q=i(g);q!==null&&dt(V,q.startTime-k)}}var I=!1,H=-1,W=5,tt=-1;function X(){return T?!0:!(n.unstable_now()-ttk&&X());){var st=y.callback;if(typeof st==`function`){y.callback=null,v=y.priorityLevel;var ut=st(y.expirationTime<=k);if(k=n.unstable_now(),typeof ut==`function`){y.callback=ut,A(k),q=!0;break e}y===i(p)&&r(p),A(k)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&dt(V,_.startTime-k),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?nt():I=!1}}}var nt;if(typeof R==`function`)nt=function(){R(at)};else if(typeof MessageChannel<`u`){var wt=new MessageChannel,Lt=wt.port2;wt.port1.onmessage=at,nt=function(){Lt.postMessage(null)}}else nt=function(){N(at,0)};function dt(k,q){H=N(function(){k(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125st?(k.sortIndex=Z,t(g,k),i(p)===null&&k===i(g)&&(E?(M(H),H=-1):E=!0,dt(V,Z-st))):(k.sortIndex=ut,t(p,k),w||b||(w=!0,I||(I=!0,nt()))),k},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(k){var q=v;return function(){var Z=v;v=q;try{return k.apply(this,arguments)}finally{v=Z}}}})(xh)),xh}var q0;function yC(){return q0||(q0=1,Ch.exports=gC()),Ch.exports}var _h={exports:{}},gt={};var K0;function mC(){if(K0)return gt;K0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,L){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,L,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function M(){}M.prototype=N.prototype;function R(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}var A=R.prototype=new M;A.constructor=R,E(A,N.prototype),A.isPureReactComponent=!0;var V=Array.isArray;function I(){}var H={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function tt(_,L,Y){var Q=Y.ref;return{$$typeof:n,type:_,key:L,ref:Q!==void 0?Q:null,props:Y}}function X(_,L){return tt(_.type,L,_.props)}function at(_){return typeof _==`object`&&_!==null&&_.$$typeof===n}function nt(_){var L={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return L[Y]})}var wt=/\/+/g;function Lt(_,L){return typeof _==`object`&&_!==null&&_.key!=null?nt(``+_.key):L.toString(36)}function dt(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(L){_.status===`pending`&&(_.status=`fulfilled`,_.value=L)},function(L){_.status===`pending`&&(_.status=`rejected`,_.reason=L)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function k(_,L,Y,Q,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var vt=!1;if(_===null)vt=!0;else switch(it){case`bigint`:case`string`:case`number`:vt=!0;break;case`object`:switch(_.$$typeof){case n:case t:vt=!0;break;case m:return vt=_._init,k(vt(_._payload),L,Y,Q,ot)}}if(vt)return ot=ot(_),vt=Q===``?`.`+Lt(_,0):Q,V(ot)?(Y=``,vt!=null&&(Y=vt.replace(wt,`$&/`)+`/`),k(ot,L,Y,``,function($e){return $e})):ot!=null&&(at(ot)&&(ot=X(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(wt,`$&/`)+`/`)+vt)),L.push(ot)),1;vt=0;var xt=Q===``?`.`:Q+`:`;if(V(_))for(var bt=0;bt<_.length;bt++)Q=_[bt],it=xt+Lt(Q,bt),vt+=k(Q,L,Y,it,ot);else if(bt=b(_),typeof bt==`function`)for(_=bt.call(_),bt=0;!(Q=_.next()).done;)Q=Q.value,it=xt+Lt(Q,bt++),vt+=k(Q,L,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return k(dt(_),L,Y,Q,ot);throw L=String(_),Error(`Objects are not valid as a React child (found: `+(L===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:L)+`). If you meant to render a collection of children, use an array instead.`)}return vt}function q(_,L,Y){if(_==null)return _;var Q=[],ot=0;return k(_,Q,``,``,function(it){return L.call(Y,it,ot++)}),Q}function Z(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var st=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var L=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,L,Y){q(_,function(){L.apply(this,arguments)},Y)},count:function(_){var L=0;return q(_,function(){L++}),L},toArray:function(_){return q(_,function(L){return L})||[]},only:function(_){if(!at(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return gt.Activity=y,gt.Children=ut,gt.Component=N,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=R,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return H.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,L,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var Q=E({},_.props),ot=_.key;if(L!=null)for(it in L.key!==void 0&&(ot=``+L.key),L)!W.call(L,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&L.ref===void 0||(Q[it]=L[it]);var it=arguments.length-2;if(it===1)Q.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Th.exports=SC(),Th.exports}var Y0;function wC(){if(Y0)return $a;Y0=1;var n=yC(),t=Fd(),i=vC();function r(e){var s=`https://react.dev/errors/`+e;if(1ut||(e.current=st[ut],st[ut]=null,ut--)}function Y(e,s){ut++,st[ut]=e.current,e.current=s}var Q=_(null),ot=_(null),it=_(null),vt=_(null);function xt(e,s){switch(Y(it,s),Y(ot,e),Y(Q,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&&(e=e.namespaceURI)?l0(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=l0(s),e=o0(s,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(Q),Y(Q,e)}function bt(){L(Q),L(ot),L(it)}function $e(e){e.memoizedState!==null&&Y(vt,e);var s=Q.current,a=o0(s,e.type);s!==a&&(Y(ot,e),Y(Q,a))}function Ge(e){ot.current===e&&(L(Q),L(ot)),vt.current===e&&(L(vt),Ia._currentValue=Z)}var Fn,Xr;function wn(e){if(Fn===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Fn=s&&s[1]||``,Xr=-1)`:-1f||x[c]!==z[f]){var K=` +`+x[c].replace(` at new `,` at `);return e.displayName&&K.includes(``)&&(K=K.replace(``,e.displayName)),K}while(1<=c&&0<=f);break}}}finally{ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?wn(a):``}function et(e,s){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn(`Lazy`);case 13:return e.child!==s&&s!==null?wn(`Suspense Fallback`):wn(`Suspense`);case 19:return wn(`SuspenseList`);case 0:case 15:return Jr(e.type,!1);case 11:return Jr(e.type.render,!1);case 1:return Jr(e.type,!0);case 31:return wn(`Activity`);default:return``}}function P(e){try{var s=``,a=null;do s+=et(e,a),a=e,e=e.return;while(e);return s}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var pt=Object.prototype.hasOwnProperty,ft=n.unstable_scheduleCallback,St=n.unstable_cancelCallback,Xt=n.unstable_shouldYield,je=n.unstable_requestPaint,Ft=n.unstable_now,Dn=n.unstable_getCurrentPriorityLevel,Mn=n.unstable_ImmediatePriority,Ui=n.unstable_UserBlockingPriority,bs=n.unstable_NormalPriority,Fb=n.unstable_LowPriority,qp=n.unstable_IdlePriority,Qb=n.log,Xb=n.unstable_setDisableYieldValue,Zr=null,Ye=null;function Es(e){if(typeof Qb==`function`&&Xb(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Zr,e)}catch{}}var Fe=Math.clz32?Math.clz32:Wb,Jb=Math.log,Zb=Math.LN2;function Wb(e){return e>>>=0,e===0?32:31-(Jb(e)/Zb|0)|0}var Ol=256,Rl=262144,Dl=4194304;function ni(e){var s=e&42;if(s!==0)return s;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ml(e,s,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ni(c):(S&=C,S!==0?f=ni(S):a||(a=C&~e,a!==0&&(f=ni(a))))):(C=c&~h,C!==0?f=ni(C):S!==0?f=ni(S):a||(a=c&~e,a!==0&&(f=ni(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function Wr(e,s){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&s)===0}function Pb(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kp(){var e=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function ou(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function Pr(e,s){e.pendingLanes|=s,s!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tE(e,s,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,z=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var aE=/[\n"\\]/g;function an(e){return e.replace(aE,function(s){return`\\`+s.charCodeAt(0).toString(16)+` `})}function pu(e,s,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),s!=null?S===`number`?(s===0&&e.value===``||e.value!=s)&&(e.value=``+rn(s)):e.value!==``+rn(s)&&(e.value=``+rn(s)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),s!=null?gu(e,S,rn(s)):a!=null?gu(e,S,rn(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+rn(C):e.removeAttribute(`name`)}function eg(e,s,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),s!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||s!=null)){du(e);return}a=a!=null?``+rn(a):``,s=s!=null?``+rn(s):a,C||s===e.value||(e.value=s),e.defaultValue=s}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),du(e)}function gu(e,s,a){s===`number`&&zl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Ii(e,s,a,c){if(e=e.options,s){s={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),wu=!1;if(Jn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){wu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{wu=!1}var xs=null,bu=null,Nl=null;function og(){if(Nl)return Nl;var e,s=bu,a=s.length,c,f=`value`in xs?xs.value:xs.textContent,h=f.length;for(e=0;e=aa),pg=` `,gg=!1;function yg(e,s){switch(e){case`keyup`:return zE.indexOf(s.keyCode)!==-1;case`keydown`:return s.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mg(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Vi=!1;function NE(e,s){switch(e){case`compositionend`:return mg(s);case`keypress`:return s.which!==32?null:(gg=!0,pg);case`textInput`:return e=s.data,e===pg&&gg?null:e;default:return null}}function BE(e,s){if(Vi)return e===`compositionend`||!Tu&&yg(e,s)?(e=og(),Nl=bu=xs=null,Vi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=_g(a)}}function Ag(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?Ag(e,s.parentNode):`contains`in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Og(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=zl(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==`string`}catch{a=!1}if(a)e=s.contentWindow;else break;s=zl(e.document)}return s}function Ru(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||s===`textarea`||e.contentEditable===`true`)}var GE=Jn&&`documentMode`in document&&11>=document.documentMode,$i=null,Du=null,ua=null,Mu=!1;function Rg(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Mu||$i==null||$i!==zl(c)||(c=$i,`selectionStart`in c&&Ru(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Do(Du,`onSelect`),0>=S,f-=S,kn=1<<32-Fe(s)+f|a<mt?(Tt=lt,lt=null):Tt=lt.sibling;var Ut=j(D,lt,U[mt],$);if(Ut===null){lt===null&&(lt=Tt);break}e&<&&Ut.alternate===null&&s(D,lt),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,lt=Tt}if(mt===U.length)return a(D,lt),Ot&&Wn(D,mt),ct;if(lt===null){for(;mtmt?(Tt=lt,lt=null):Tt=lt.sibling;var Ys=j(D,lt,Ut.value,$);if(Ys===null){lt===null&&(lt=Tt);break}e&<&&Ys.alternate===null&&s(D,lt),O=h(Ys,O,mt),kt===null?ct=Ys:kt.sibling=Ys,kt=Ys,lt=Tt}if(Ut.done)return a(D,lt),Ot&&Wn(D,mt),ct;if(lt===null){for(;!Ut.done;mt++,Ut=U.next())Ut=G(D,Ut.value,$),Ut!==null&&(O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Ot&&Wn(D,mt),ct}for(lt=c(lt);!Ut.done;mt++,Ut=U.next())Ut=B(lt,D,mt,Ut.value,$),Ut!==null&&(e&&Ut.alternate!==null&<.delete(Ut.key===null?mt:Ut.key),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&<.forEach(function(fC){return s(D,fC)}),Ot&&Wn(D,mt),ct}function qt(D,O,U,$){if(typeof U==`object`&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U==`object`&&U!==null){switch(U.$$typeof){case b:t:{for(var ct=U.key;O!==null;){if(O.key===ct){if(ct=U.type,ct===E){if(O.tag===7){a(D,O.sibling),$=f(O,U.props.children),$.return=D,D=$;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===W&&di(ct)===O.type){a(D,O.sibling),$=f(O,U.props),ya($,U),$.return=D,D=$;break t}a(D,O);break}else s(D,O);O=O.sibling}U.type===E?($=oi(U.props.children,D.mode,$,U.key),$.return=D,D=$):($=Yl(U.type,U.key,U.props,null,D.mode,$),ya($,U),$.return=D,D=$)}return S(D);case w:t:{for(ct=U.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===U.containerInfo&&O.stateNode.implementation===U.implementation){a(D,O.sibling),$=f(O,U.children||[]),$.return=D,D=$;break t}else{a(D,O);break}else s(D,O);O=O.sibling}$=Lu(U,D.mode,$),$.return=D,D=$}return S(D);case W:return U=di(U),qt(D,O,U,$)}if(dt(U))return rt(D,O,U,$);if(nt(U)){if(ct=nt(U),typeof ct!=`function`)throw Error(r(150));return U=ct.call(U),ht(D,O,U,$)}if(typeof U.then==`function`)return qt(D,O,Pl(U),$);if(U.$$typeof===R)return qt(D,O,Xl(D,U),$);to(D,U)}return typeof U==`string`&&U!==``||typeof U==`number`||typeof U==`bigint`?(U=``+U,O!==null&&O.tag===6?(a(D,O.sibling),$=f(O,U),$.return=D,D=$):(a(D,O),$=Bu(U,D.mode,$),$.return=D,D=$),S(D)):a(D,O)}return function(D,O,U,$){try{ga=0;var ct=qt(D,O,U,$);return er=null,ct}catch(lt){if(lt===tr||lt===Zl)throw lt;var kt=Xe(29,lt,null,D.mode);return kt.lanes=$,kt.return=D,kt}}}var gi=Wg(!0),Pg=Wg(!1),Rs=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ds(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ms(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(zt&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=Gl(e),Ng(e,null,a),s}return $l(e,c,s,a),Gl(e)}function ma(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,$p(e,a)}}function Wu(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var Pu=!1;function Sa(){if(Pu){var e=Pi;if(e!==null)throw e}}function va(e,s,a,c){Pu=!1;var f=e.updateQueue;Rs=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,z=x.next;x.next=null,S===null?h=z:S.next=z,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=z:C.next=z,K.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,K=z=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(_t&j)===j:(c&j)===j){j!==0&&j===Wi&&(Pu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ht=C;j=s;var qt=a;switch(ht.tag){case 1:if(rt=ht.payload,typeof rt==`function`){G=rt.call(qt,G,j);break t}G=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ht.payload,j=typeof rt==`function`?rt.call(qt,G,j):rt,j==null)break t;G=y({},G,j);break t;case 2:Rs=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(z=K=B,x=G):K=K.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);K===null&&(x=G),f.baseState=x,f.firstBaseUpdate=z,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),Ns|=S,e.lanes=S,e.memoizedState=G}}function ty(e,s){if(typeof e!=`function`)throw Error(r(191,e));e.call(s)}function ey(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=k.T,C={};k.T=C,vf(e,!1,s,a);try{var x=f(),z=k.S;if(z!==null&&z(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var K=t1(x,c);Ea(e,s,K,tn(e))}else Ea(e,s,c,tn(e))}catch(G){Ea(e,s,{then:function(){},status:`rejected`,reason:G},tn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),k.T=S}}function a1(){}function mf(e,s,a,c){if(e.tag!==5)throw Error(r(476));var f=Uy(e).queue;ky(e,f,s,Z,a===null?a1:function(){return zy(e),a(c)})}function Uy(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&&(e.memoizedState=s),s}function zy(e){var s=Uy(e);s.next===null&&(s=e.alternate.memoizedState),Ea(e,s.next.queue,{},tn())}function Sf(){return Ce(Ia)}function jy(){return ee().memoizedState}function Ny(){return ee().memoizedState}function l1(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=tn();e=Ds(a);var c=Ms(s,e,a);c!==null&&(Ke(c,s,a),ma(c,s,a)),s={cache:Yu()},e.payload=s;return}s=s.return}}function o1(e,s,a){var c=tn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},uo(e)?Ly(s,a):(a=ju(e,s,a,c),a!==null&&(Ke(a,e,c),Iy(a,s,c)))}function By(e,s,a){var c=tn();Ea(e,s,a,c)}function Ea(e,s,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(uo(e))Ly(s,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var S=s.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,Qe(C,S))return $l(e,s,f,0),Kt===null&&Vl(),!1}catch{}if(a=ju(e,s,f,c),a!==null)return Ke(a,e,c),Iy(a,s,c),!0}return!1}function vf(e,s,a,c){if(c={lane:2,revertLane:Zf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},uo(e)){if(s)throw Error(r(479))}else s=ju(e,a,c,2),s!==null&&Ke(s,e,2)}function uo(e){var s=e.alternate;return e===yt||s!==null&&s===yt}function Ly(e,s){sr=so=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function Iy(e,s,a){if((a&4194048)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,$p(e,a)}}var Ca={readContext:Ce,use:ao,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Ca.useEffectEvent=Jt;var Hy={readContext:Ce,use:ao,useCallback:function(e,s){return De().memoizedState=[e,s===void 0?null:s],e},useContext:Ce,useEffect:Cy,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,oo(4194308,4,Ay.bind(null,s,e),a)},useLayoutEffect:function(e,s){return oo(4194308,4,e,s)},useInsertionEffect:function(e,s){oo(4,2,e,s)},useMemo:function(e,s){var a=De();s=s===void 0?null:s;var c=e();if(yi){Es(!0);try{e()}finally{Es(!1)}}return a.memoizedState=[c,s],c},useReducer:function(e,s,a){var c=De();if(a!==void 0){var f=a(s);if(yi){Es(!0);try{a(s)}finally{Es(!1)}}}else f=s;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=o1.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var s=De();return e={current:e},s.memoizedState=e},useState:function(e){e=hf(e);var s=e.queue,a=By.bind(null,yt,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:gf,useDeferredValue:function(e,s){var a=De();return yf(a,e,s)},useTransition:function(){var e=hf(!1);return e=ky.bind(null,yt,e.queue,!0,!1),De().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var c=yt,f=De();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),Kt===null)throw Error(r(349));(_t&127)!==0||ly(c,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,Cy(cy.bind(null,c,h,e),[e]),c.flags|=2048,rr(9,{destroy:void 0},oy.bind(null,c,h,a,s),null),a},useId:function(){var e=De(),s=Kt.identifierPrefix;if(Ot){var a=Un,c=kn;a=(c&~(1<<32-Fe(c)-1)).toString(32)+a,s=`_`+s+`R_`+a,a=io++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[be]=s,h[Ne]=c;t:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break t;for(;S.sibling===null;){if(S.return===null||S.return===s)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=h;t:switch(_e(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(s)}}return Yt(s),Uf(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&&s.stateNode!=null)e.memoizedProps!==c&&is(s);else{if(typeof c!=`string`&&s.stateNode===null)throw Error(r(166));if(e=it.current,Ji(s)){if(e=s.stateNode,a=s.memoizedProps,c=null,f=Ee,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[be]=s,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||r0(e.nodeValue,a)),e||As(s,!0)}else e=Mo(e).createTextNode(c),e[be]=s,s.stateNode=e}return Yt(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(c=Ji(s),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[be]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),e=!1}else a=Ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&256?(Ze(s),s):(Ze(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ji(s),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[be]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),f=!1}else f=Ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(Ze(s),s):(Ze(s),null)}return Ze(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(s.child.flags|=8192),yo(s,s.updateQueue),Yt(s),null);case 4:return bt(),e===null&&eh(s.stateNode.containerInfo),Yt(s),null;case 10:return ts(s.type),Yt(s),null;case 19:if(L(te),c=s.memoizedState,c===null)return Yt(s),null;if(f=(s.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(h=no(e),h!==null){for(s.flags|=128,_a(c,!1),e=h.updateQueue,s.updateQueue=e,yo(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)Bg(a,e),a=a.sibling;return Y(te,te.current&1|2),Ot&&Wn(s,c.treeForkCount),s.child}e=e.sibling}c.tail!==null&&Ft()>bo&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304)}else{if(!f)if(e=no(h),e!==null){if(s.flags|=128,f=!0,e=e.updateQueue,s.updateQueue=e,yo(s,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(s),null}else 2*Ft()-c.renderingStartTime>bo&&a!==536870912&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304);c.isBackwards?(h.sibling=s.child,s.child=h):(e=c.last,e!==null?e.sibling=h:s.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Ft(),e.sibling=null,a=te.current,Y(te,f?a&1|2:a&1),Ot&&Wn(s,c.treeForkCount),e):(Yt(s),null);case 22:case 23:return Ze(s),ef(),c=s.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),a=s.updateQueue,a!==null&&yo(s,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),e!==null&&L(hi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),ts(ie),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function d1(e,s){switch(Hu(s),s.tag){case 1:return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return ts(ie),bt(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 26:case 27:case 5:return Ge(s),null;case 31:if(s.memoizedState!==null){if(Ze(s),s.alternate===null)throw Error(r(340));ci()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 13:if(Ze(s),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ci()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return L(te),null;case 4:return bt(),null;case 10:return ts(s.type),null;case 22:case 23:return Ze(s),ef(),e!==null&&L(hi),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 24:return ts(ie),null;case 25:return null;default:return null}}function um(e,s){switch(Hu(s),s.tag){case 3:ts(ie),bt();break;case 26:case 27:case 5:Ge(s);break;case 4:bt();break;case 31:s.memoizedState!==null&&Ze(s);break;case 13:Ze(s);break;case 19:L(te);break;case 10:ts(s.type);break;case 22:case 23:Ze(s),ef(),e!==null&&L(hi);break;case 24:ts(ie)}}function Ta(e,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(s,s.return,C)}}function zs(e,s,a){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=s;var x=a,z=C;try{z()}catch(K){Bt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Bt(s,s.return,K)}}function fm(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{ey(s,a)}catch(c){Bt(e,e.return,c)}}}function hm(e,s,a){a.props=mi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,s,c)}}function Aa(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,s,f)}}function zn(e,s){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,s,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,s,f)}else a.current=null}function dm(e){var s=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(s){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function zf(e,s,a){try{var c=e.stateNode;j1(c,e.type,a,s),c[Ne]=s}catch(f){Bt(e,e.return,f)}}function pm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qs(e.type)||e.tag===4}function jf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||pm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nf(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Xn));else if(c!==4&&(c===27&&qs(e.type)&&(a=e.stateNode,s=null),e=e.child,e!==null))for(Nf(e,s,a),e=e.sibling;e!==null;)Nf(e,s,a),e=e.sibling}function mo(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(c===27&&qs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,s,a),e=e.sibling;e!==null;)mo(e,s,a),e=e.sibling}function gm(e){var s=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);_e(s,c,a),s[be]=e,s[Ne]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,le=!1,Bf=!1,ym=typeof WeakSet==`function`?WeakSet:Set,ge=null;function p1(e,s){if(e=e.containerInfo,ih=Lo,e=Og(e),Ru(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,z=0,K=0,G=e,j=null;e:for(;;){for(var B;G!==a||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(B=G.firstChild)!==null;)j=G,G=B;for(;;){if(G===e)break e;if(j===a&&++z===f&&(C=S),j===h&&++K===c&&(x=S),(B=G.nextSibling)!==null)break;G=j,j=G.parentNode}G=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(rh={focusedElem:e,selectionRange:a},Lo=!1,ge=s;ge!==null;)if(s=ge,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,ge=e;else for(;ge!==null;){switch(s=ge,h=s.alternate,e=s.flags,s.tag){case 0:if((e&4)!==0&&(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),_e(h,c,a),h[be]=e,pe(h),c=h;break t;case`link`:var S=E0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;Cqt&&(S=qt,qt=ht,ht=S);var D=Tg(C,ht),O=Tg(C,qt);if(D&&O&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var U=G.createRange();U.setStart(D.node,D.offset),B.removeAllRanges(),ht>qt?(B.addRange(U),B.extend(O.node,O.offset)):(U.setEnd(O.node,O.offset),B.addRange(U))}}}}for(G=[],B=C;B=B.parentNode;)B.nodeType===1&&G.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;Ca?32:a,k.T=null,a=$f,$f=null;var h=Ls,S=us;if(ue=0,ur=Ls=null,us=0,(zt&6)!==0)throw Error(r(331));var C=zt;if(zt|=4,Am(h.current),xm(h,h.current,S,a),zt=C,Ua(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,k.T=c,Gm(e,s)}}function Fm(e,s,a){s=on(a,s),s=Cf(e.stateNode,s,2),e=Ms(e,s,2),e!==null&&(Pr(e,2),jn(e))}function Bt(e,s,a){if(e.tag===3)Fm(e,e,a);else for(;s!==null;){if(s.tag===3){Fm(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Bs===null||!Bs.has(c))){e=on(a,e),a=Qy(2),c=Ms(s,a,2),c!==null&&(Xy(a,c,s,e),Pr(c,2),jn(c));break}}s=s.return}}function Qf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new m1;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(a)||(Hf=!0,f.add(a),e=E1.bind(null,e,s,a),s.then(e,e))}function E1(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Kt===e&&(_t&a)===a&&(Zt===4||Zt===3&&(_t&62914560)===_t&&300>Ft()-wo?(zt&2)===0&&fr(e,0):qf|=a,cr===_t&&(cr=0)),jn(e)}function Qm(e,s){s===0&&(s=Kp()),e=li(e,s),e!==null&&(Pr(e,s),jn(e))}function C1(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Qm(e,a)}function x1(e,s){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Qm(e,a)}function _1(e,s){return ft(e,s)}var Ao=null,dr=null,Xf=!1,Oo=!1,Jf=!1,Hs=0;function jn(e){e!==dr&&e.next===null&&(dr===null?Ao=dr=e:dr=dr.next=e),Oo=!0,Xf||(Xf=!0,A1())}function Ua(e,s){if(!Jf&&Oo){Jf=!0;do for(var a=!1,c=Ao;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Fe(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Wm(c,h))}else h=_t,h=Ml(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Wm(c,h));c=c.next}while(a);Jf=!1}}function T1(){Xm()}function Xm(){Oo=Xf=!1;var e=0;Hs!==0&&B1()&&(e=Hs);for(var s=Ft(),a=null,c=Ao;c!==null;){var f=c.next,h=Jm(c,s);h===0?(c.next=null,a===null?Ao=f:a.next=f,f===null&&(dr=a)):(a=c,(e!==0||(h&3)!==0)&&(Oo=!0)),c=f}ue!==0&&ue!==5||Ua(e),Hs!==0&&(Hs=0)}function Jm(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,G=x.initiatorType;K&&a0(G)&&(x=x.responseEnd,S+=K*(x`u`?null:document;function S0(e,s,a){var c=pr;if(c&&typeof s==`string`&&s){var f=an(s);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),m0.has(f)||(m0.add(f),e={rel:e,crossOrigin:a,href:s},c.querySelector(f)===null&&(s=c.createElement(`link`),_e(s,`link`,e),pe(s),c.head.appendChild(s)))}}function Y1(e){fs.D(e),S0(`dns-prefetch`,e,null)}function F1(e,s){fs.C(e,s),S0(`preconnect`,e,s)}function Q1(e,s,a){fs.L(e,s,a);var c=pr;if(c&&e&&s){var f=`link[rel="preload"][as="`+an(s)+`"]`;s===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+an(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+an(a.imageSizes)+`"]`)):f+=`[href="`+an(e)+`"]`;var h=f;switch(s){case`style`:h=gr(e);break;case`script`:h=yr(e)}pn.has(h)||(e=y({rel:`preload`,href:s===`image`&&a&&a.imageSrcSet?void 0:e,as:s},a),pn.set(h,e),c.querySelector(f)!==null||s===`style`&&c.querySelector(Ba(h))||s===`script`&&c.querySelector(La(h))||(s=c.createElement(`link`),_e(s,`link`,e),pe(s),c.head.appendChild(s)))}}function X1(e,s){fs.m(e,s);var a=pr;if(a&&e){var c=s&&typeof s.as==`string`?s.as:`script`,f=`link[rel="modulepreload"][as="`+an(c)+`"][href="`+an(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=yr(e)}if(!pn.has(h)&&(e=y({rel:`modulepreload`,href:e},s),pn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),_e(c,`link`,e),pe(c),a.head.appendChild(c)}}}function J1(e,s,a){fs.S(e,s,a);var c=pr;if(c&&e){var f=Bi(c).hoistableStyles,h=gr(e);s=s||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":s},a),(a=pn.get(h))&&hh(e,a);var x=S=c.createElement(`link`);pe(x),_e(x,`link`,e),x._p=new Promise(function(z,K){x.onload=z,x.onerror=K}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Uo(S,s,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function Z1(e,s){fs.X(e,s);var a=pr;if(a&&e){var c=Bi(a).hoistableScripts,f=yr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0},s),(s=pn.get(f))&&dh(e,s),h=a.createElement(`script`),pe(h),_e(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function W1(e,s){fs.M(e,s);var a=pr;if(a&&e){var c=Bi(a).hoistableScripts,f=yr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0,type:`module`},s),(s=pn.get(f))&&dh(e,s),h=a.createElement(`script`),pe(h),_e(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function v0(e,s,a,c){var f=(f=it.current)?ko(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(s=gr(a.href),a=Bi(f).hoistableStyles,c=a.get(s),c||(c={type:`style`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=gr(a.href);var h=Bi(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),pn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},pn.set(e,a),h||P1(f,e,a,S.state))),s&&c===null)throw Error(r(528,``));return S}if(s&&c!==null)throw Error(r(529,``));return null;case`script`:return s=a.async,a=a.src,typeof a==`string`&&s&&typeof s!=`function`&&typeof s!=`symbol`?(s=yr(a),a=Bi(f).hoistableScripts,c=a.get(s),c||(c={type:`script`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function gr(e){return`href="`+an(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function w0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function P1(e,s,a,c){e.querySelector(`link[rel="preload"][as="style"][`+s+`]`)?c.loading=1:(s=e.createElement(`link`),c.preload=s,s.addEventListener(`load`,function(){return c.loading|=1}),s.addEventListener(`error`,function(){return c.loading|=2}),_e(s,`link`,a),pe(s),e.head.appendChild(s))}function yr(e){return`[src="`+an(e)+`"]`}function La(e){return`script[async]`+e}function b0(e,s,a){if(s.count++,s.instance===null)switch(s.type){case`style`:var c=e.querySelector(`style[data-href~="`+an(a.href)+`"]`);if(c)return s.instance=c,pe(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),pe(c),_e(c,`style`,f),Uo(c,a.precedence,e),s.instance=c;case`stylesheet`:f=gr(a.href);var h=e.querySelector(Ba(f));if(h)return s.state.loading|=4,s.instance=h,pe(h),h;c=w0(a),(f=pn.get(f))&&hh(c,f),h=(e.ownerDocument||e).createElement(`link`),pe(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),_e(h,`link`,c),s.state.loading|=4,Uo(h,a.precedence,e),s.instance=h;case`script`:return h=yr(a.src),(f=e.querySelector(La(h)))?(s.instance=f,pe(f),f):(c=a,(f=pn.get(h))&&(c=y({},a),dh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),pe(f),_e(f,`link`,c),e.head.appendChild(f),s.instance=f);case`void`:return null;default:throw Error(r(443,s.type))}else s.type===`stylesheet`&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,Uo(c,a.precedence,e));return s.instance}function Uo(e,s,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function tC(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof s.precedence!=`string`||typeof s.href!=`string`||s.href===``)break;return!0;case`link`:if(typeof s.rel!=`string`||typeof s.href!=`string`||s.href===``||s.onLoad||s.onError)break;switch(s.rel){case`stylesheet`:return e=s.disabled,typeof s.precedence==`string`&&e==null;default:return!0}case`script`:if(s.async&&typeof s.async!=`function`&&typeof s.async!=`symbol`&&!s.onLoad&&!s.onError&&s.src&&typeof s.src==`string`)return!0}return!1}function x0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function eC(e,s,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=gr(c.href),h=s.querySelector(Ba(f));if(h){s=h._p,s!==null&&typeof s==`object`&&typeof s.then==`function`&&(e.count++,e=jo.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=h,pe(h);return}h=s.ownerDocument||s,c=w0(c),(f=pn.get(f))&&hh(c,f),h=h.createElement(`link`),pe(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),_e(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=jo.bind(e),s.addEventListener(`load`,a),s.addEventListener(`error`,a))}}var ph=0;function nC(e,s){return e.stylesheets&&e.count===0&&Bo(e,e.stylesheets),0ph?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function Bo(e,s){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,s.forEach(sC,e),No=null,jo.call(e))}function sC(e,s){if(!(s.state.loading&4)){var a=No.get(e);if(a)var c=a.get(null);else{a=new Map,No.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Eh.exports=wC(),Eh.exports}var EC=bC(),J=Fd();const CC={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk3NjY0NH0.F67aNfIfZTYJHWg1hI8aFjlXlWqRRv1R9XdnRpRPCLg`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTc2NjU4fQ.hP1i-w7N4NIYQUXGSMJDh8kL6JJaTTmh84Ha2e7qVbk`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},Uv=J.createContext(null);function Qd(){const n=J.useContext(Uv);if(!n)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return n}function Go(n){const t=CC[n];if(!t)throw new Error(`Missing environment variable: ${n}`);return t}function xC({children:n}){const t=Go(`VITE_YJS_URL`),i=Go(`VITE_DS_URL`),r=J.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_YJS_TOKEN`)}`}),[]),l=J.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_DS_TOKEN`)}`}),[]),o=J.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(Uv.Provider,{value:o,children:n})}var Yo={exports:{}},Ah,Q0;function _C(){if(Q0)return Ah;Q0=1;function n(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Ah=n,Ah}var X0;function TC(){if(X0)return Yo.exports;X0=1;var n=_C();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=n(r),g=null,m=null,y=0,v=null,b={push:A,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(X){if(!(X>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=X,!b.paused)for(;g&&y=d||b.paused?m?(m.next=nt,m=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function V(X,at){var nt=p.get();nt.context=o,nt.release=I,nt.value=X,nt.callback=at||i,nt.errorHandler=v,y>=d||b.paused?g?(nt.next=g,g=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function I(X){X&&p.release(X);var at=g;at&&y<=d?b.paused?y--:(m===g&&(m=null),g=at.next,at.next=null,u.call(o,at.value,at.worked),m===null&&b.empty()):--y===0&&b.drain()}function H(){g=null,m=null,b.drain=i}function W(){g=null,m=null,b.drain(),b.drain=i}function tt(X){v=X}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,M){m(E,function(R,A){if(R){M(R);return}N(A)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,M){y(E,function(R,A){if(R){M(R);return}N(A)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Yo.exports=t,Yo.exports.promise=l,Yo.exports}var AC=TC();const zv=hC(AC),_n=`Stream-Next-Offset`,qc=`Stream-Cursor`,Kc=`Stream-Up-To-Date`,In=`Stream-Closed`,Oh=`Stream-Seq`,OC=`Stream-TTL`,RC=`Stream-Expires-At`,J0=`Producer-Id`,Fo=`Producer-Epoch`,Z0=`Producer-Seq`,DC=`Producer-Expected-Seq`,MC=`Producer-Received-Seq`,Rh=`offset`,Qo=`live`,kC=`stream-sse-data-encoding`;var Zs=class jv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new jv(r,o,u,l,i)}},Xd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class fd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=W0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new fd(d,u,r,l)}static fromFetchError(t){const i=W0(t.status);return new fd(t.message,i,t.status,t.json??t.text)}};function W0(n){switch(n){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var UC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},Nv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(n,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,n),this.name=`StreamClosedError`,this.finalOffset=t}},zC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const jC=[429,503],Jd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function NC(n){if(!n)return 0;const t=Number(n);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(n);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function Bv(n,t=Jd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await n(...p);if(b.ok)return b;throw await Zs.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Xd;if(b instanceof Zs&&!jC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Zs?NC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const M=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${M}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(M=>setTimeout(M,N)),y=Math.min(y*l,r)}}}}const BC=[201,204,205];function LC(n){return async(...t)=>{const i=t[0],r=await n(...t);try{if(r.status<200||BC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Xd:new Zs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function IC(n){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof n[Symbol.asyncIterator]==`function`}function HC(n){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof n[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(n,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(n,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Dh(n){return IC(n)||HC(n),n}async function*P0(n,t){const i=n.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=l.split(` +`);l=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Zd=class{shouldContinueLive(n,t){return!(n&&this.upToDate||t===!1||this.streamClosed)}},Lv=class hd extends Zd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new hd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new hd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Wd(this)}},Mh=class br extends Zd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new br({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new br({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new Lv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Wd(this)}},Wd=class dd extends Zd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new dd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new dd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const tS=`PAUSE_STREAM`;var qC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(n){this.url=n.url,this.contentType=n.contentType,this.live=n.live,this.startOffset=n.startOffset;const t={offset:n.initialOffset,cursor:n.initialCursor,upToDate:n.initialUpToDate,streamClosed:n.initialStreamClosed};this.#i=n.startSSE?new Mh(t):new Lv(t),this.#t=n.firstResponse.headers,this.#e=n.firstResponse.status,this.#n=n.firstResponse.statusText,this.#s=n.firstResponse.ok,this.#a=!1,this.#c=n.isJsonMode,this.#l=n.abortController,this.#p=n.fetchNext,this.#d=n.startSSE,this.#v={minConnectionDuration:n.sseResilience?.minConnectionDuration??1e3,maxShortConnections:n.sseResilience?.maxShortConnections??3,backoffBaseDelay:n.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:n.sseResilience?.backoffMaxDelay??5e3,logWarnings:n.sseResilience?.logWarnings??!0},this.#E=n.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(n.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const n=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,n),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,n)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(n=>{this.#S=n}),this.#u?.abort(tS))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Wd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(n){this.#b?.(),this.#f(n)}#w(n){if(this.#x!==null)throw new Pt(`Cannot call ${n}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=n}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(n){this.#i=this.#i.withResponseMetadata({offset:n.headers.get(_n)||void 0,cursor:n.headers.get(qc)||void 0,upToDate:n.headers.has(Kc),streamClosed:n.headers.get(In)?.toLowerCase()===`true`}),this.#t=n.headers,this.#e=n.status,this.#n=n.statusText,this.#s=n.ok}#U(n){this.#i=this.#i.withSSEControl(n)}#z(){this.#i instanceof Mh||(this.#i=new Mh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const n=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=n.state,n.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(n.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,n.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?P0(t.body,this.#u.signal):null}async#B(n){const{done:t,value:i}=await n.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,n):(this.#U(i),i.upToDate?{type:`response`,response:VC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(n,t){const i=[n];for(;;){const{done:r,value:l}=await t.next();if(r){const o=pd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:pd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(n){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(n.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&n.body)this.#z(),this.#u=new AbortController,i=P0(n.body,this.#u.signal);else{if(r.enqueue(n),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===tS){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const n=this.#C(),t=[];try{let r=await n.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await n.read()}}finally{n.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:n,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),n}bodyStream(){return this.#w(`bodyStream`),Dh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const n=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await n.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await n.read()}this.#r(),r.close()},cancel:()=>{n.releaseLock(),this.cancel()}});return Dh(i)}textStream(){this.#w(`textStream`);const n=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(n.decode(i,{stream:!0}))},flush(i){const r=n.decode();r&&i.enqueue(r)}}));return Dh(t)}subscribeJson(n){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await n({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(n){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await n({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(n){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await n({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(n){this.#l.abort(n),this.#b?.(),this.#r()}get closed(){return this.#g}};function kh(n,t,i,r){const l=n.headers.get(_n),o=n.headers.get(qc),u=n.headers.has(Kc),d=n.headers.get(In)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function KC(n){const t=n.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>KC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of n){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=n.join(``);return new Response(g,{status:200,headers:p})}async function Za(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(n,t,i){const r=n.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(n.headers.get(In)?.toLowerCase()===`true`){const d=n.headers.get(_n)??void 0;throw new Nv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(n,t)}async function sc(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const eS=new Set;function $C(){if(!(typeof process>`u`))return`production`}function GC(){return typeof globalThis.window<`u`}function YC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function FC(n){try{return new URL(n)}catch{const t=YC();if(t)try{return new URL(n,t)}catch{return}return}}function Iv(n,t){if(t===!1||$C()===`test`||!GC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=n instanceof URL?n.toString():n,l=FC(r);l&&l.protocol===`http:`&&(eS.has(l.origin)||(eS.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function QC(n){if(!n.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=n.headers,i=n.params;for(;;)try{return await XC({...n,headers:t,params:i})}catch(r){if(n.onError){const l=await n.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function XC(n){const t=n.url instanceof URL?n.url.toString():n.url;Iv(t,n.warnOnHttp);const i=new URL(t),r=n.offset??`-1`;i.searchParams.set(Rh,r);const l=n.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Qo,l);const o=await sc(n.params);for(const[I,H]of Object.entries(o))i.searchParams.set(I,H);const u=await Za(n.headers),d=new AbortController;n.signal&&n.signal.addEventListener(`abort`,()=>d.abort(n.signal?.reason),{once:!0});const p=n.fetch??((...I)=>fetch(...I)),g=n.backoffOptions??Jd,m=Bv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Xd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(_n)??r,w=y.headers.get(qc)??void 0,E=y.headers.has(Kc),T=y.headers.get(In)?.toLowerCase()===`true`,N=n.json===!0||(v?.includes(`application/json`)??!1),R=y.headers.get(kC)===`base64`?`base64`:void 0,A=async(I,H,W,tt)=>{const X=new URL(t);X.searchParams.set(Rh,I),tt||(l===`sse`?X.searchParams.set(Qo,`sse`):(l===!0||l===`long-poll`)&&X.searchParams.set(Qo,`long-poll`)),H&&X.searchParams.set(`cursor`,H);const at=await sc(n.params);for(const[Lt,dt]of Object.entries(at))X.searchParams.set(Lt,dt);const nt=await Za(n.headers),wt=await m(X.toString(),{method:`GET`,headers:nt,signal:W});return wt.ok||await ps(wt,t),wt},V=l===`sse`?async(I,H,W)=>{const tt=new URL(t);tt.searchParams.set(Rh,I),tt.searchParams.set(Qo,`sse`),H&&tt.searchParams.set(`cursor`,H);const X=await sc(n.params);for(const[wt,Lt]of Object.entries(X))tt.searchParams.set(wt,Lt);const at=await Za(n.headers),nt=await m(tt.toString(),{method:`GET`,headers:at,signal:W});return nt.ok||await ps(nt,t),nt}:void 0;return new qC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:A,startSSE:V,sseResilience:n.sseResilience,encoding:R})}var nS=class extends Error{currentEpoch;constructor(n){super(`Producer epoch is stale. Current server epoch: ${n}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=n}},JC=class extends Error{expectedSeq;receivedSeq;constructor(n,t){super(`Producer sequence gap: expected ${n}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=n,this.receivedSeq=t}};function sS(n){return n?n.split(`;`)[0].trim().toLowerCase():``}var Hv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(n,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=n,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=zv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(n){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof n==`string`)t=new TextEncoder().encode(n);else if(n instanceof Uint8Array)t=n;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(n){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=n,await this.flush();const t=await this.#v(n);return this.#u=t,t}async#v(n){const t=this.#t.contentType??`application/octet-stream`,i=sS(t)===`application/json`;let r;if(n!==void 0){const g=typeof n==`string`?new TextEncoder().encode(n):n;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[J0]:this.#e,[Fo]:this.#n.toString(),[Z0]:l.toString(),[In]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===403){const g=d.headers.get(Fo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(n)}throw new nS(m)}throw await Zs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const n=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:n,seq:t}).catch(()=>{})}):this.#y.push({batch:n,seq:t}).catch(()=>{})}async#O(n){const{batch:t,seq:i}=n,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(n,t,i){let r=this.#S.get(n);r||(r=new Map,this.#S.set(n,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(n,t,i){const r=this.#t.contentType??`application/octet-stream`,l=sS(r)===`application/json`;let o;if(l)o=`[${n.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=n.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of n)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[J0]:this.#e,[Fo]:i.toString(),[Z0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(_n)??``,duplicate:!1};if(g.status===403){const y=g.headers.get(Fo),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(n,0,b)}throw new nS(v)}if(g.status===409){const y=g.headers.get(DC),v=y?parseInt(y,10):0;if(v0&&this.#d(n),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Uh(n){return n?n.split(`;`)[0].trim().toLowerCase():``}function ZC(n){return n!=null&&typeof n.then==`function`}var Ln=class Ya{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){tx(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=zv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Jd},l=Bv(this.#n,r);this.#e=LC(l)}static async create(t){const i=new Ya(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ya(t);return await i.head(),i}static async head(t){return new Ya(t).head()}static async delete(t){return new Ya(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(_n)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(In)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[OC]=String(t.ttlSeconds)),t?.expiresAt&&(i[RC]=t.expiresAt),t?.closed&&(i[In]=`true`);const o=WC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[In]=`true`;let o;t?.body!==void 0&&(Uh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()===`true`){const g=u.headers.get(_n)??void 0;throw new Nv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(_n)??``}}async append(t,i){const r=ZC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Oh]=i.seq);const u=Uh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[Oh]=o);const u=Uh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,M)=>N+M.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(M=>typeof M.data==`string`?b.encode(M.data):M.data),E=w.reduce((M,R)=>M+R.length,0),T=new Uint8Array(E);let N=0;for(const M of w)T.set(M,N),N+=M.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Oh]=i.seq);const u=PC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new Hv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return QC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Za(this.#t.headers)}async#f(){const t=await Za(this.#t.headers),i=new URL(this.url),r=await sc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function WC(n){if(n!==void 0)return typeof n==`string`?new TextEncoder().encode(n):n instanceof Uint8Array||n instanceof Blob||n instanceof FormData||n instanceof ReadableStream||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?n:new TextEncoder().encode(JSON.stringify(n))}function PC(n){if(n instanceof ReadableStream)return n.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=n[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function tx(n){if(!n.url)throw new UC;if(n.signal&&!(n.signal instanceof AbortSignal))throw new zC;Iv(n.url,n.warnOnHttp)}const ex=`__includes_scalar__`;class Ti{}class jr extends Ti{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class yn extends Ti{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Oe extends Ti{constructor(t){super(),this.path=t,this.type=`ref`}}class ke extends Ti{constructor(t){super(),this.value=t,this.type=`val`}}class Ve extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class qv extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class Ai extends Ti{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Nr(n){return n instanceof qv||n instanceof Ve||n instanceof Oe||n instanceof ke||n instanceof Ai}function Pd(n){return typeof n==`object`&&`expression`in n?n.expression:n}function iS(n){return typeof n==`object`&&`expression`in n?n.expression:n}function rS(n){return typeof n==`object`&&`expression`in n&&n.residual===!0}function nx(n){return{expression:n,residual:!0}}function sx(n,t){if(n.from.alias===t)return n.from;for(const i of n.join||[])if(i.from.alias===t)return i.from}function al(n,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(n.select){const l=n.select[r];if(l&&l.type===`ref`)return al(n,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=sx(n,r);return o?o.type===`queryRef`?al(o.query,new Oe(l),i):{collection:o.collection,path:l}:void 0}}}class vn extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class aS extends vn{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Oi extends vn{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class ix extends Oi{constructor(){super(`Collection requires a config`)}}class rx extends Oi{constructor(){super(`Collection requires a sync config`)}}class ax extends Oi{constructor(){super(`Schema must implement the standard-schema interface`)}}class lS extends Oi{constructor(){super(`Schema validation must be synchronous`)}}class bl extends vn{constructor(t){super(t),this.name=`CollectionStateError`}}class lx extends bl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class ox extends bl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class cx extends bl{constructor(){super(`Collection is in error state`)}}class ux extends bl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends vn{constructor(t){super(t),this.name=`CollectionOperationError`}}class fx extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class hx extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class dx extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class px extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class gx extends Yn{constructor(){super(`The first argument to update is missing`)}}class yx extends Yn{constructor(){super(`No keys were passed to update`)}}class mx extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class Sx extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class vx extends Yn{constructor(){super(`No keys were passed to delete`)}}class wx extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class tp extends vn{constructor(t){super(t),this.name=`MissingHandlerError`}}class bx extends tp{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class Ex extends tp{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class Cx extends tp{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends vn{constructor(t){super(t),this.name=`TransactionError`}}class xx extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class _x extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class Tx extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class Ax extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class Ox extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class zh extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class jh extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class Rx extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class Dx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class Ri extends vn{constructor(t){super(t),this.name=`QueryBuilderError`}}class Mx extends Ri{constructor(t){super(`Only one source is allowed in the ${t}`)}}class kx extends Ri{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class Ux extends Ri{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Xo extends Ri{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class zx extends Ri{constructor(){super(`Join condition must be an equality expression`)}}class jx extends Ri{constructor(){super(`Query must have a from clause`)}}class oS extends Ri{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Ue extends vn{constructor(t){super(t),this.name=`QueryCompilationError`}}class Nx extends Ue{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class Bx extends Ue{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class Lx extends Ue{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class Ix extends Ue{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class Hx extends Ue{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Kv extends Ue{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class qx extends Ue{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class Kx extends Ue{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Vx extends Ue{constructor(t){super(`Unknown expression type: ${t}`)}}class $x extends Ue{constructor(){super(`Reference path cannot be empty`)}}class Gx extends Ue{constructor(t){super(`Unknown function: ${t}`)}}class cS extends Ue{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Di extends vn{constructor(t){super(t),this.name=`JoinError`}}class Yx extends Di{constructor(t){super(`Unsupported join type: ${t}`)}}class Fx extends Di{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Qx extends Di{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Xx extends Di{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class Jx extends Di{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Zx extends Di{constructor(){super(`Invalid join condition`)}}class Wx extends Di{constructor(t){super(`Unsupported join source type: ${t}`)}}class Vc extends vn{constructor(t){super(t),this.name=`GroupByError`}}class Px extends Vc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class t_ extends Vc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class e_ extends Vc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class n_ extends Vc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class uS extends vn{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class s_ extends vn{constructor(t){super(t),this.name=`QueryOptimizerError`}}class i_ extends s_{constructor(){super(`Cannot combine empty expression list`)}}class r_ extends Ue{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class a_ extends Ue{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class l_ extends Ue{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Hn(n,t){return ic(n,t,new Map)}function ic(n,t,i){if(n===t)return!0;if(n==null||t==null||typeof n!=typeof t)return!1;if(n instanceof Date)return t instanceof Date?n.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(n instanceof RegExp)return t instanceof RegExp?n.source===t.source&&n.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(n instanceof Map){if(!(t instanceof Map)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const l=Array.from(n.entries()).every(([o,u])=>t.has(o)&&ic(u,t.get(o),i));return i.delete(n),l}if(t instanceof Map)return!1;if(n instanceof Set){if(!(t instanceof Set)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Array.from(n),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(n),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(n),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)&&!(n instanceof DataView)&&!(t instanceof DataView)){const r=n,l=t;if(r.length!==l.length)return!1;for(let o=0;oic(l,t[o],i));return i.delete(n),r}if(Array.isArray(t))return!1;if(typeof n==`object`){if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Object.keys(n),l=Object.keys(t);if(r.length!==l.length)return i.delete(n),!1;const o=r.every(u=>u in t&&ic(n[u],t[u],i));return i.delete(n),o}return!1}const o_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function Ws(n){if(n==null||typeof n!=`object`)return!1;const t=n[Symbol.toStringTag];return typeof t==`string`&&o_.has(t)}const Vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Nh=new WeakMap;let c_=1;function fS(n){if(Nh.has(n))return Nh.get(n);const t=c_++;return Nh.set(n,t),t}const ep=(n,t,i)=>{const{nulls:r}=i;if(n==null&&t==null)return 0;if(n==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof n==`string`&&typeof t==`string`&&i.stringSort===`locale`)return n.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(n)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof n==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=fS(n),d=fS(t);return u-d}if(l)return 1;if(o)return-1}return nt?1:0},u_=(n,t,i)=>ep(t,n,{...i,nulls:i.nulls===`first`?`last`:`first`});function Wa(n){return(t,i)=>n.direction===`asc`?ep(t,i,n):u_(t,i,n)}const f_=Wa({direction:`asc`,nulls:`first`,stringSort:`locale`});function h_(n,t){if(n.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?m_(n):y_(n);case`func`:return S_(n,t);default:throw new Vx(n.type)}}function y_(n){const[t,...i]=n.path;if(!t)throw new $x;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function m_(n){const t=n.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function S_(n,t){const i=n.args.map(r=>np(r,t));switch(n.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return ye(u)||ye(d)?null:p_(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ye(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ye(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return ye(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return ye(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:hS(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:hS(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Bh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Bh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Bh(d);return p?g_(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new Gx(n.name)}}function hS(n,t,i){if(typeof n!=`string`||typeof t!=`string`)return!1;const r=i?n.toLowerCase():n;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class v_{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function dS(n,t,i,r,l){const o=n;return{...n,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const gd=[`$synced`,`$origin`,`$key`,`$collectionId`];function w_(n){return gd.includes(n)}function Gv(n){return n.some(t=>w_(t))}function El(n,t,i){if(Gv(t))return;const r=i??{...Vv,...n.compareOptions};for(const l of n.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new v_(l)}function b_(n){if(n.length===0)return new Set;if(n.length===1)return new Set(n[0]);let t=new Set(n[0]);for(let i=1;i=2){const o=r.split(`.`),u=El(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:b_(l)}}return{canOptimize:!1,matchingKeys:new Set}}function A_(n,t){if(n.type!==`func`||n.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of n.args){const l=sp(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:E_(r)}}return{canOptimize:!1,matchingKeys:new Set}}function O_(n,t){if(n.type!==`func`||n.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=n.args[0],r=n.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=El(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Yv(n){return n.config.autoIndex===`eager`}function $c(n,t,i,r,l){if(Gv(t)||!Yv(i))return;const o=r??{...Vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function R_(n,t){if(!Yv(t))return;const i=D_(n);for(const{fieldName:r,fieldPath:l}of i)$c(r,l,t)}function D_(n){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(n),t}class M_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Lh=3e4;function Ih(n,t){if(t.length<=Lh)n.push(...t);else for(let i=0;i0)l=o;else return o}return r}class U_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof n==`string`?-1:1}function ll(n){return JSON.stringify(n,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const j_=ve(),N_=ve(),B_=ve(),L_=ve(),I_=ve();function ve(){return Math.random()*(2**31-1)>>>0}const Fv=new ArrayBuffer(8),H_=new DataView(Fv),Fs=new Uint8Array(Fv);class Cl{constructor(){this.hash=j_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(I_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(N_);for(let i=0;i>>8&255)}return;case`number`:H_.setFloat64(0,t,!0),this.writeByte(Fs[0]),this.writeByte(Fs[1]),this.writeByte(Fs[2]),this.writeByte(Fs[3]),this.writeByte(Fs[4]),this.writeByte(Fs[5]),this.writeByte(Fs[6]),this.writeByte(Fs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(L_)):this.update(B_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const q_=ve(),K_=ve(),V_=ve(),$_=ve(),G_=ve(),Y_=ve(),F_=ve(),Q_=ve(),X_=ve(),J_=ve(),Z_=ve(),W_=ve(),P_=ve(),tT=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function eT(n){const t=n[Symbol.toStringTag];return typeof t==`string`&&tT.has(t)}const nT=128,ol=new WeakMap;function Me(n){const t=new Cl;return Qv(t,n),t.digest()}function sT(n){const t=ol.get(n);if(t!==void 0)return t;let i;if(n instanceof Date)i=iT(n);else if(typeof Buffer<`u`&&n instanceof Buffer||n instanceof Uint8Array)if(n.byteLength<=nT)i=rT(n);else return md(n);else{if(n instanceof File)return md(n);if(eT(n))i=aT(n);else{let r=n,l=Q_;n instanceof Array&&(l=X_),n instanceof Map&&(l=J_,r=[...n.entries()]),n instanceof Set&&(l=Z_,r=[...n.entries()]),i=lT(r,l)}}return ol.set(n,i),i}function iT(n){const t=new Cl;return t.update(F_),t.update(n.getTime()),t.digest()}function rT(n){const t=new Cl;t.update(W_),t.update(n.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ne(this.#t.filter(([i,r])=>t(i)))}negate(){return new ne(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Ih(i,this.#t),Ih(i,t.getInner()),new ne(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Hh.getStringId(u)}|${Hh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Hh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ne(l)}#n(){const t=new M_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Me(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new ne(d)}extend(t){const i=t instanceof ne?t.getInner():t;Ih(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class uT{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class On{#t=[];sendData(t){t instanceof ne||(t=new ne(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new uT(t)}}class Xv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Mi extends Xv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class fT extends Xv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class ip extends Mi{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class hT{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new On;return new dT(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class Rn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class dT extends Rn{sendData(t){this.writer.sendData(t)}}class pT extends Mi{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ne;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Jv(){return n=>{const t=new Rn(n.graph,new On),i=new pT(n.graph.getNextOperatorId(),n.connectReader(),t.writer);return n.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class gS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Pa(t),l=this.get(r);if(rc(l)){const[o,u]=l;if(Pa(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Me(o)===Me(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Me(o),l),p.set(Me(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Me(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Xs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Xs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(rc(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(rc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(rc(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Pa(r);if(d!==Fa){const p=new gS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Pa(r),p=Pa(o);if(p===d&&(o===r||Me(o)===Me(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Qa;g.set(Me(o),i),g.set(Me(r),[r,l]),this.#t.set(t,g)}else{const g=new gS;if(p===d){const m=new Qa;m.set(Me(o),i),m.set(Me(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ne(i)}}function Pa(n){return Array.isArray(n)&&(typeof n[0]==`string`||typeof n[0]==`number`||typeof n[0]==`bigint`)?n[0]:Fa}function rc(n){return Array.isArray(n)}class gT extends Mi{#t=new Xs;#e=new Xs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ne(i))}}function Zv(n){return t=>{const i=new Rn(t.graph,new On),r=new gT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class yT extends Mi{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Me(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Me(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Me(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ne(i))}}function mT(n=t=>t){return t=>{const i=new Rn(t.graph,new On),r=new yT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class ST extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(n){return t=>{const i=new Rn(t.graph,new On),r=new ST(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}const vT=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function xr(n,t,i){const r=i[0];if(t!=null&&n>=t)throw new Error(n+` >= `+t);if(n.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(n[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(n.slice(u),t.slice(u),i)}const l=n?i.indexOf(n[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(n.slice(1),null,i)}function Wv(n){if(n.length!==Pv(n[0]))throw new Error(`invalid integer part of order key: `+n)}function Pv(n){if(n>=`a`&&n<=`z`)return n.charCodeAt(0)-97+2;if(n>=`A`&&n<=`Z`)return 90-n.charCodeAt(0)+2;throw new Error(`invalid order key head: `+n)}function Xa(n){const t=Pv(n[0]);if(t>n.length)throw new Error(`invalid order key: `+n);return n.slice(0,t)}function yS(n,t){if(n===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+n);const i=Xa(n);if(n.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+n)}function mS(n,t){Wv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function wT(n,t){Wv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function bT(n,t,i=vT){if(n!=null&&yS(n,i),t!=null&&yS(t,i),n!=null&&t!=null&&n>=t)throw new Error(n+` >= `+t);if(n==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+xr(``,g,i);if(p{const o=n(i,l);return o!==0?o:yd(t,r)}}class rp{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=z_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:wS(this.#t[r-1]),o=r===this.#t.length?null:wS(this.#t[r]),u=bT(l,o),d=SS(t,u);if(this.#t.splice(r,0,d),rthis.#e(vS(i),vS(r)))}}class ew{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof rp))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function Sc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],1])}}function vc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],-1])}}class ET extends Mi{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=tw(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new rp(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new ew(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>Sc(d,r)),u.moveOuts.forEach(d=>vc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ne(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ne(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);Sc(d.moveIn,l),vc(d.moveOut,l),this.#l(o,u)}}function CT(n,t){return i=>{const r=new Rn(i.graph,new On),l=new ET(i.graph.getNextOperatorId(),i.connectReader(),r.writer,n,t);return i.graph.addOperator(l),r}}class xT extends fT{#t=new Xs;#e=new Xs;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Xs.fromMultiSets(this.inputAMessages()),i=Xs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ne;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function nw(n,t=`inner`){return i=>{if(i.graph!==n.graph)throw new Error(`Cannot join streams from different graphs`);const r=new Rn(i.graph,new On),l=new xT(i.graph.getNextOperatorId(),i.connectReader(),n.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class _T extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function oe(n){return t=>{const i=new Rn(t.graph,new On),r=new _T(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class TT extends Mi{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function Sd(n){return t=>{const i=new Rn(t.graph,new On),r=new TT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class AT extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function OT(n){return t=>{const i=new Rn(t.graph,new On),r=new AT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class RT extends Mi{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,tw(l));this.#t=new ew(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new rp(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>Sc(o,r)),l.moveOuts.forEach(o=>vc(o,r)),l.changes&&this.output.sendData(new ne(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ne(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);Sc(o.moveIn,l),vc(o.moveOut,l)}}function DT(n,t){const i=t||{};return r=>{const l=new Rn(r.graph,new On),o=new RT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,n,i);return r.graph.addOperator(o),l}}function bS(n){return`pipe`in n}function ES(n,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!bS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>bS(l))),r=>{const l=`__original_key__`;return r.pipe(oe(d=>{const p=n(d),g=ll(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Zv(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(oe(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function MT(n=t=>t){return{preMap:t=>n(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function kT(n=t=>t){return{preMap:t=>n(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function UT(n=t=>t){return{preMap:t=>({sum:n(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function zT(n){const t=n??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const NT={sum:MT,count:kT,avg:UT,min:zT,max:jT};function BT(n,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(CT((g,m)=>d(n(g),n(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Jv())}function LT(n,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(n((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Jv())}function IT(n,t){return LT(DT,n,t)}const qh=`__virtual_synced__`,Kh=`__virtual_has_local__`;function CS(n){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(n)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:HT,count:qT,avg:KT,min:VT,max:$T}=NT;function GT(n,t){const i=new Map,r=[...n];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Br(o))continue;const u=r.findIndex(d=>wc(o,d));if(u===-1)throw new Px(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function xS(n,t,i,r,l,o,u){const d={[qh]:{preMap:([,w])=>CS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Kh]:{preMap:([,w])=>CS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[M,R]of Object.entries(r))if(R.type===`agg`)w[M]=Zo(R);else if(Br(R)){const{transformed:A,extracted:V}=vd(R,T);for(const[I,H]of Object.entries(V))w[I]=Zo(H);E[M]=fe(A)}}const N=u?([,M])=>({__singleGroup:!0,__correlationKey:M?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(n=n.pipe(ES(N,w)),n=n.pipe(oe(([,M])=>{const A={...M.$selected||{}};if(r){for(const[X,at]of Object.entries(r))at.type===`agg`&&(A[X]=M[X]);_S(A,M,E)}const V=u?M.__correlationKey:void 0,I=V!==void 0?`single_group_${ll(V)}`:`single_group`,H={...M,$selected:A},W=M[qh],tt=M[Kh];return H.$synced=W??!0,H.$origin=tt?`local`:`remote`,H.$key=I,H.$collectionId=o??H.$collectionId,u&&V!==void 0&&(H[u]={__correlationKey:V}),[I,H]})),i&&i.length>0)for(const M of i){const R=iS(M),A=bc(R,r||{},`$selected`),V=fe(A);n=n.pipe(ys(([,I])=>{const H={$selected:I.$selected};return Tr(V(H))}))}if(l&&l.length>0)for(const M of l)n=n.pipe(ys(([,R])=>{const A={$selected:R.$selected};return Tr(M(A))}));return n}const p=GT(t,r),g=t.map(w=>fe(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[H,W]of Object.entries(r))if(W.type===`agg`)T[H]=w[H];else if(!v[H]){const tt=p.selectToGroupByIndex.get(H);tt!==void 0?T[H]=w[`__key_${tt}`]:T[H]=E[H]}_S(T,w,v)}else for(let H=0;H0)for(const w of i){const E=iS(w),T=bc(E,r||{}),N=fe(T);n=n.pipe(ys(([,M])=>{const R={$selected:M.$selected};return N(R)}))}if(l&&l.length>0)for(const w of l)n=n.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Tr(w(T))}));return n}function wc(n,t){if(!n||!t||n.type!==t.type)return!1;switch(n.type){case`ref`:return!n.path||!t.path||n.path.length!==t.path.length?!1:n.path.every((i,r)=>i===t.path[r]);case`val`:return n.value===t.value;case`func`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>wc(i,t.args[r]));case`agg`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>wc(i,t.args[r]));default:return!1}}function Zo(n){const t=fe(n.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(n.name.toLowerCase()){case`sum`:return HT(i);case`count`:return qT(l);case`avg`:return KT(i);case`min`:return VT(r);case`max`:return $T(r);default:throw new t_(n.name)}}function bc(n,t,i=`$selected`){switch(n.type){case`agg`:{const r=n;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&YT(r,o))return new Oe([i,l]);throw new e_(r.name)}case`func`:{const r=n,l=r.args.map(o=>bc(o,t));return new Ve(r.name,l)}case`ref`:return n;case`val`:return n;default:throw new n_(n.type)}}function _S(n,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(n[r]=t[r]);for(const[r,l]of Object.entries(i))n[r]=l({$selected:n});for(const r of Object.keys(n))r.startsWith(`__agg_`)&&delete n[r]}function Br(n){return Nr(n)?n.type===`agg`?!0:n.type===`func`&&`args`in n?n.args.some(t=>Br(t)):!1:!1}function vd(n,t){if(n.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Oe([`$selected`,i]),extracted:{[i]:n}}}if(n.type===`func`){const i={},r=n.args.map(l=>{const o=vd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Ve(n.name,r),extracted:i}}return{transformed:n,extracted:{}}}function YT(n,t){return n.name===t.name&&n.args.length===t.args.length&&n.args.every((i,r)=>wc(i,t.args[r]))}function FT(n,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=bc(E.expression,r,`$selected`);return{compiledExpression:fe(T),compareOptions:wd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,M=T;for(let R=0;R1?String(A.path[0]):n.from.alias}}if(N){const I=i.every(X=>X.expression.type===`ref`)?i.map(X=>{const at=X.expression,nt=al(n,at,l);return fe(nt?new Oe(nt.path):X.expression,!0)}):void 0;w={alias:M,offset:p??0,limit:d,comparator:(X,at)=>{if(i.length===1){const nt=X&&N(X),wt=at&&N(at);return v(nt,wt)}if(I){const nt=wt=>wt&&I.map(Lt=>Lt(wt));return v(nt(X),nt(at))}return 0},valueExtractorForRawRow:X=>{if(i.length===1)return N(X);if(I)return I.map(at=>at(X))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=X=>{o[tt].dataNeeded=()=>{const at=X();return Math.max(0,w.limit-at)}}}}return g?t.pipe(BT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(IT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function wd(n,t){return n.compareOptions.stringSort!==void 0?n.compareOptions:{...t.compareOptions,direction:n.compareOptions.direction,nulls:n.compareOptions.nulls}}function QT(n,t={}){const i=r=>{const l=[];for(const[o,u]of n.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?tl(t.where):void 0,l=JT(n,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=C_(r,n);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=tl(r);return i(o)}}catch(r){console.warn(`${n.id?`[${n.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=tl(t.where);return t.optimizedOnly?void 0:i(l)}}function tl(n){const t=$v(n);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function XT(n,t){const i=tl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&n(l)}}function JT(n,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=wd(p,n);$c(y[0],y,n,v);const b=El(n,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=n.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of n.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Wa(m.compareOptions),v=TS(p.value,m.expression),b=TS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function TS(n,t){if(t.type===`ref`){const i=t;let r=n;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:$v(t)(n)}class AS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=yd(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ac=`__tanstack_db_direct`;class ZT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(M=>M.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const M of r){for(const R of M.operations)b.add(R.key);for(const[R]of M.rowMetadataWrites)b.add(R)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const M of b){const R=this.get(M);R!==void 0&&w.set(M,R)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const M of this.transactions.values())if(M.state===`completed`)for(const R of M.mutations)this.isThisCollection(R.collection)&&R.optimistic&&N.set(R.key,{type:R.type,value:R.modified});for(const M of r){if(M.truncate){const R=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const A of R){if(m?.deletes.has(A))continue;const V=m?.upserts.get(A)||this.syncedData.get(A);V!==void 0&&E.push({type:`delete`,key:A,value:V})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const A of b)w.delete(A);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const R of M.operations){const A=R.key;this.syncedKeys.add(A);const V=this.isLocalOnly||this.pendingLocalChanges.has(A)||this.pendingLocalOrigins.has(A)||y?.has(A)===!0||v?.has(A)===!0?`local`:`remote`;switch(R.type){case`insert`:this.syncedData.set(A,R.value),this.rowOrigins.set(A,V),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(A),R.value);this.syncedData.set(A,I)}else this.syncedData.set(A,R.value);this.rowOrigins.set(A,V),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break}case`delete`:this.syncedData.delete(A),this.syncedMetadata.delete(A),this.rowOrigins.delete(A),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break}}for(const[R,A]of M.rowMetadataWrites){if(A.type===`delete`){this.syncedMetadata.delete(R);continue}this.syncedMetadata.set(R,A.value)}for(const[R,A]of M.collectionMetadataWrites){if(A.type===`delete`){this.syncedCollectionMetadata.delete(R);continue}this.syncedCollectionMetadata.set(R,A.value)}}if(o){const M=new Set;for(const V of r)for(const I of V.operations)(I.type===`insert`||I.type===`update`)&&M.add(I.key);const R=new Map(m.upserts),A=new Set(m.deletes);for(const[V,I]of R)if(!A.has(V))if(M.has(V)){let H=!1;for(let W=E.length-1;W>=0;W--){const tt=E[W];if(tt.key===V&&tt.type===`insert`){tt.value=I,H=!0;break}}H||E.push({type:`insert`,key:V,value:I})}else E.push({type:`insert`,key:V,value:I});if(E.length>0&&A.size>0){const V=[];for(const I of E)I.type===`insert`&&A.has(I.key)||V.push(I);E.length=0,E.push(...V)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[M,R]of m.upserts)this.optimisticUpserts.set(M,R);for(const M of m.deletes)this.optimisticDeletes.add(M)}for(const M of this.transactions.values())if(![`completed`,`failed`].includes(M.state)){for(const R of M.mutations)if(this.isThisCollection(R.collection)&&R.optimistic)switch(R.type){case`insert`:case`update`:this.optimisticUpserts.set(R.key,R.modified),this.optimisticDeletes.delete(R.key);break;case`delete`:this.optimisticUpserts.delete(R.key),this.optimisticDeletes.add(R.key);break}}for(const M of b){const R=w.get(M),A=this.get(M),V=this.getVirtualPropsSnapshotForState(M,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(M),H=V.$synced!==I.$synced||V.$origin!==I.$origin,W=R!==void 0?dS(R,M,this.collection.id,()=>V.$synced,()=>V.$origin):void 0,tt=N.get(M);let X=!1;tt&&(tt.type===`delete`&&R!==void 0&&A===void 0&&Hn(tt.value,R)||A!==void 0&&Hn(tt.value,A))&&(X=!0);const at=H&&R!==void 0&&A!==void 0&&Hn(R,A);if(!(X&&!at))if(R===void 0&&A!==void 0){const nt=N.get(M);if(nt){const wt=nt.value,Lt=dS(wt,M,this.collection.id,()=>V.$synced,()=>V.$origin);E.push({type:`update`,key:M,value:A,previousValue:Lt})}else E.push({type:`insert`,key:M,value:A})}else R!==void 0&&A===void 0?E.push({type:`delete`,key:M,value:W??R}):R!==void 0&&A!==void 0&&(!Hn(R,A)||at)&&E.push({type:`update`,key:M,value:A,previousValue:W??R})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new AS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new AS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ac]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function sw(){const n=new Map;function t(i){const r=i.join(`.`);if(n.has(r))return n.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return n.set(r,l),l}return t([])}function wi(n){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(n.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&n.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...n,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&n.includes(u))return{enumerable:!0,configurable:!0}}})}function OS(n){const t=wi(n),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function se(n){return lc(n)?new Oe(n.__path):n&&typeof n==`object`&&`type`in n&&(n.type===`func`||n.type===`ref`||n.type===`val`||n.type===`agg`)?n:new ke(n)}function lc(n){return n&&typeof n==`object`&&n.__refProxy===!0}function bd(n,t){return new Ve(`eq`,[se(n),se(t)])}function RS(n,t){return new Ve(`gt`,[se(n),se(t)])}function WT(n,t){return new Ve(`gte`,[se(n),se(t)])}function Ed(n,t){return new Ve(`lt`,[se(n),se(t)])}function Cd(n,t,...i){const r=[n,t,...i];return new Ve(`and`,r.map(l=>se(l)))}function PT(n,t,...i){const r=[n,t,...i];return new Ve(`or`,r.map(l=>se(l)))}function tA(n,t){return new Ve(`in`,[se(n),se(t)])}class eA{constructor(t){this.query=t}}class nA{constructor(t){this.query=t}}class iw{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function sA(n,t){if(t.length===0||n.length===0)return;if(n.length===1){const{expression:r,compareOptions:l}=n[0];return(l.direction===`asc`?RS:Ed)(r,new ke(t[0]))}const i=[];for(let r=0;rCd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>PT(r,l))}class iA extends iw{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&R_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?XT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=Cd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?tl(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const X=this.collection.get(tt);return X===void 0?!1:v?.(X)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],X=this.collection.currentStateAsChanges({where:bd(tt,new ke(g))});if(X){const at=X.map(wt=>wt.key).filter(wt=>!this.sentKeys.has(wt)&&b(wt));T.push(...at);const nt=m.take(i-T.length,g,b);T.push(...nt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),M=()=>T.length===0,R=t[0].expression,A=R.type===`ref`?fe(new Oe(R.path),!0):null;for(;N()>0&&!M();){const tt=new Set;for(const X of T){const at=this.collection.get(X);E.push({type:`insert`,key:X,value:at}),w=A?A(at):at,tt.add(X)}T=m.take(N(),w,b)}const V=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=sA(t,r);if(tt){const{expression:X}=t[0],at=r[0];let nt;if(at instanceof Date){const wt=new Date(at.getTime()+1);nt=Cd(WT(X,new ke(at)),Ed(X,new ke(wt)))}else nt=bd(X,new ke(at));I={whereFrom:tt,whereCurrent:nt,lastKey:this.lastSentKey}}}const H={where:y,limit:i,orderBy:t,cursor:I,offset:l??V,subscription:this},W=this.collection._sync.loadSubset(H);u?.(W),this.loadedSubsets.push(H),o&&this.trackLoadSubsetPromise(W)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class rA{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=sw(),p=r(d);o=se(p)}const u=new iA(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new ux;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const aA=n=>setTimeout(()=>{n({didTimeout:!0,timeRemaining:()=>50})},0),lA=n=>{clearTimeout(n)},oA=typeof window<`u`&&`requestIdleCallback`in window?(n,t)=>window.requestIdleCallback(n,t):(n,t)=>aA(n),Vh=typeof window<`u`&&`cancelIdleCallback`in window?n=>window.cancelIdleCallback(n):lA,rw=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};rw.instance=null;let $h=rw;class cA{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new ox(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new bl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new lx(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||$h.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){$h.getInstance().cancel(this),this.idleCallbackId!==null&&(Vh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Vh(this.idleCallbackId),this.idleCallbackId=oA(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),$h.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Vh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const ap=Symbol(`liveQueryInternal`);class uA{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=fA(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new zh;if(r.committed)throw new jh;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o=`update`;else{const b=this.config.utils[ap];throw new px(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Rx;if(i.committed)throw new Dx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new zh;if(i.committed)throw new jh;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Oi(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new zh;if(t.committed)throw new jh;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new cx);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new uS(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new uS(this.id,t)})}this.preloadPromise=null}}function fA(n){if(typeof n==`function`)return{cleanup:n};if(typeof n==`object`)return n}const DS=1;function oc(n,t){return n===t?0:nQs(r)??null);if(n instanceof Date)return{__type:`date`,value:n.toISOString()};if(n instanceof Set)return{__type:`set`,values:Array.from(n).map(l=>Qs(l)??null).sort((l,o)=>oc(bi(l),bi(o)))};if(n instanceof Map)return{__type:`map`,entries:Array.from(n.entries()).map(([l,o])=>({key:Qs(l)??null,value:Qs(o)??null})).sort((l,o)=>oc(bi(l.key),bi(o.key)))};if(n instanceof RegExp)return{__type:`regexp`,value:n.toString()};const t={},i=Object.entries(n).sort(([r],[l])=>oc(r,l));for(const[r,l]of i){const o=Qs(l);o!==void 0&&(t[r]=o)}return t}function bi(n){return n===null?`null`:Array.isArray(n)?`[${n.map(bi).join(`,`)}]`:typeof n!=`object`?JSON.stringify(n):`{${Object.keys(n).sort((r,l)=>oc(r,l)).map(r=>`${JSON.stringify(r)}:${bi(n[r])}`).join(`,`)}}`}function dA(n,t,i,r,l){const o=hA(r),u=Qs(t)??null,d=Qs(l),g=Qs({signatureVersion:DS,expression:u,options:d??null})??null,m=bi(g);return{signatureVersion:DS,signature:m,indexId:n,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function xd(n){if(n===null||typeof n!=`object`)return n;if(Array.isArray(n))return n.map(i=>xd(i));const t={};for(const[i,r]of Object.entries(n))t[i]=xd(r);return t}function pA(n){return JSON.parse(JSON.stringify(n))}class gA{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=sw(),o=t(l),u=se(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Oi(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=dA(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:pA(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:xd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var yA={};const mA=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),SA=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),vA=new Set([`set`,`delete`,`clear`,`add`]),wA=new Set([`entries`,`keys`,`values`,`forEach`]);function lp(n){return n!==null&&typeof n==`object`&&!(n instanceof Date)&&!(n instanceof RegExp)&&!Ws(n)}function bA(n,t,i,r){if(mA.has(n))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(lp(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(n===`reduce`||n===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((n===`find`||n===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return n===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function EA(n,t){return function(){const i=n.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(lp(l)){const u={tracker:n,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function MS(n,t,i){return function(...r){const l=n.apply(t.copy_,r);return i(t),l}}function CA(n,t,i,r,l,o,u){if(wA.has(n)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(n===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(n===`entries`||n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(n===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(n===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:M=>{l.copy_ instanceof Map&&l.copy_.set(E,M)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator)if(n===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:M=>{l.copy_ instanceof Map&&l.copy_.set(E,M)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:M=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(M),b.set(E,M))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...n){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...n):!t&&typeof process<`u`&&yA.DEBUG===`true`&&console.log(`[proxy]`,...n)}function gs(n,t=new WeakMap){if(n==null||typeof n!=`object`)return n;if(t.has(n))return t.get(n);if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n.source,n.flags);if(Array.isArray(n)){const l=[];return t.set(n,l),n.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(n)&&!(n instanceof DataView)){const l=Object.getPrototypeOf(n).constructor,o=new l(n.length);t.set(n,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(n instanceof Set){const l=new Set;return t.set(n,l),n.forEach(o=>{l.add(gs(o,t))}),l}if(Ws(n))return n;const i={};t.set(n,i);for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=gs(n[l],t));const r=Object.getOwnPropertySymbols(n);for(const l of r)i[l]=gs(n[l],t);return i}let kS=0;function xA(){return kS+=1,kS}function op(n,t){const i=new Map;function r(y,v){if(At(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=op(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(n),originalObject:gs(n),proxyCount:xA(),modified:!1,assigned_:{},parent:t,target:n};At(`createChangeProxy called for target`,n,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,`original:`,E),!Hn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Hn(w,E))return At(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Symbol property was deleted, returning false`),!1;return At(`All properties match original values, returning true`),!0}function p(y,v){At(`checkParentStatus called for child prop:`,v);const b=d(y);At(`Parent checkIfReverted returned:`,b),b&&(At(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(At(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At(`createObjectProxy`,y),l.has(y))return At(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){At(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const M=w.toString();if(SA.has(M))return MS(E,o,u);const R=bA(M,E,o,r);if(R)return R;if(w===Symbol.iterator)return EA(o,r)}if(b instanceof Map||b instanceof Set){const M=w.toString();if(vA.has(M))return MS(E,o,u);const R=CA(M,w,E,b,o,r,u);if(R)return R}return E.bind(b)}if(lp(E)){const M={tracker:o,prop:String(w)},{proxy:R}=r(T,M);return l.set(E,R),R}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,`new:`,E),Hn(T,E))At(`Value unchanged, not tracking`);else{const N=o.originalObject[w],M=Hn(E,N);if(At(`value:`,E,`original:`,N,`isRevertToOriginal:`,M),M){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),At(`Checking if all properties reverted`);const R=d(o);At(`All reverted:`,R),R?(At(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(At(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(At(`Some properties still changed, keeping modified flag`),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At(`getChanges called, modified:`,o.modified),At(o),!o.modified)return At(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At(`Returning copy:`,y),y}}}function _A(n){const t=n.map(i=>op(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function TA(n,t){const{proxy:i,getChanges:r}=op(n);return t(i),r()}function AA(n,t){const{proxies:i,getChanges:r}=_A(n);return t(i),r()}function OA(){let n,t,i=!0;return{promise:new Promise((l,o)=>{n=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:n,reject:t,isPending:()=>i}}function RA(n){return typeof n==`object`&&n!==null&&typeof n.hasPendingGraphRun==`function`}class DA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const Ec=new DA,Cc=[];let cl=[],MA=0;function kA(n,t){switch(`${n.type}-${t.type}`){case`insert-update`:return{...n,type:`insert`,original:{},modified:t.modified,changes:{...n.changes,...t.changes},key:n.key,globalKey:n.globalKey,metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:n.original,changes:{...n.changes,...t.changes},metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${n.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(n){const t=new NA(n);return Cc.push(t),t}function cc(){if(cl.length>0)return cl.slice(-1)[0]}function UA(n){Ec.clear(n.id),cl.push(n)}function zA(n){try{Ec.flush(n.id)}finally{cl=cl.filter(t=>t.id!==n.id)}}function jA(n){const t=Cc.findIndex(i=>i.id===n.id);t!==-1&&Cc.splice(t,1)}let NA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new xx;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=OA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=MA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&jA(this)}mutate(t){if(this.state!==`pending`)throw new Tx;UA(this);try{t()}finally{zA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=kA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new Ax;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of Cc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new Ox;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class BA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=cc();if(!u&&!this.config.onInsert)throw new bx;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new dx(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[ac]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=cc();if(!u&&!this.config.onDelete)throw new Cx;if(Array.isArray(r)&&r.length===0)throw new vx;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new wx(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[ac]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new ax}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new lS;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new aS(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new lS;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new aS(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new fx(i):new hx(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new gx;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=cc();if(!o&&!this.config.onUpdate)throw new Ex;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new yx;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new mx(w);return E});let y;u?y=AA(m,p):y=[TA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],M=this.validateData(T,`update`,w),R=Object.assign({},N,M),A=this.config.getKey(N),V=this.config.getKey(R);if(A!==V)throw new Sx(A,V);const I=this.generateGlobalKey(V,R);return{mutationId:crypto.randomUUID(),original:N,modified:R,changes:Object.fromEntries(Object.keys(T).map(H=>[H,R[H]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Ja({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Ja({metadata:{[ac]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class LA extends iw{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function cp(n){const t=new up(n);return n.utils?t.utils=n.utils:t.utils={},t}class up{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new ix;if(!t.sync)throw new rx;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Oi(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new rA,this._events=new LA,this._indexes=new gA,this._lifecycle=new cA(t,this.id),this._mutations=new BA(t,this.id),this._state=new ZT(t),this._sync=new uA(t,this.id),this.comparisonOpts=IA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return QT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function IA(n){if(n.defaultStringCollation){const t=n.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function HA(n){return!!n&&(typeof n==`object`||typeof n==`function`)&&typeof n.then==`function`}function qA(n){const{mutationFn:t,onMutate:i,...r}=n;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(HA(u))throw new _x}),o}}function KA(n){const t=VA(n);let i=n,r,l=0;const o=10;for(;low(u)),l=cw(r),o=aw(n);for(const[u,d]of l.singleSource)$A(n,u)&&!o.has(u)&&t.set(u,d);return t}function $A(n,t){if(n.from.alias===t)return n.from.type===`collectionRef`;if(n.join){for(const i of n.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function aw(n){const t=new Set;if(n.join){const i=n.from.alias;for(const r of n.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function _d(n){const t={...n,from:n.from.type===`queryRef`?new yn(_d(n.from.query),n.from.alias):n.from,join:n.join?.map(i=>({...i,from:i.from.type===`queryRef`?new yn(_d(i.from.query),i.from.alias):i.from}))};return GA(t)}function GA(n){if(!n.where||n.where.length===0)return n;if(!n.join||n.join.length===0){if(n.where.length>1){const d=Ad(n.where),p=xc(d);return{...n,where:[p]}}return n}const t=n.where.filter(d=>!rS(d)),r=Ad(t).map(d=>ow(d)),l=cw(r),o=FA(n,l),u=n.where.filter(d=>rS(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function lw(n){return{...n,from:Td(n.from),join:n.join?.map(t=>({...t,from:Td(t.from)}))}}function Td(n){if(n.type===`collectionRef`)return n;const t=lw(n.query);if(YA(t)){const i=Td(t.from);return i.type===`collectionRef`?new jr(i.collection,n.alias):new yn(i.query,n.alias)}return new yn(t,n.alias)}function YA(n){return(!n.where||n.where.length===0)&&!n.select&&(!n.groupBy||n.groupBy.length===0)&&(!n.having||n.having.length===0)&&(!n.orderBy||n.orderBy.length===0)&&(!n.join||n.join.length===0)&&n.limit===void 0&&n.offset===void 0&&!n.fnSelect&&(!n.fnWhere||n.fnWhere.length===0)&&(!n.fnHaving||n.fnHaving.length===0)}function Ad(n){const t=[];for(const i of n){const r=Pd(i);t.push(...fp(r))}return t}function fp(n){if(n.type===`func`&&n.name===`and`){const t=[];for(const i of n.args)t.push(...fp(i));return t}else return[n]}function ow(n){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(n),{expression:n,touchedSources:t,hasNamespaceOnlyRef:i}}function cw(n){const t=new Map,i=[];for(const o of n)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,xc(u));const l=i.length>0?xc(i):void 0;return{singleSource:r,multiSource:l}}function FA(n,t){const i=new Set,r=aw(n),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=US(n.from,l,i),u=n.join?n.join.map(y=>({...y,from:US(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(nx(v)):d.push(v);const g=d.length>1?[xc(d.flatMap(y=>fp(Pd(y))))]:d;return{select:n.select,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,distinct:n.distinct,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(n){return{from:n.from.type===`collectionRef`?new jr(n.from.collection,n.from.alias):new yn(_r(n.from.query),n.from.alias),select:n.select,join:n.join?n.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new jr(t.from.collection,t.from.alias):new yn(_r(t.from.query),t.from.alias)})):void 0,where:n.where?[...n.where]:void 0,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0}}function US(n,t,i){const r=t.get(n.alias);if(!r)return n.type===`collectionRef`?new jr(n.collection,n.alias):new yn(_r(n.query),n.alias);if(n.type===`collectionRef`){const u={from:new jr(n.collection,n.alias),where:[r]};return i.add(n.alias),new yn(u,n.alias)}if(!PA(n.query,r,n.alias))return new yn(_r(n.query),n.alias);if(eO(n.query,r,n.alias))return new yn(_r(n.query),n.alias);const l=n.query.where||[],o={..._r(n.query),where:[...l,r]};return i.add(n.alias),new yn(o,n.alias)}function QA(n,t,i){return n.select?uw(n.select)||tO(n.select,t,i):!1}function XA(n){return n.groupBy&&n.groupBy.length>0}function JA(n){return n.having&&n.having.length>0}function ZA(n){return n.orderBy&&n.orderBy.length>0&&(n.limit!==void 0||n.offset!==void 0)}function WA(n){return n.fnSelect||n.fnWhere&&n.fnWhere.length>0||n.fnHaving&&n.fnHaving.length>0}function PA(n,t,i){return!(QA(n,t,i)||XA(n)||JA(n)||ZA(n)||WA(n))}function uw(n){for(const t of Object.values(n))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&uw(i))return!0}return!1}function hp(n){const t=[];if(n==null||typeof n!=`object`)return t;switch(n.type){case`ref`:t.push(n);break;case`func`:case`agg`:for(const i of n.args??[])t.push(...hp(i));break}return t}function tO(n,t,i){const r=new Set;for(const[o,u]of Object.entries(n))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Oe||r.add(o);const l=hp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function eO(n,t,i){const r=hp(t);if(r.every(o=>o.path[0]!==i))return!1;if(n.fnSelect)return!0;const l=n.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Oe)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==n.from.alias||g!==u[1])return!0}return!1}function xc(n){if(n.length===0)throw new i_;return n.length===1?n[0]:new Ve(`and`,n)}function nO(n,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M){let R=n;for(const A of t)R=sO(R,A,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M);return R}function sO(n,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M){const R=t.from.type===`collectionRef`,{alias:A,input:V,collectionId:I}=rO(t.from,o,p,g,m,y,v,b,u,d,E,T,N,M);i[A]=V,R&&(T[A]=I);const H=p[r],W=p[I];if(!H)throw new cS(r);if(!W)throw new cS(I);const{activeSource:tt,lazySource:X}=lO(t.type,H,W),at=Object.keys(i),{mainExpr:nt,joinedExpr:wt}=iO(t.left,t.right,at,A),Lt=fe(nt),dt=fe(wt);let k=n.pipe(oe(([Z,st])=>[Cr(Lt(st)),[Z,st]])),q=V.pipe(oe(([Z,st])=>{const ut={[A]:st};return[Cr(dt(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new Yx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,st=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=nt.type===`func`||wt.type===`func`;if(!st&&!ut){const _=tt===`main`?A:l;y.add(_);const L=tt===`main`?k:q,Q=al(w,tt===`main`?wt:nt,X),ot=Q.collection,it=Q.path[0];it&&$c(it,Q.path,ot);const vt=L.pipe(OT(xt=>{const bt=N[_]||_,$e=g[bt];if(!$e)throw new r_(bt,_,X.id,Object.keys(g));if($e.hasLoadedInitialState())return;const Ge=xt.getInner().map(([[wn]])=>wn),Fn=new Oe(Q.path);$e.requestSnapshot({where:tA(Fn,Ge),optimizedOnly:!0})||$e.requestSnapshot()}));tt===`main`?k=vt:q=vt}}return k.pipe(nw(q,t.type),aO(t.type))}function iO(n,t,i,r){const l=i.filter(d=>d!==r),o=Od(n),u=Od(t);if(o&&l.includes(o)&&u===r)return{mainExpr:n,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:n};throw!o||!u?new Qx:o===u?new Fx(o):l.includes(o)?u!==r?new Jx(r):new Zx:new Xx(o)}function Od(n){switch(n.type){case`ref`:return n.path[0]||null;case`func`:{const t=new Set;for(const i of n.args){const r=Od(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function rO(n,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(n.type){case`collectionRef`:{const w=t[n.alias];if(!w)throw new Kv(n.alias,n.collection.id,Object.keys(t));return y[n.alias]=n.collection.id,{alias:n.alias,input:w,collectionId:n.collection.id}}case`queryRef`:{const w=g.get(n.query)||n.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(n.query),N=n.query.from.alias;if(!(!T&&n.alias===N))for(const[I,H]of E.sourceWhereClauses)b.set(I,H);const R=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);R&&R!==n.alias&&(v[n.alias]=R);const V=E.pipeline.pipe(oe(I=>{const[H,[W,tt]]=I;return[H,W]}));return{alias:n.alias,input:V,collectionId:E.collectionId}}default:throw new Wx(n.type)}}function aO(n){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return n===`inner`?!!(u&&d):n===`left`?!!u:n===`right`?!!d:!0}),oe(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function lO(n,t,i){switch(n){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeuO(l,r)))}function hO(n){return n.type===`agg`}function dO(n){return n&&typeof n==`object`&&!Nr(n)}function fw(n,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...n],y=g?l:new Oe(p.split(`.`)),v=fe(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...n];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});continue}if(dO(o)){fw([...n,r],o,i);continue}if(hO(o)||Br(o))i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Nr(o)){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>o});continue}if(o instanceof ke){const u=o.value;i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:fe(o)})}}}const Ar=Symbol(`includesRouting`);function _c(n,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(n);if(v)return v;Dd(n);const{optimizedQuery:b,sourceWhereClauses:w}=KA(n);let E=b;g.set(E,n),kd(E,n,g);const T={...t},N={},M={},R={},{alias:A,input:V,collectionId:I}=gO(E.from,T,i,r,l,o,u,d,p,g,N,M,w);R[A]=V;let H=V;if(m&&y){const dt=y.path.slice(1);H=V.pipe(oe(([Z,st])=>[vO(st,dt),[Z,st]])).pipe(nw(m,`inner`)).pipe(ys(([Z,[st]])=>st!=null),oe(([Z,[st,ut]])=>{const[_,L]=st,Y={...L,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),R[A]=H}let W=H.pipe(oe(([dt,k])=>{const{__parentContext:q,...Z}=k,st={[A]:Z};return q&&(Object.assign(st,q),st.__parentContext=q),[dt,st]}));if(E.join&&E.join.length>0&&(W=nO(W,E.join,R,I,A,T,p,g,i,r,l,o,u,d,n,_c,N,M,w)),E.where&&E.where.length>0)for(const dt of E.where){const k=Pd(dt),q=fe(k);W=W.pipe(ys(([Z,st])=>Tr(q(st))))}if(E.fnWhere&&E.fnWhere.length>0)for(const dt of E.fnWhere)W=W.pipe(ys(([k,q])=>Tr(dt(q))));const tt=[],X=[];if(E.select){const dt=mO(E.select);dt.length>0&&(E={...E,select:{...E.select}});for(const{key:k,subquery:q}of dt){const Z=fe(q.correlationField);let st;if(q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:fe(Y)}));st=W.pipe(oe(([Y,Q])=>{const ot={};for(const it of L){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(Q);let xt=ot[it.alias];for(let bt=0;bt[Z(Y),null]));st=st.pipe(Zv(L=>L.map(([Y,Q])=>[Y,Q>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=_c(ut,T,i,r,l,o,u,d,p,g,st,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(M,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:fe(Q)})),Y=Z;X.push({fieldName:q.fieldName,getRouting:Q=>{const ot={};for(const it of L){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(Q);let xt=ot[it.alias];for(let bt=0;bt({correlationKey:Z(L),parentContext:null})});SO(E.select,k)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new Nx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new Bx;E.fnSelect?W=W.pipe(oe(([dt,k])=>{const q=E.fnSelect(k);return[dt,{...k,$selected:q}]})):E.select?W=fO(W,E.select):W=W.pipe(oe(([dt,k])=>{const q=!E.join&&!E.groupBy?k[A]:k;return[dt,{...k,$selected:q}]})),X.length>0&&(W=W.pipe(oe(([dt,k])=>{const q={};for(const{fieldName:Z,getRouting:st}of X)q[Z]=st(k);return k.$selected[Ar]=q,[dt,k]})));const at=m?A:void 0;if(E.groupBy&&E.groupBy.length>0?W=xS(W,E.groupBy,E.having,E.select,E.fnHaving,I,at):E.select&&Object.values(E.select).some(k=>k.type===`agg`||Br(k))&&(W=xS(W,[],E.having,E.select,E.fnHaving,I,at)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(k=>k.type===`agg`):!1))throw new Ix;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const dt of E.fnHaving)W=W.pipe(ys(([k,q])=>dt(q)));if(E.distinct&&(W=W.pipe(mT(([dt,k])=>k.$selected))),E.orderBy&&E.orderBy.length>0){const dt=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const L=_?.[A]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([L,Y]):L}:void 0,Z=FT(n,W,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,dt).pipe(oe(([ut,[_,L]])=>{const Y=_.$selected,Q=zS(Md(Y),_);if(m){const ot=_[A]?.__correlationKey,it=_.__parentContext??null;return delete Q.__correlationKey,delete Q.__parentContext,[ut,[Q,L,ot,it]]}return[ut,[Q,L]]})),st={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:M,includes:tt.length>0?tt:void 0};return p.set(n,st),st}else if(E.limit!==void 0||E.offset!==void 0)throw new Hx;const wt=W.pipe(oe(([dt,k])=>{const q=k.$selected,Z=zS(Md(q),k);if(m){const st=k[A]?.__correlationKey,ut=k.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[dt,[Z,void 0,st,ut]]}return[dt,[Z,void 0]]})),Lt={collectionId:I,pipeline:wt,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:M,includes:tt.length>0?tt:void 0};return p.set(n,Lt),Lt}function pO(n){const t=new Set;if(n.from.type===`collectionRef`&&t.add(n.from.alias),n.join)for(const i of n.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Dd(n,t=new Set){const i=pO(n);for(const l of i)if(t.has(l))throw new qx(l,Array.from(t));const r=new Set([...t,...i]);if(n.from.type===`queryRef`&&Dd(n.from.query,r),n.join)for(const l of n.join)l.from.type===`queryRef`&&Dd(l.from.query,r)}function gO(n,t,i,r,l,o,u,d,p,g,m,y,v){switch(n.type){case`collectionRef`:{const b=t[n.alias];if(!b)throw new Kv(n.alias,n.collection.id,Object.keys(t));return m[n.alias]=n.collection.id,{alias:n.alias,input:b,collectionId:n.collection.id}}case`queryRef`:{const b=g.get(n.query)||n.query,w=_c(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(n.query),T=n.query.from.alias;if(!(!E&&n.alias===T))for(const[V,I]of w.sourceWhereClauses)v.set(V,I);const M=Object.keys(w.aliasToCollectionId).find(V=>w.aliasToCollectionId[V]===w.collectionId);M&&M!==n.alias&&(y[n.alias]=M);const A=w.pipeline.pipe(oe(V=>{const[I,[H,W]]=V,tt=Md(H);return[I,tt]}));return{alias:n.alias,input:A,collectionId:w.collectionId}}default:throw new Kx(n.type)}}function yO(n){return n instanceof ke||n&&typeof n==`object`&&`type`in n&&n.type===`val`}function Md(n){return yO(n)?n.value:n}function zS(n,t){if(!n||typeof n!=`object`)return n;let i=!1;for(const r of gd)if(n[r]==null&&r in t){i=!0;break}if(!i)return n;for(const r of gd)n[r]==null&&r in t&&(n[r]=t[r]);return n}function kd(n,t,i){if(n.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(n.from.query,t.from.query),kd(n.from.query,t.from.query,i)),n.join&&t.join)for(let r=0;r1)return new Oe(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Oe([r[0]])}return new Oe(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of n.args){const o=dp(l,t);r.push(o)}return new Ve(n.name,r)}}function pp(n,t){return n.map(r=>{const l=dp(r.expression,t);return{...r,expression:l}})}const pw=new WeakMap;function wO(n){return n.utils?.[ap]?.getBuilder?.()}function bO(n,t){pw.set(n,t)}function EO(n){return pw.get(n)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Xo(i,d)}if(Array.isArray(t))throw new Xo(i,`array`);if(r.length!==1)throw r.length===0?new Xo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Xo(i,`string`):new Mx(i);const l=r[0],o=t[l];let u;if(o instanceof up)u=new jr(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new kx(i);u=new yn(d,l)}else throw new Ux(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=wi(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new zx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=wi(i),l=t(r),o=lc(l)?se(l):l;if(!Nr(o))throw new oS(jS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?OS(i):wi(i),l=t(r),o=lc(l)?se(l):l;if(!Nr(o))throw new oS(jS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=wi(i);let l=t(r);lc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=yw(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?OS(r):wi(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:se(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=wi(i),l=t(r),o=Array.isArray(l)?l.map(d=>se(d)):[se(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new jx;return this.query}}function jS(n){return n===null?`null`:n===void 0?`undefined`:typeof n==`object`?`object`:typeof n}function CO(n){return n===void 0?se(null):n instanceof qv||n instanceof Ve||n instanceof Oe||n instanceof ke?n:se(n)}function gw(n){return n!==null&&typeof n==`object`&&!Nr(n)&&!n.__refProxy}function yw(n,t=[]){if(!gw(n))return CO(n);const i={};for(const[r,l]of Object.entries(n)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Gh(l,r,t,`collection`);continue}if(l instanceof eA){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Gh(l.query,r,t,`array`);continue}if(l instanceof nA){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Gh(l.query,r,t,`concat`);continue}i[r]=yw(l,t)}return i}function gp(n){const t=[];switch(n.type){case`ref`:t.push(n);break;case`func`:for(const i of n.args??[])t.push(...gp(i));break}return t}function xO(n,t){const i=typeof n==`object`&&`expression`in n?n.expression:n;return gp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Gh(n,t,i,r){const l=n._getQuery(),o=[l.from.alias];if(l.join)for(const R of l.join)o.push(R.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let R=0;R=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const R=m[p],V=(typeof R==`object`&&`expression`in R?R.expression:R).args.filter((I,H)=>H!==g);if(V.length===1){const I=typeof R==`object`&&`expression`in R&&R.residual;m[p]=I?{expression:V[0],residual:!0}:V[0]}else{const I=new Ve(`and`,V),H=typeof R==`object`&&`expression`in R&&R.residual;m[p]=H?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const R of m)xO(R,i)?v.push(R):y.push(R);let b;if(v.length>0){const R=new Set;b=[];for(const A of v){const V=typeof A==`object`&&`expression`in A?A.expression:A;for(const I of gp(V))I.path[0]!=null&&i.includes(I.path[0])&&!R.has(I.path.join(`.`))&&(R.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||gw(E);let N=w,M;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);M=ex,N={...w,select:{[M]:E}}}return new Ai(N,u,d,t,v.length>0?v:void 0,b,r,M)}function NS(n,t,i,r){if(n.type===`ref`&&t.type===`ref`){const l=n.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:n,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:n}}}function _O(n){const t=n(new Wt);return mw(t)}function mw(n){return n._getQuery()}function TO(n){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ai?r(d.query):yp(d)&&l(d))}return r(n),t}function Sw(n){const t=n.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Sw(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(n)}`)}function AO(n){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ai?l(d.query):yp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(n),t}function yp(n){return!(n===null||typeof n!=`object`||n instanceof Ai||`type`in n&&typeof n.type==`string`||n.__refProxy)}function OO(n){const t=typeof n.query==`function`?_O(n.query):mw(n.query);if(t.select&&!yp(t.select))throw new Lx;return t}function RO(n,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&n.sendData(new ne(r)),r.length}function*DO(n){for(const t of n)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function MO(n,t){const i=[];for(const r of n){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function kO(n,t,i,r){let l=t,o=!1;for(const u of n){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function UO(n,t){const{orderBy:i,limit:r,offset:l}=n,o=r!==void 0&&l!==void 0?r+l:r,u=i?pp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function zO(n,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=n,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=ll({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=pp(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const BS=Symbol.for(`@tanstack/db.collection-config-builder`);class jO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=dp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=MO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=RO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=UO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=DO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=pp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[BS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[BS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=zO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=kO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let NO=0;class BO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++NO}`,this.query=OO({query:t.query}),this.collections=TO(this.query);const i=AO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=vw(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Sw(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[ap]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new l_;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??cc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;Ec.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=Ec.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new hT,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=_c(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new a_(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(Sd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce($O,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=KO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Ud(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(Sd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Lr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=ww(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=EO(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new jO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function vw(n){return(t,i)=>{const r=n.get(t),l=n.get(i);return r&&l?rl?1:0:0}}function LS(n){return n.materialization!==`collection`}function IS(n,t){if(!t)return n.materialization===`array`?[]:n.materialization===`concat`?``:void 0;if(n.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=n.scalarField?i.map(l=>l?.[n.scalarField]):i;return n.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function ww(n,t){return n.map(i=>{const r=new Map;i.pipeline.pipe(Sd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Lr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=ww(i.childCompilationResult.includes,t)),l})}function LO(n){return n.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function IO(n){const t=new Set;if(!n.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function HO(n,t,i){if(n.nestedSetups){for(const r of n.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Lr(u,d);if(u!=null){n.nestedRoutingIndex.set(p,t);let g=n.nestedRoutingReverseIndex.get(t);g||(g=new Set,n.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Lr(u,d);if(u!=null){n.nestedRoutingIndex.delete(p);const g=n.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&n.nestedRoutingReverseIndex.delete(t))}}}}function qO(n,t){if(!n.nestedRoutingReverseIndex)return;const i=n.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)n.nestedRoutingIndex.delete(r);n.nestedRoutingReverseIndex.delete(t)}}function bw(n){for(const t of n)if(t.buffer.size>0||t.nestedSetups&&bw(t.nestedSetups))return!0;return!1}function Lr(n,t){return t==null?n:JSON.stringify([n,t])}function HS(n,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?vw(u):void 0,m={collection:cp({id:`__child-collection:${n}-${t}-${ll(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=LO(l)),m}function Ud(n,t,i,r,l){for(const o of n){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Ar]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Lr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const A=HS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,A)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const M=IS(o,o.childRegistry.get(T));v[o.fieldName]=M;const R=t.get(m);R&&R!==v&&(R[o.fieldName]=M)}}}const u=LS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=HS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&VO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}HO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=IO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Ud(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Ud(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=LS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=IS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Lr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(qO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function KO(n){for(const t of n)if(t.pendingChildChanges.size>0||t.nestedSetups&&bw(t.nestedSetups))return!0;return!1}function VO(n,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=n.get(u);d&&(d[t]=l)}}function $O(n,[[t,i],r]){const[l,o]=i,u=n.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),n.set(t,u),n}function qS(n){return new BO(n).getConfig()}function Yh(n){if(typeof n==`function`){const i=qS({query:n});return KS(i)}else{const t=n,i=qS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),KS(i)}}function KS(n){const t=cp(n),i=wO(n);return i&&bO(t,i),t}function Ew(n){return n!=null&&`operation`in n.headers}function Cw(n){return n!=null&&`control`in n.headers}var GO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(n,t){this.handlers.set(n,t),this.existingKeys.has(n)||this.existingKeys.set(n,new Set)}dispatchChange(n){if(!Ew(n))return;n.headers.txid&&typeof n.headers.txid==`string`&&this.pendingTxids.add(n.headers.txid);const t=this.handlers.get(n.type);if(!t)return;let i=n.headers.operation;if(i!==`delete`&&(typeof n.value!=`object`||n.value===null))throw new Error(`StreamDB collections require object values; got ${typeof n.value} for type=${n.type}, key=${n.key}`);const l={...n.value??{}};l[t.primaryKey]=n.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(n.type)?.has(n.key)?`update`:`insert`);const o=this.existingKeys.get(n.type);i===`insert`||i===`update`?o?.add(n.key):o?.delete(n.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:n.type,key:n.key,operation:i}),u}}dispatchControl(n){if(Cw(n))switch(n.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const n of this.pendingHandlers)try{n.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const n of this.pendingTxids){this.seenTxids.add(n);const t=this.txidResolvers.get(n);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(n)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const n of this.handlers.values())n.markReady();for(const n of this.preloadResolvers)n();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((n,t)=>{this.preloadResolvers.push(n),this.preloadRejecters.push(t)})}rejectAll(n){for(const t of this.preloadRejecters)t(n);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(n);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(n,t=5e3){return this.seenTxids.has(n)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(n);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(n)}r(new Error(`Timeout waiting for txid: ${n}`))},t);this.txidResolvers.has(n)||this.txidResolvers.set(n,[]),this.txidResolvers.get(n).push({resolve:i,reject:r,timeoutId:l})})}};function YO(n,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(n,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const VS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function FO(n,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${n} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${n} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${n} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:n,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function xw(n){for(const r of Object.keys(n))if(VS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(VS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(n)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(n))i[r]={...l,...FO(l.type,l.primaryKey,l.schema)};return i}function _w(n){const{streamOptions:t,state:i,actions:r}=n,l=new Ln(t),o=new GO,u={};for(const[b,w]of Object.entries(i)){const E=cp({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:YO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Ew(N)?o.dispatchChange(N):Cw(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=qA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const mp=600,QO=mp/2*1e3,XO=3600*24,JO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Fh=xw({rooms:{schema:JO,type:`stream`,primaryKey:`roomId`}}),ZO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},$S=xw({scores:{schema:ZO,type:`stream`,primaryKey:`playerName`}});function WO(n,t){return _w({streamOptions:{url:n,headers:t,contentType:`application/json`},state:Fh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Fh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Fh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Tw=J.createContext(null);function Aw(){const n=J.useContext(Tw);if(!n)throw new Error(`useRegistryContext must be used within RegistryProvider`);return n}function PO({children:n}){const{dsEndpoint:t,dsHeaders:i}=Qd(),[r,l]=J.useState({registryDB:null,error:null,isLoading:!0});return J.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:XO}),o=await WO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?F.jsxs(`div`,{style:GS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`LOADING...`})]}):r.error||!r.registryDB?F.jsxs(`div`,{style:GS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})]}):F.jsx(Tw.Provider,{value:{registryDB:r.registryDB},children:n})}const GS={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`}},Qh=1;function tR(n,t=[]){const i=n&&typeof n==`object`&&typeof n.subscribeChanges==`function`&&typeof n.startSyncImmediate==`function`&&typeof n.id==`string`,r=J.useRef(null),l=J.useRef(null),o=J.useRef(null),u=J.useRef(0),d=J.useRef(null),p=!r.current||i&&o.current!==n||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)n.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),n.startSyncImmediate(),r.current=n,o.current=n;else if(typeof n==`function`){const w=new Wt,E=n(w);if(E==null)r.current=null;else if(E instanceof up)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Yh({query:n,startSync:!0,gcTime:Qh});else if(E&&typeof E==`object`)r.current=Yh({startSync:!0,gcTime:Qh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Yh({startSync:!0,gcTime:Qh,...n}),l.current=[...t];p&&(u.current=0,d.current=null);const g=J.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=J.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=J.useSyncExternalStore(g.current,m.current),v=J.useRef(null),b=J.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,M=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return M||(M=w.map(([,R])=>R)),T?M[0]:M},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const jt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Wo=[{label:`32x32`,cols:32,rows:32},{label:`64x64`,cols:64,rows:64},{label:`128x128`,cols:128,rows:128}];function Xh(n,t){return`${n}__${t.cols}x${t.rows}`}function eR(){const n=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=n[Math.floor(Math.random()*n.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function nR({playerName:n,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=Aw(),[l,o]=J.useState(eR),[u,d]=J.useState(1),[p,g]=J.useState(!1),[m,y]=J.useState(0),[v,b]=J.useState(``),[,w]=J.useState(0);J.useEffect(()=>{const A=setInterval(()=>w(V=>V+1),1e3);return()=>clearInterval(A)},[]);const{data:E=[]}=tR(A=>A.from({rooms:r.collections.rooms})),T=Date.now(),M=[...E.filter(A=>A.expiresAt>T)].sort((A,V)=>V.createdAt-A.createdAt),R=async()=>{if(!p){g(!0);try{const A=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,V=Wo[u],I=Xh(A,V),H=Date.now(),W={roomId:I,name:A,boardSize:`${V.cols}x${V.rows}`,createdAt:H,expiresAt:H+mp*1e3};await r.actions.addRoom(W),o(``),i(I)}catch(A){console.error(`Failed to create room:`,A)}finally{g(!1)}}};return F.jsxs(`div`,{style:gn.container,children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),F.jsx(`div`,{style:gn.title,children:`TERRITORY WARS`}),F.jsx(`div`,{style:{fontSize:7,color:jt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Claim 30% territory or lead when time runs out.`}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`NAME`}),F.jsx(`input`,{style:gn.input,value:n,onChange:A=>t(A.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:gn.input,value:l,onChange:A=>o(A.target.value),placeholder:`room name`,onKeyDown:A=>A.key===`Enter`&&R()}),F.jsx(`div`,{style:gn.cardTitle,children:`BOARD SIZE`}),F.jsx(`div`,{style:{display:`flex`,gap:6,marginBottom:10},children:Wo.map((A,V)=>F.jsx(`button`,{className:`lobby-btn`,style:{flex:1,padding:`6px 0`,fontSize:7,fontFamily:`inherit`,background:V===u?jt.accent:`transparent`,color:V===u?`#000`:jt.accent,border:`1px solid ${jt.accent}`,cursor:`pointer`,letterSpacing:1},onClick:()=>d(V),children:A.label},A.label))}),F.jsx(`button`,{className:`lobby-btn`,style:{...gn.createBtn,opacity:p?.6:1},onClick:R,disabled:p,children:p?`STARTING...`:`START`})]}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`ROOMS`}),F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[M.slice(m*3,m*3+3).map(A=>F.jsx(sR,{room:A,onJoin:()=>i(A.roomId)},A.roomId)),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 12px`},children:[F.jsx(`input`,{style:{fontSize:8,color:jt.text,fontFamily:`inherit`,background:`transparent`,border:`none`,outline:`none`,flex:1,padding:0},value:v,onChange:A=>b(A.target.value),placeholder:`room-id`,onKeyDown:A=>{if(A.key===`Enter`&&v.trim()){const V=M.find(I=>I.name===v.trim());i(V?V.roomId:Xh(v.trim(),Wo[u]))}}}),v.trim()&&F.jsx(`button`,{className:`lobby-btn`,style:{background:jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1,flexShrink:0},onClick:()=>{const A=M.find(V=>V.name===v.trim());i(A?A.roomId:Xh(v.trim(),Wo[u]))},children:`JOIN`})]})]}),M.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:jt.bg,color:jt.dim,border:`1px solid ${jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:m===0?.3:1},disabled:m===0,onClick:()=>y(A=>A-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:jt.dim,lineHeight:`24px`},children:[m+1,`/`,Math.ceil(M.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:jt.bg,color:jt.dim,border:`1px solid ${jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:m>=Math.ceil(M.length/3)-1?.3:1},disabled:m>=Math.ceil(M.length/3)-1,onClick:()=>y(A=>A+1),children:`>`})]})]})]})}function sR({room:n,onJoin:t}){const[i,r]=J.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(n.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?jt.accent:jt.text,cursor:`pointer`},children:i?`COPIED`:n.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const gn={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:jt.bg,color:jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:jt.accent,marginBottom:6},card:{background:jt.card,border:`1px solid ${jt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:jt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 10px`,color:jt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:jt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2}},Tn=()=>new Map,zd=n=>{const t=Tn();return n.forEach((i,r)=>{t.set(r,i)}),t},ti=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r},iR=(n,t)=>{const i=[];for(const[r,l]of n)i.push(t(l,r));return i},rR=(n,t)=>{for(const[i,r]of n)if(t(r,i))return!0;return!1},Ir=()=>new Set,Jh=n=>n[n.length-1],aR=(n,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(n);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ci((this._observers.get(t)||Tn()).values()).forEach(r=>r(...i))}destroy(){this._observers=Tn()}};const Kn=Math.floor,uc=Math.abs,Rw=(n,t)=>nn>t?n:t,Dw=n=>n!==0?n<0:1/n<0,YS=1,FS=2,Zh=4,Wh=8,ul=32,ms=64,sn=128,Yc=31,jd=63,Ei=127,cR=2147483647,Tc=Number.MAX_SAFE_INTEGER,QS=Number.MIN_SAFE_INTEGER,uR=Number.isInteger||(n=>typeof n==`number`&&isFinite(n)&&Kn(n)===n),fR=String.fromCharCode,hR=n=>n.toLowerCase(),dR=/^\s*/g,pR=n=>n.replace(dR,``),gR=/([A-Z])/g,XS=(n,t)=>pR(n.replace(gR,i=>`${t}${hR(i)}`)),yR=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lfl.encode(n),SR=fl?mR:yR;let el=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});el&&el.decode(new Uint8Array).length===1&&(el=null);const vR=(n,t)=>lR(t,()=>n).join(``);let xl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}};const Fc=()=>new xl,wR=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(wR(n));let i=0;for(let r=0;r{const i=n.cbuf.length;i-n.cpos{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Nd=me,Mt=(n,t)=>{for(;t>Ei;)me(n,sn|Ei&t),t=Kn(t/128);me(n,Ei&t)},vp=(n,t)=>{const i=Dw(t);for(i&&(t=-t),me(n,(t>jd?sn:0)|(i?ms:0)|jd&t),t=Kn(t/64);t>0;)me(n,(t>Ei?sn:0)|Ei&t),t=Kn(t/128)},Bd=new Uint8Array(3e4),ER=Bd.length/3,CR=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Mt(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=Rw(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(Gr(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},en=(n,t)=>{Mt(n,t.byteLength),Qc(n,t)},wp=(n,t)=>{bR(n,t);const i=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,i},_R=(n,t)=>wp(n,4).setFloat32(0,t,!1),TR=(n,t)=>wp(n,8).setFloat64(0,t,!1),AR=(n,t)=>wp(n,8).setBigInt64(0,t,!1),JS=new DataView(new ArrayBuffer(4)),OR=n=>(JS.setFloat32(0,n),JS.getFloat32(0)===n),hl=(n,t)=>{switch(typeof t){case`string`:me(n,119),Or(n,t);break;case`number`:uR(t)&&uc(t)<=cR?(me(n,125),vp(n,t)):OR(t)?(me(n,124),_R(n,t)):(me(n,123),TR(n,t));break;case`bigint`:me(n,122),AR(n,t);break;case`object`:if(t===null)me(n,126);else if(Gc(t)){me(n,117),Mt(n,t.length);for(let i=0;i0&&Mt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const WS=n=>{n.count>0&&(vp(n.encoder,n.count===1?n.s:-n.s),n.count>1&&Mt(n.encoder,n.count-2))};class fc{constructor(){this.encoder=new xl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(WS(this),this.count=1,this.s=t)}toUint8Array(){return WS(this),qn(this.encoder)}}const PS=n=>{if(n.count>0){const t=n.diff*2+(n.count===1?0:1);vp(n.encoder,t),n.count>1&&Mt(n.encoder,n.count-2)}};class Ph{constructor(){this.encoder=new xl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(PS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return PS(this),qn(this.encoder)}}class RR{constructor(){this.sarr=[],this.s=``,this.lensE=new fc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new xl;return this.sarr.push(this.s),this.s=``,Or(t,this.sarr.join(``)),Qc(t,this.lensE.toUint8Array()),qn(t)}}const Vn=n=>new Error(n),An=()=>{throw Vn(`Method unimplemented`)},Sn=()=>{throw Vn(`Unexpected case`)},Mw=Vn(`Unexpected end of array`),kw=Vn(`Integer out of Range`);let Xc=class{constructor(t){this.arr=t,this.pos=0}};const bp=n=>new Xc(n),DR=n=>n.pos!==n.arr.length,MR=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},nn=n=>MR(n,Rt(n)),Hr=n=>n.arr[n.pos++],Rt=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posTc)throw kw}throw Mw},Ep=n=>{let t=n.arr[n.pos++],i=t&jd,r=64;const l=(t&ms)>0?-1:1;if((t&sn)===0)return l*i;const o=n.arr.length;for(;n.posTc)throw kw}throw Mw},kR=n=>{let t=Rt(n);if(t===0)return``;{let i=String.fromCodePoint(Hr(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(Hr(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},UR=n=>el.decode(nn(n)),Rr=el?UR:kR,Cp=(n,t)=>{const i=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,i},zR=n=>Cp(n,4).getFloat32(0,!1),jR=n=>Cp(n,8).getFloat64(0,!1),NR=n=>Cp(n,8).getBigInt64(0,!1),BR=[n=>{},n=>null,Ep,zR,jR,NR,n=>!1,n=>!0,Rr,n=>{const t=Rt(n),i={};for(let r=0;r{const t=Rt(n),i=[];for(let r=0;rBR[127-Hr(n)](n);class tv extends Xc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),DR(this)?this.count=Rt(this)+1:this.count=-1),this.count--,this.s}}class hc extends Xc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=Ep(this);const t=Dw(this.s);this.count=1,t&&(this.s=-this.s,this.count=Rt(this)+2)}return this.count--,this.s}}class td extends Xc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=Ep(this),i=t&1;this.diff=Kn(t/2),this.count=1,i&&(this.count=Rt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class LR{constructor(t){this.decoder=new hc(t),this.str=Rr(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const IR=crypto.getRandomValues.bind(crypto),Uw=()=>IR(new Uint32Array(1))[0],HR=`10000000-1000-4000-8000`+-1e11,qR=()=>HR.replace(/[018]/g,n=>(n^Uw()&15>>n/4).toString(16)),ev=n=>new Promise(n);Promise.all.bind(Promise);const nv=n=>n===void 0?null:n;class KR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let zw=new KR,VR=!0;try{typeof localStorage<`u`&&localStorage&&(zw=localStorage,VR=!1)}catch{}const $R=zw,pl=Symbol(`Equality`),jw=(n,t)=>n===t||!!n?.[pl]?.(t)||!1,GR=n=>typeof n==`object`,YR=Object.assign,FR=Object.keys,QR=(n,t)=>{for(const i in n)t(n[i],i)},Ac=n=>FR(n).length,XR=n=>{for(const t in n)return!1;return!0},_l=(n,t)=>{for(const i in n)if(!t(n[i],i))return!1;return!0},xp=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),JR=(n,t)=>n===t||Ac(n)===Ac(t)&&_l(n,(i,r)=>(i!==void 0||xp(t,r))&&jw(t[r],i)),ZR=Object.freeze,Nw=n=>{for(const t in n){const i=n[t];(typeof i==`object`||typeof i==`function`)&&Nw(n[t])}return ZR(n)},_p=(n,t,i=0)=>{try{for(;i{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[pl]!=null)return n[pl](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(n);var Bw={};const gl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let Nn;const PR=()=>{if(Nn===void 0)if(gl){Nn=Tn();const n=process.argv;let t=null;for(let i=0;i{if(n.length!==0){const[t,i]=n.split(`=`);Nn.set(`--${XS(t,`-`)}`,i),Nn.set(`-${XS(t,`-`)}`,i)}})):Nn=Tn();return Nn},Ld=n=>PR().has(n),Oc=n=>nv(gl?Bw[n.toUpperCase().replaceAll(`-`,`_`)]:$R.getItem(n)),Lw=n=>Ld(`--`+n)||Oc(n)!==null,tD=Lw(`production`),eD=gl&&WR(Bw.FORCE_COLOR,[`true`,`1`,`2`]),nD=eD||!Ld(`--no-colors`)&&!Lw(`no-color`)&&(!gl||process.stdout.isTTY)&&(!gl||Ld(`--color`)||Oc(`COLORTERM`)!==null||(Oc(`TERM`)||``).includes(`color`)),sD=n=>new Uint8Array(n),iD=n=>{const t=sD(n.byteLength);return t.set(n),t};class rD{constructor(t,i){this.left=t,this.right=i}}const hs=(n,t)=>new rD(n,t),sv=n=>n.next()>=.5,ed=(n,t,i)=>Kn(n.next()*(i+1-t)+t),Iw=(n,t,i)=>Kn(n.next()*(i+1-t)+t),Tp=(n,t,i)=>Iw(n,t,i),aD=n=>fR(Tp(n,97,122)),lD=(n,t=0,i=20)=>{const r=Tp(n,t,i);let l=``;for(let o=0;ot[Tp(n,0,t.length-1)],oD=Symbol(`0schema`);class cD{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(vR(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Id=(n,t)=>n===t?!0:n==null||t==null||n.constructor!==t.constructor?!1:n[pl]?jw(n,t):Gc(n)?Sp(n,i=>Ow(t,r=>Id(i,r))):GR(n)?_l(n,(i,r)=>Id(i,t[r])):!1;class ze{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Id(i,r)}equals(t){return this.constructor===t.constructor&&dc(this.shape,t.shape)}[oD](){return!0}[pl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){An()}get nullable(){return Yr(this,tu)}get optional(){return new Kw(this)}cast(t){return iv(t,this),t}expect(t){return iv(t,this),t}}class Ap extends ze{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ce=(n,t=null)=>new Ap(n,t);ce(Ap);class Op extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const we=n=>new Op(n);ce(Op);class Jc extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Zc=(...n)=>new Jc(n),Hw=ce(Jc),uD=RegExp.escape||(n=>n.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),qw=n=>{if(qr.check(n))return[uD(n)];if(Hw.check(n))return n.shape.map(t=>t+``);if(Zw.check(n))return[`[+-]?\\d+.?\\d*`];if(Ww.check(n))return[`.*`];if(Rc.check(n))return n.shape.map(qw).flat(1);Sn()};class fD extends ze{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(qw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ce(fD);const hD=Symbol(`optional`);class Kw extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[hD](){return!0}}const dD=ce(Kw);class pD extends ze{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ce(pD);class Wc extends ze{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Wc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):_l(this.shape,(r,l)=>{const o=this._isPartial&&!xp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const gD=n=>new Wc(n),yD=ce(Wc),mD=we(n=>n!=null&&(n.constructor===Object||n.constructor==null));class Vw extends ze{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&_l(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const $w=(n,t)=>new Vw(n,t),SD=ce(Vw);class Gw extends ze{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&_l(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const vD=(...n)=>new Gw(n);ce(Gw);class Yw extends ze{constructor(t){super(),this.shape=t.length===1?t[0]:new Rp(t)}check(t,i){const r=Gc(t)&&Sp(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const Fw=(...n)=>new Yw(n),wD=ce(Yw),bD=we(n=>Gc(n));class Qw extends ze{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const ED=(n,t=null)=>new Qw(n,t);ce(Qw);const CD=ED(ze);class xD extends ze{constructor(t){super(),this.len=t.length-1,this.args=vD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const _D=ce(xD),TD=we(n=>typeof n==`function`);class AD extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=Sp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ce(AD,n=>n.shape.length>0);class Rp extends ze{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=Ow(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Yr=(...n)=>n.findIndex(t=>Rc.check(t))>=0?Yr(...n.map(t=>yl(t)).map(t=>Rc.check(t)?t.shape:[t]).flat(1)):n.length===1?n[0]:new Rp(n),Rc=ce(Rp),Xw=()=>!0,Dc=we(Xw),OD=ce(Op,n=>n.shape===Xw),Dp=we(n=>typeof n==`bigint`),RD=we(n=>n===Dp),Jw=we(n=>typeof n==`symbol`);we(n=>n===Jw);const Dr=we(n=>typeof n==`number`),Zw=we(n=>n===Dr),qr=we(n=>typeof n==`string`),Ww=we(n=>n===qr),Pc=we(n=>typeof n==`boolean`),DD=we(n=>n===Pc),Pw=Zc(void 0);ce(Jc,n=>n.shape.length===1&&n.shape[0]===void 0);Zc(void 0);const tu=Zc(null),MD=ce(Jc,n=>n.shape.length===1&&n.shape[0]===null);ce(Uint8Array);ce(Ap,n=>n.shape===Uint8Array);const kD=Yr(Dr,qr,tu,Pw,Dp,Pc,Jw);(()=>{const n=Fw(Dc),t=$w(qr,Dc),i=Yr(Dr,qr,tu,Pc,n,t);return n.shape=i,t.shape.values=i,i})();const yl=n=>{if(CD.check(n))return n;if(mD.check(n)){const t={};for(const i in n)t[i]=yl(n[i]);return gD(t)}else{if(bD.check(n))return Yr(...n.map(yl));if(kD.check(n))return Zc(n);if(TD.check(n))return ce(n)}Sn()},iv=tD?()=>{}:(n,t)=>{const i=new cD;if(!t.check(n,i))throw Vn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class UD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:yl(t),h:i}),this}else(t){return this.if(Dc,t)}done(){return(t,i)=>{for(let r=0;rnew UD(n),tb=zD(Dc).if(Zw,(n,t)=>ed(t,QS,Tc)).if(Ww,(n,t)=>lD(t)).if(DD,(n,t)=>sv(t)).if(RD,(n,t)=>BigInt(ed(t,QS,Tc))).if(Rc,(n,t)=>Sr(t,nd(t,n.shape))).if(yD,(n,t)=>{const i={};for(const r in n.shape){let l=n.shape[r];if(dD.check(l)){if(sv(t))continue;l=l.shape}i[r]=tb(l,t)}return i}).if(wD,(n,t)=>{const i=[],r=Iw(t,0,42);for(let l=0;lnd(t,n.shape)).if(MD,(n,t)=>null).if(_D,(n,t)=>{const i=Sr(t,n.res);return()=>i}).if(OD,(n,t)=>Sr(t,nd(t,[Dr,qr,tu,Pw,Dp,Pc,Fw(Dr),$w(Yr(`a`,`b`,`c`),Dr)]))).if(SD,(n,t)=>{const i={},r=ed(t,0,3);for(let l=0;ltb(yl(t),n),eu=typeof document<`u`?document:{};we(n=>n.nodeType===ID);typeof DOMParser<`u`&&new DOMParser;we(n=>n.nodeType===ND);we(n=>n.nodeType===BD);const jD=n=>iR(n,(t,i)=>`${i}:${t};`).join(``),ND=eu.ELEMENT_NODE,BD=eu.TEXT_NODE,LD=eu.DOCUMENT_NODE,ID=eu.DOCUMENT_FRAGMENT_NODE;we(n=>n.nodeType===LD);const vs=Symbol,eb=vs(),nb=vs(),HD=vs(),qD=vs(),KD=vs(),sb=vs(),VD=vs(),Mp=vs(),$D=vs(),GD=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[],r=Tn();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...ib(n)),rb.forEach(t=>t.print(n))},XD=(...n)=>{console.warn(...ib(n)),n.unshift(Mp),rb.forEach(t=>t.print(n))},rb=Ir(),ab=n=>({[Symbol.iterator](){return this},next:n}),JD=(n,t)=>ab(()=>{let i;do i=n.next();while(!i.done&&!t(i.value));return i}),sd=(n,t)=>ab(()=>{const{done:i,value:r}=n.next();return{done:i,value:i?void 0:t(r)}});class kp{constructor(t,i){this.clock=t,this.len=i}}class nu{constructor(){this.clients=new Map}}const lb=(n,t,i)=>t.clients.forEach((r,l)=>{const o=n.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=n.length-1;for(;i<=r;){const l=Kn((i+r)/2),o=n[l],u=o.clock;if(u<=t){if(t{const i=n.clients.get(t.client);return i!==void 0&&ZD(i,t.clock)!==null},Up=n=>{n.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new kp(l.clock,Gr(l.len,o.clock+o.len-l.clock)):(r{const t=new nu;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ti(n.clients,t,()=>[]).push(new kp(i,r))},zp=(n,t)=>{Mt(n.restEncoder,t.clients.size),Ci(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{n.resetDsCurVal(),Mt(n.restEncoder,i);const l=r.length;Mt(n.restEncoder,l);for(let o=0;o{const t=new nu,i=Rt(n.restDecoder);for(let r=0;r0){const u=ti(t.clients,l,()=>[]);for(let d=0;d{const r=new nu,l=Rt(n.restDecoder);for(let o=0;o0){const o=new su;return Mt(o.restEncoder,0),zp(o,r),o.toUint8Array()}return null},cb=Uw;class Fr extends oR{constructor({guid:t=qR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=cb(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new db,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=ev(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>ev(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ci(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Te){const r=ti(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Te&&l!==i)if(l===Te){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,kr)}getText(t=``){return this.get(t,Vr)}getMap(t=``){return this.get(t,Kr)}getXmlElement(t=``){return this.get(t,$r)}getXmlFragment(t=``){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ci(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Fr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class tM{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Rt(this.restDecoder)}readDsLen(){return Rt(this.restDecoder)}}class eM extends tM{readLeftID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readRightID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readClient(){return Rt(this.restDecoder)}readInfo(){return Hr(this.restDecoder)}readString(){return Rr(this.restDecoder)}readParentInfo(){return Rt(this.restDecoder)===1}readTypeRef(){return Rt(this.restDecoder)}readLen(){return Rt(this.restDecoder)}readAny(){return dl(this.restDecoder)}readBuf(){return iD(nn(this.restDecoder))}readJSON(){return JSON.parse(Rr(this.restDecoder))}readKey(){return Rr(this.restDecoder)}}class nM{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Rt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Rt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class kc extends nM{constructor(t){super(t),this.keys=[],Rt(t),this.keyClockDecoder=new td(nn(t)),this.clientDecoder=new hc(nn(t)),this.leftClockDecoder=new td(nn(t)),this.rightClockDecoder=new td(nn(t)),this.infoDecoder=new tv(nn(t),Hr),this.stringDecoder=new LR(nn(t)),this.parentInfoDecoder=new tv(nn(t),Hr),this.typeRefDecoder=new hc(nn(t)),this.lenDecoder=new hc(nn(t))}readLeftID(){return new Mr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Mr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return dl(this.restDecoder)}readBuf(){return nn(this.restDecoder)}readJSON(){return dl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Gr(r,t[0].id.clock);const l=$n(t,r);Mt(n.restEncoder,t.length-l),n.writeClient(i),Mt(n.restEncoder,r);const o=t[l];o.write(n,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{Se(t,o)>l&&r.set(o,l)}),jp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Mt(n.restEncoder,r.size),Ci(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{aM(n,t.clients.get(l),l,o)})},lM=(n,t)=>{const i=Tn(),r=Rt(n.restDecoder);for(let l=0;l{const r=[];let l=Ci(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new db,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==xn){const w=ti(y,m.id.client,()=>Se(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(n,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,Se(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new su;return ub(b,d,new Map),Mt(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},cM=(n,t)=>ub(n,t.doc.store,t.beforeState),uM=(n,t,i,r=new kc(n))=>$t(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=lM(r,u),g=oM(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=dv([m.update,g.update])}}else d.pendingStructs=g;const y=rv(r,l,d);if(d.pendingDs){const v=new kc(bp(d.pendingDs));Rt(v.restDecoder);const b=rv(v,l,d);y&&b?d.pendingDs=dv([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,fb(l.doc,v)}},i,!1),fb=(n,t,i,r=kc)=>{const l=bp(t);uM(l,n,i,new r(l))},av=(n,t,i)=>fb(n,t,i,eM);class fM{constructor(){this.l=[]}}const lv=()=>new fM,ov=(n,t)=>n.l.push(t),cv=(n,t)=>{const i=n.l,r=i.length;n.l=i.filter(l=>t!==l),r===n.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},hb=(n,t,i)=>_p(n.l,[t,i]);class Mr{constructor(t,i){this.client=t,this.clock=i}}const Po=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,Dt=(n,t)=>new Mr(n,t),hM=n=>{for(const[t,i]of n.doc.share.entries())if(i===n)return t;throw Sn()},Er=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ob(t.ds,n.id),Hd=(n,t)=>{const i=ti(n.meta,Hd,Ir),r=n.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class db{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const jp=n=>{const t=new Map;return n.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},Se=(n,t)=>{const i=n.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},pb=(n,t)=>{let i=n.clients.get(t.id.client);if(i===void 0)i=[],n.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw Sn()}i.push(t)},$n=(n,t)=>{let i=0,r=n.length-1,l=n[r],o=l.id.clock;if(o===t)return r;let u=Kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=n[u],o=l.id.clock,o<=t){if(t{const i=n.clients.get(t.client);return i[$n(i,t.clock)]},id=dM,qd=(n,t,i)=>{const r=$n(t,i),l=t[r];return l.id.clock{const i=n.doc.store.clients.get(t.client);return i[qd(n,i,t.clock)]},uv=(n,t,i)=>{const r=t.clients.get(i.client),l=$n(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==mn&&r.splice(l+1,0,Lc(n,o,i.clock-o.id.clock+1)),o},pM=(n,t,i)=>{const r=n.clients.get(t.id.client);r[$n(r,t.id.clock)]=i},gb=(n,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=qd(n,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!rR(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Up(t.deleteSet),cM(n,t),zp(n,t.deleteSet),!0),hv=(n,t,i)=>{const r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&ti(n.changed,t,Ir).add(i)},pc=(n,t)=>{let i=n[t],r=n[t-1],l=t;for(;l>0;i=r,r=n[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof he&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&n.splice(t+1-o,o),o},yM=(n,t,i)=>{for(const[r,l]of n.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=$n(o,d.clock),m=o[g];g{n.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=Rw(l.length-1,1+$n(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+pc(l,p)}})},yb=(n,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),d.push(()=>{hb(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&NM(i)})}),_p(d,[])}finally{r.gc&&yM(o,l,r.gcFilter),mM(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Gr($n(b,v),1);for(let E=b.length-1;E>=w;)E-=1+pc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=$n(b,v);w+11||w>0&&pc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(QD(Mp,eb,`[yjs] `,nb,sb,`Changed the client-id because another client seems to be using it.`),r.clientID=cb()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new iM;fv(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new su;fv(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,n])):yb(n,t+1)}}},$t=(n,t,i=null,r=!0)=>{const l=n._transactionCleanups;let o=!1,u=null;n._transaction===null&&(o=!0,n._transaction=new gM(n,i,r),l.push(n._transaction),l.length===1&&n.emit(`beforeAllTransactions`,[n]),n.emit(`beforeTransaction`,[n._transaction,n]));try{u=t(n._transaction)}finally{if(o){const d=n._transaction===l[0];n._transaction=null,d&&yb(l,0)}}return u};function*SM(n){const t=Rt(n.restDecoder);for(let i=0;i{if(n.constructor===mn){const{client:i,clock:r}=n.id;return new mn(Dt(i,r+t),n.length-t)}else if(n.constructor===xn){const{client:i,clock:r}=n.id;return new xn(Dt(i,r+t),n.length-t)}else{const i=n,{client:r,clock:l}=i.id;return new he(Dt(r,l+t),null,Dt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},dv=(n,t=kc,i=su)=>{if(n.length===1)return n[0];const r=n.map(m=>new t(bp(m)));let l=r.map(m=>new vM(m,!0)),o=null;const u=new i,d=new wM(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===xn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Ga(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===xn?o.struct.length-=w:v=bM(v,w)),o.struct.mergeWith(v)||(Ga(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==xn;v=m.next())Ga(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ga(d,o.struct,o.offset),o=null),EM(d);const p=r.map(m=>PD(m)),g=WD(p);return zp(u,g),u.toUint8Array()},mb=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:qn(n.encoder.restEncoder)}),n.encoder.restEncoder=Fc(),n.written=0)},Ga=(n,t,i)=>{n.written>0&&n.currClient!==t.id.client&&mb(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),Mt(n.encoder.restEncoder,t.id.clock+i)),t.write(n.encoder,i),n.written++},EM=n=>{mb(n);const t=n.encoder.restEncoder;Mt(t,n.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Jh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Jh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Jh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(pv);const i=this.target,r=Ir(),l=Ir(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const CM=(n,t)=>{const i=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},Re=()=>{XD(`Invalid access: Add Yjs type to a document before reading data.`)},Sb=80;let Np=0;class xM{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Np++}}const _M=n=>{n.timestamp=Np++},vb=(n,t,i)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=i,n.timestamp=Np++},TM=(n,t,i)=>{if(n.length>=Sb){const r=n.reduce((l,o)=>l.timestamp{if(n._start===null||t===0||n._searchMarker===null)return null;const i=n._searchMarker.length===0?null:n._searchMarker.reduce((o,u)=>uc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&uc(i.index-l){for(let r=n.length-1;r>=0;r--){const l=n[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Gr(t,l.index+i))}},au=(n,t,i)=>{const r=n,l=t.changedParentTypes;for(;ti(l,n,()=>[]).push(i),n._item!==null;)n=n._item.parent;hb(r._eH,i,t)};class Te{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=lv(),this._dEH=lv(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw An()}clone(){throw An()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){ov(this._eH,t)}observeDeep(t){ov(this._dEH,t)}unobserve(t){cv(this._eH,t)}unobserveDeep(t){cv(this._dEH,t)}toJSON(){}}const wb=(n,t,i)=>{n.doc??Re(),t<0&&(t=n._length+t),i<0&&(i=n._length+i);let r=i-t;const l=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},bb=n=>{n.doc??Re();const t=[];let i=n._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=n._start;for(n.doc??Re();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return Sl(n,(r,l)=>{i.push(t(r,l,n))}),i},AM=n=>{let t=n._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Cb=(n,t)=>{n.doc??Re();const i=ru(n,t);let r=n._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=n.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(n,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Tl(new Uint8Array(y))),l.integrate(n,0);break;case Fr:l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Al(y)),l.integrate(n,0);break;default:if(y instanceof Te)l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new ws(y)),l.integrate(n,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},xb=()=>Vn(`Length exceeded!`),_b=(n,t,i,r)=>{if(i>t._length)throw xb();if(i===0)return t._searchMarker&&ml(t._searchMarker,i,r.length),Uc(n,t,null,r);const l=i,o=ru(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Uc(n,t,l,i)},Tb=(n,t,i,r)=>{if(r===0)return;const l=i,o=r,u=ru(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw xb();t._searchMarker&&ml(t._searchMarker,l,-o+r)},zc=(n,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(n)},Bp=(n,t,i,r)=>{const l=t._map.get(i)||null,o=n.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new Tl(r);break;case Fr:d=new Al(r);break;default:if(r instanceof Te)d=new ws(r);else throw new Error(`Unexpected content type`)}new he(Dt(u,Se(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(n,0)},Lp=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},Ab=n=>{const t={};return n.doc??Re(),n._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},Ob=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted},RM=(n,t)=>{const i={};return n._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},tc=n=>(n.doc??Re(),JD(n._map.entries(),t=>!t[1].deleted));class DM extends iu{}class kr extends Te{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new kr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new kr}clone(){const t=new kr;return t.insert(0,this.toArray().map(i=>i instanceof Te?i.clone():i)),t}get length(){return this.doc??Re(),this._length}_callObserver(t,i){super._callObserver(t,i),au(this,t,new DM(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{_b(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{OM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Cb(this,t)}toArray(){return bb(this)}slice(t=0,i=this.length){return wb(this,t,i)}toJSON(){return this.map(t=>t instanceof Te?t.toJSON():t)}map(t){return Eb(this,t)}forEach(t){Sl(this,t)}[Symbol.iterator](){return AM(this)}_write(t){t.writeTypeRef(e2)}}const MM=n=>new kr;class kM extends iu{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Kr extends Te{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Kr}clone(){const t=new Kr;return this.forEach((i,r)=>{t.set(r,i instanceof Te?i.clone():i)}),t}_callObserver(t,i){au(this,t,new kM(this,t,i))}toJSON(){this.doc??Re();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Te?l.toJSON():l}}),t}get size(){return[...tc(this)].length}keys(){return sd(tc(this),t=>t[0])}values(){return sd(tc(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return sd(tc(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??Re(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Lp(this,t)}has(t){return Ob(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,l){zc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(n2)}}const UM=n=>new Kr,Js=(n,t)=>n===t||typeof n==`object`&&typeof t==`object`&&n&&t&&JR(n,t);class Kd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&Sn(),this.right.content.constructor){case de:this.right.deleted||Qr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const gv=(n,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case de:t.right.deleted||Qr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?ru(t,i):null;if(o){const u=new Kd(o.p.left,o.p,o.index,l);return gv(n,u,i-o.index)}else{const u=new Kd(null,t._start,0,l);return gv(n,u,i)}},Rb=(n,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===de&&Js(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=n.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new he(Dt(o,Se(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new de(d,u));m.integrate(n,0),i.right=m,i.forward()})},Qr=(n,t)=>{const{key:i,value:r}=t;r===null?n.delete(i):n.set(i,r)},Db=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===de&&Js(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Mb=(n,t,i,r)=>{const l=n.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Js(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new he(Dt(o,Se(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new de(d,p)),i.right.integrate(n,0),i.forward()}}return u},rd=(n,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=n.doc,u=o.clientID;Db(i,l);const d=Mb(n,t,i,l),p=r.constructor===String?new Gn(r):r instanceof Te?new ws(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&ml(t._searchMarker,i.index,p.getLength()),m=new he(Dt(u,Se(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(n,0),i.right=m,i.index=y,i.forward(),Rb(n,t,i,d)},yv=(n,t,i,r,l)=>{const o=n.doc,u=o.clientID;Db(i,l);const d=Mb(n,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===de));){if(!i.right.deleted)switch(i.right.content.constructor){case de:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Js(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(n)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new he(Dt(u,Se(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Gn(p)),i.right.integrate(n,0),i.forward()}Rb(n,t,i,d)},kb=(n,t,i,r,l)=>{let o=t;const u=Tn();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===de){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case de:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(n),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Qr(l,g);break}}}t=t.right}return d},zM=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===de){const r=t.content.key;i.has(r)?t.delete(n):i.add(r)}t=t.left}},jM=n=>{let t=0;return $t(n.doc,i=>{let r=n._start,l=n._start,o=Tn();const u=zd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case de:Qr(u,l.content);break;default:t+=kb(i,r,l,o,u),o=zd(u),r=l;break}l=l.right}}),t},NM=n=>{const t=new Set,i=n.doc;for(const[r,l]of n.afterState.entries()){const o=n.beforeState.get(r)||0;l!==o&&gb(n,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===de&&u.constructor!==mn&&t.add(u.parent)})}$t(i,r=>{lb(n,n.deleteSet,l=>{if(l instanceof mn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===de?t.add(o):zM(r,l)});for(const l of t)jM(l)})},mv=(n,t,i)=>{const r=i,l=zd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case ws:case ki:case Gn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},XR(p)||(b.attributes=YR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case ws:case ki:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case Gn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case de:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Js(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Js(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Js(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Js(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Qr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Vr extends Te{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Re(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Vr}clone(){const t=new Vr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new BM(this,t,i);au(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??Re();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Gn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const l=new Kd(null,this._start,0,new Map);for(let o=0;o0)&&rd(r,this,l,d,u.attributes||{})}else u.retain!==void 0?yv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&mv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??Re();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Gn:{const y=o.get(`ychange`);t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case ws:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case de:Er(p,t)&&(g(),Qr(o,p.content));break}p=p.right}g()};return t||i?$t(u,y=>{t&&Hd(y,t),i&&Hd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),rd(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);rd(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,l=>{mv(l,ec(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!1);u.right!==null&&yv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Lp(this,t)}getAttributes(){return Ab(this)}_write(t){t.writeTypeRef(s2)}}const LM=n=>new Vr;class ad{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??Re()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends Te{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof Te?i.clone():i)),t}get length(){return this.doc??Re(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new ad(this,t)}querySelector(t){t=t.toUpperCase();const r=new ad(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ci(new ad(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){au(this,t,new qM(this,i,t))}toString(){return Eb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),Sl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?$t(this.doc,r=>{_b(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const l=t&&t instanceof Te?t._item:t;Uc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return bb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Cb(this,t)}slice(t=0,i=this.length){return wb(this,t,i)}forEach(t){Sl(this,t)}_write(t){t.writeTypeRef(r2)}}const IM=n=>new xi;class $r extends xi{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return QR(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Te?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Lp(this,t)}hasAttribute(t){return Ob(this,t)}getAttributes(t){return t?RM(this,t):Ab(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return Sl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(i2),t.writeKey(this.nodeName)}}const HM=n=>new $r(n.readKey());class qM extends iu{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class jc extends Kr{constructor(t){super(),this.hookName=t}_copy(){return new jc(this.hookName)}clone(){const t=new jc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(a2),t.writeKey(this.hookName)}}const KM=n=>new jc(n.readKey());class Nc extends Vr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Nc}clone(){const t=new Nc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(l2)}}const VM=n=>new Nc;class Ip{constructor(t,i){this.id=t,this.length=i}get deleted(){throw An()}mergeWith(t){return!1}write(t,i,r){throw An()}integrate(t,i){throw An()}}const $M=0;class mn extends Ip{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),pb(t.doc.store,this)}write(t,i){t.writeInfo($M),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Tl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Tl(this.content)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const GM=n=>new Tl(n.readBuf());class vl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new vl(this.len)}splice(t){const i=new vl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Mc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const YM=n=>new vl(n.readLen()),Ub=(n,t)=>new Fr({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Al{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Al(Ub(this.doc.guid,this.opts))}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const FM=n=>new Al(Ub(n.readString(),n.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const QM=n=>new ki(n.readJSON());class de{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new de(this.key,this.value)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const XM=n=>new de(n.readKey(),n.readJSON());class Bc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Bc(this.arr)}splice(t){const i=new Bc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=n.readLen(),i=[];for(let r=0;r{const t=n.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const PM=n=>new Gn(n.readString()),t2=[MM,UM,LM,HM,IM,KM,VM],e2=0,n2=1,s2=2,i2=3,r2=4,a2=5,l2=6;class ws{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new ws(this.type._copy())}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const o2=n=>new ws(t2[n.readTypeRef()](n)),Lc=(n,t,i)=>{const{client:r,clock:l}=t.id,o=new he(Dt(r,l+i),t,Dt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Dt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class he extends Ip{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?FS:0}set marker(t){(this.info&Wh)>0!==t&&(this.info^=Wh)}get marker(){return(this.info&Wh)>0}get keep(){return(this.info&YS)>0}set keep(t){this.keep!==t&&(this.info^=YS)}get countable(){return(this.info&FS)>0}get deleted(){return(this.info&Zh)>0}set deleted(t){this.deleted!==t&&(this.info^=Zh)}markDeleted(){this.info|=Zh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Se(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Se(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Mr&&this.id.client!==this.parent.client&&this.parent.clock>=Se(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=uv(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ps(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===mn||this.right&&this.right.constructor===mn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===he?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===he&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Mr){const r=id(i,this.parent);r.constructor===mn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=uv(t,t.doc.store,Dt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Po(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Mc(t.deleteSet,this.id.client,this.id.clock,this.length),hv(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw Sn();this.content.gc(t),i?pM(t,this,new mn(this.id,this.length)):this.content=new vl(this.length)}write(t,i){const r=i>0?Dt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Yc|(r===null?0:sn)|(l===null?0:ms)|(o===null?0:ul);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=hM(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Mr?(t.writeParentInfo(!1),t.writeLeftID(d)):Sn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const zb=(n,t)=>c2[t&Yc](n),c2=[()=>{Sn()},YM,JM,GM,PM,QM,XM,o2,WM,FM,()=>{Sn()}],u2=10;class xn extends Ip{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){Sn()}write(t,i){t.writeInfo(u2),Mt(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const jb=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},Nb=`__ $YJS$ __`;jb[Nb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);jb[Nb]=!0;const Bb=Math.floor,f2=(n,t)=>nn>t?n:t,Lb=128,gc=127,d2=Number.MAX_SAFE_INTEGER,Ib=()=>new Set,Hb=Array.from,p2=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lwl.encode(n),y2=wl?g2:p2;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);class m2{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const qb=()=>new m2,S2=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(S2(n));let i=0;for(let r=0;r{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Ur=(n,t)=>{for(;t>gc;)Ic(n,Lb|gc&t),t=Bb(t/128);Ic(n,gc&t)},Vd=new Uint8Array(3e4),v2=Vd.length/3,w2=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ur(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=f2(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(h2(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},Vb=(n,t)=>{Ur(n,t.byteLength),C2(n,t)},$b=n=>new Error(n),x2=$b(`Unexpected end of array`),_2=$b(`Integer out of Range`);class T2{constructor(t){this.arr=t,this.pos=0}}const $d=n=>new T2(n),Sv=n=>n.pos!==n.arr.length,A2=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},Gd=n=>A2(n,sl(n)),vv=n=>n.arr[n.pos++],sl=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posd2)throw _2}throw x2},O2=n=>{let t=sl(n);if(t===0)return``;{let i=String.fromCodePoint(vv(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(vv(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},R2=n=>nl.decode(Gd(n)),D2=nl?R2:O2,Hc=Date.now,zr=()=>new Map,Gb=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r};class M2{constructor(){this._observers=zr()}on(t,i){return Gb(this._observers,t,Ib).add(i),i}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hb((this._observers.get(t)||zr()).values()).forEach(r=>r(...i))}destroy(){this._observers=zr()}}class k2{constructor(){this._observers=zr()}on(t,i){Gb(this._observers,t,Ib).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hb((this._observers.get(t)||zr()).values()).forEach(r=>r(...i))}destroy(){this._observers=zr()}}const wv=Symbol(`Equality`),U2=Object.keys,bv=n=>U2(n).length,z2=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),il=(n,t)=>{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[wv]!=null)return n[wv](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;i{const i=Hc();this.getLocalState()!==null&&ld/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&ld<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&N2(this,r,`timeout`)},Bb(ld/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:Hc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),il(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const N2=(n,t,i)=>{const r=[];for(let l=0;l0&&(n.emit(`change`,[{added:[],updated:[],removed:r},i]),n.emit(`update`,[{added:[],updated:[],removed:r},i]))},Ev=(n,t,i=n.states)=>{const r=t.length,l=qb();Ur(l,r);for(let o=0;o{const r=$d(t),l=Hc(),o=[],u=[],d=[],p=[],g=sl(r);for(let m=0;m0||d.length>0||p.length>0)&&n.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&n.emit(`update`,[{added:o,updated:u,removed:p},i])},L2={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},I2=15e3;var H2=class yc extends M2{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return L2[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&av(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Hv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=qb();return Vb(i,t),Kb(i)}applyUpdates(t){if(t.length===0)return;const i=$d(t);for(;Sv(i);){const r=Gd(i);av(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=$d(t);for(;Sv(i);){const r=Gd(i);try{B2(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(yc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},I2),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=Ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(yc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=Ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(yc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof Zs&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof Zs&&(t.status===401||t.status===403)}};const q2=64,K2=64,Cv=120,V2=1500,mc=.3,xv=12e4,$2=`#d0bcff`,nc=[`#FF0055`,`#00FF88`,`#FFEE00`,`#00CCFF`,`#FF6600`,`#00FFCC`,`#FF2299`,`#33FF00`,`#FF00AA`,`#00AAFF`,`#FFAA00`,`#CC00FF`,`#00FF55`,`#FF4400`,`#0066FF`];function G2(n){const t=n.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:q2,rows:K2}}function rl(n){return n.getMap(`territoryCell`)}function Bn(n){return n.getMap(`players`)}function lu(n){return n.getMap(`gameState`)}function Yd(n,t){const i=Bn(n),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function od(n){const t=rl(n),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function Y2(n,t){let i=0;return n.forEach(r=>{r.owner===t&&i++}),i}function F2(n,t,i,r,l){const o=new Set;t.forEach((g,m)=>{g.owner===n&&o.add(m)});const u=new Set,d=[];for(let g=0;g0;){const{x:g,y:m}=d.pop();for(const[y,v]of[[0,-1],[0,1],[-1,0],[1,0]]){const b=g+y,w=m+v;if(b<0||b>=i||w<0||w>=r)continue;const E=`${b},${w}`;o.has(E)||u.has(E)||(u.add(E),d.push({x:b,y:w}))}}const p=[];for(let g=0;gA.x===y&&A.y===v);if(w){const[A,V]=w,I=p+V2,H=Bn(n);return H.set(A,{...V,stunnedUntil:I}),H.set(t,{x:r.x,y:r.y,name:i,stunnedUntil:I}),{moved:!1,stunned:!0,x:r.x,y:r.y,stunnedUntil:I}}Bn(n).set(t,{x:y,y:v,name:i});const T=rl(n),N=Date.now();n.transact(()=>{T.set(`${y},${v}`,{owner:t,claimedAt:N})});const M=new Set([t]);Yd(n,t).forEach((A,V)=>M.add(V));const R=F2(t,T,o,u);return R.length>0&&n.transact(()=>{for(const A of R)T.set(`${A.x},${A.y}`,{owner:t,claimedAt:N})}),{moved:!0,stunned:!1,x:y,y:v,stunnedUntil:0}}function _v(n){const t=lu(n);t.has(`gameStartedAt`)||n.transact(()=>{t.has(`gameStartedAt`)||t.set(`gameStartedAt`,Date.now())})}function J2(n){const i=lu(n).get(`gameStartedAt`);return i!==void 0?i:null}function cd(n){const i=lu(n).get(`gameEndedAt`);return i!==void 0?i:null}function Tv(n){const t=lu(n);(!t.has(`gameEndedAt`)||t.get(`gameEndedAt`)===null)&&n.transact(()=>{t.set(`gameEndedAt`,Date.now())})}function Hp(n){const t=new Map;return n.forEach(i=>{t.set(i.owner,(t.get(i.owner)||0)+1)}),t}function Av(n,t,i){const r=Hp(n),l=mc*t;for(const[o,u]of r)if(u>=l){const d=i.get(o);if(d)return{name:d.name,pct:Math.round(u/t*100)}}return null}function Ov(n,t,i){const r=Hp(n);let l=0,o=``;if(r.forEach((d,p)=>{d>l&&(l=d,o=p)}),!o||l===0)return null;const u=i.get(o);return u?{name:u.name,pct:Math.round(l/t*100)}:null}const Yb=J.createContext(null);function Z2(){const n=J.useContext(Yb);if(!n)throw new Error(`useGameRoom must be used within GameRoom`);return n}function W2(n,t){return _w({streamOptions:{url:n,headers:t,contentType:`application/json`},state:$S,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify($S.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Rv=J.createContext(null);function P2({roomId:n,children:t}){const{dsEndpoint:i,dsHeaders:r}=Qd(),[l,o]=J.useState(null),[u,d]=J.useState(null);return J.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(n)}`,w=await new Ln({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:`application/json`}),p=await W2(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[n,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(Rv.Provider,{value:{scoresDB:l},children:t}):F.jsx(Rv.Provider,{value:null,children:t})}const tk=1,vr=8,Dv=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function ek(n,t){return n>256||t>256?2:n>64||t>64?4:14}function nk({onLeave:n}){const{doc:t,awareness:i,roomId:r,playerId:l,playerName:o,playerColor:u}=Z2(),{cols:d,rows:p}=J.useMemo(()=>G2(r),[r]),g=d*p,m=J.useMemo(()=>ek(d,p),[d,p]),y=d<=100&&p<=100,[v,b]=J.useState(new Map),[w,E]=J.useState(new Map),[T,N]=J.useState({x:0,y:0}),[M,R]=J.useState(1),[A,V]=J.useState(!1),[I,H]=J.useState(!1),[W,tt]=J.useState(null),[X,at]=J.useState(xv/1e3),nt=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),wt=J.useRef(void 0),Lt=J.useRef(null),dt=J.useRef({x:0,y:0,stunnedUntil:0}),k=J.useMemo(()=>Y2(v,l)*tk,[v,l]),q=J.useMemo(()=>Math.round(k/g*100),[k,g]),Z=J.useMemo(()=>Hp(v),[v]),st=J.useMemo(()=>{let et=0,P=``;if(Z.forEach((St,Xt)=>{St>et&&(et=St,P=Xt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const ft=w.get(P);return ft?{name:ft.name,pct:pt}:null},[Z,g,l,o,w]);J.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);dt.current={x:et,y:P,stunnedUntil:0},N({x:et,y:P});const pt=Bn(t);pt.set(l,{x:et,y:P,name:o});const ft=rl(t);return t.transact(()=>{ft.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),_v(t),()=>{pt.delete(l)}},[t,l,o,u,d,p]),J.useEffect(()=>{const et=rl(t),P=()=>{const pt=od(t);if(b(pt),cd(t)!==null)return;const ft=Av(pt,g,Bn(t));ft&&(tt(ft),Tv(t))};return et.observe(P),P(),()=>et.unobserve(P)},[t,g]),J.useEffect(()=>{const et=()=>{const pt=J2(t);if(!pt)return;const ft=Date.now()-pt,St=Math.max(0,xv-ft);at(Math.ceil(St/1e3));const Xt=cd(t)!==null;if(St<=0&&!Xt){const je=od(t),Ft=Ov(je,g,Bn(t));tt(Ft||{name:`Nobody`,pct:0}),Tv(t)}else Xt&&tt(je=>{if(je)return je;const Ft=od(t),Dn=Av(Ft,g,Bn(t));return Dn||(Ov(Ft,g,Bn(t))??{name:`Nobody`,pct:0})})},P=setInterval(et,1e3);return et(),()=>clearInterval(P)},[t,g]),J.useEffect(()=>{const et=Bn(t),P=()=>{E(Yd(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),J.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((St,Xt)=>{if(Xt!==i.clientID){St.playerId&&P.add(St.playerId);const je=St.user?.name;je&&pt.add(je)}}),R(St=>{const Xt=pt.size;return St===Xt?St:Xt});const ft=Bn(t);ft.forEach((St,Xt)=>{Xt!==l&&!P.has(Xt)&&ft.delete(Xt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,l,o]),J.useEffect(()=>{const et=new Set,P=ft=>{if(ft.key in wr){ft.preventDefault();const St=!Lt.current;et.add(ft.key),Lt.current=wr[ft.key],St&&xt.current?.(wr[ft.key])}},pt=ft=>{if(et.delete(ft.key),ft.key in wr){let St=!1;for(const Xt of et)if(Xt in wr){Lt.current=wr[Xt],St=!0;break}St||(Lt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,pt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,pt)}},[]);const ut=J.useRef(null),_=J.useRef(null),L=J.useRef(0),Y=10,Q=J.useCallback((et,P)=>{const pt=Date.now();if(pt-L.currentMath.abs(bs)?xt.current?.({dx:Ui>0?1:-1,dy:0}):xt.current?.({dx:0,dy:bs>0?1:-1}),L.current=pt)},[m]),ot=J.useCallback(et=>{et.preventDefault();const P=et.touches[0];_.current={x:P.clientX,y:P.clientY},Q(P.clientX,P.clientY)},[Q]),it=J.useCallback(et=>{if(et.preventDefault(),!_.current)return;const P=et.touches[0],pt=P.clientX-_.current.x,ft=P.clientY-_.current.y;Math.abs(pt){_.current=null},[]),xt=J.useRef(void 0),bt=J.useCallback(et=>{const P=ut.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const ft=P.getScreenCTM();if(!ft)return;const St=pt.matrixTransform(ft.inverse()),Xt=St.x/m-.5,je=St.y/m-.5,Ft=dt.current,Dn=Xt-Ft.x,Mn=je-Ft.y;Dn===0&&Mn===0||(Math.abs(Dn)>Math.abs(Mn)?xt.current?.({dx:Dn>0?1:-1,dy:0}):xt.current?.({dx:0,dy:Mn>0?1:-1}))},[m]),$e=J.useCallback(()=>{n()},[n]);J.useEffect(()=>{const et=pt=>{if(cd(t)!==null)return;const ft=dt.current,St=X2(t,l,o,{x:ft.x,y:ft.y},pt,d,p,ft.stunnedUntil);ft.stunnedUntil=St.stunnedUntil,St.moved&&(ft.x=St.x,ft.y=St.y,N({x:St.x,y:St.y}),i.setLocalState({...i.getLocalState(),x:St.x,y:St.y}))};xt.current=et;const P=setInterval(()=>{const pt=Lt.current;pt&&et(pt)},Cv);return()=>clearInterval(P)},[t,l,o,u,d,p,i]);const Ge=d*m,Fn=p*m,Xr=J.useCallback(()=>{navigator.clipboard.writeText(nt).catch(()=>{}),V(!0),clearTimeout(wt.current),wt.current=setTimeout(()=>V(!1),1200)},[nt]);J.useEffect(()=>()=>clearTimeout(wt.current),[]);const wn=J.useMemo(()=>y?F.jsxs(F.Fragment,{children:[Array.from({length:d},(et,P)=>F.jsx(`line`,{x1:P*m,y1:0,x2:P*m,y2:Fn,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>F.jsx(`line`,{x1:0,y1:P*m,x2:Ge,y2:P*m,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}):null,[d,p,Ge,Fn,m,y]),ei=J.useMemo(()=>{const et=new Map;et.set(l,u);const P=[...w.keys()].sort();for(let pt=0;pt{const P=Math.floor(et/60),pt=et%60;return`${P}:${pt.toString().padStart(2,`0`)}`};return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:vr},children:[F.jsx(`button`,{onClick:$e,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:vr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:Xr,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Vt.accent},children:o}),F.jsx(`span`,{style:{color:Vt.dim},children:`@`}),F.jsx(`span`,{style:{color:A?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:A?`COPIED`:nt})]}),F.jsx(`span`,{style:{color:X<=30?`#FF3D71`:Vt.accent,fontVariantNumeric:`tabular-nums`},children:Jr(X)}),F.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onClick:()=>H(et=>!et),children:[M,` PLAYERS`,I&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o},...Array.from(w.entries()).map(([et,P])=>({id:et,name:P.name}))].map(et=>{const P=ei.get(et.id)??nc[0],pt=Z.get(et.id)||0,ft=Math.round(pt/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:P,display:`inline-block`}}),et.name]}),F.jsxs(`span`,{style:{color:Vt.accent},children:[ft,`%`]})]},et.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:vr},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[q,`%`]}),` `,F.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:st?4:0,color:st&&st.pct>=Math.round(mc*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(mc*100),`%`]}),st&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Vt.dim},children:st.name}),` `,F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[st.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:ut,viewBox:`0 0 ${Ge} ${Fn}`,onTouchStart:ot,onTouchMove:it,onTouchEnd:vt,onClick:bt,style:{width:`min(100%, calc(100dvh - 140px))`,maxWidth:Ge,height:`auto`,aspectRatio:`${d} / ${p}`,background:Vt.grid,border:`1px solid ${Vt.border}`,flexShrink:0,userSelect:`none`,WebkitUserSelect:`none`},children:[wn,Array.from(v.entries()).map(([et,P])=>{const[pt,ft]=et.split(`,`).map(Number),St=ei.get(P.owner)||Vt.accent;return F.jsx(`rect`,{x:pt*m,y:ft*m,width:m,height:m,fill:St,opacity:.5},et)}),Array.from(w.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=dt.current.stunnedUntil>0&&Date.now(){const et=rl(t),P=t.getMap(`gameState`);t.transact(()=>{Array.from(et.keys()).forEach(ft=>et.delete(ft)),P.delete(`gameStartedAt`),P.delete(`gameEndedAt`)}),tt(null),_v(t)},style:{fontFamily:`inherit`,fontSize:vr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),F.jsx(`button`,{onClick:$e,style:{fontFamily:`inherit`,fontSize:vr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}function sk({roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:l}){const{registryDB:o}=Aw(),[{playerId:u,doc:d,awareness:p}]=J.useState(()=>{const M=`player-${Math.random().toString(36).slice(2,10)}`,R=new Fr,A=new j2(R);return A.setLocalState({user:{name:r},playerId:M,type:`human`}),{playerId:M,doc:R,awareness:A}}),g=$2,[m,y]=J.useState(!0),[v,b]=J.useState(!1),[w,E]=J.useState(null),T=J.useRef(null);J.useEffect(()=>{const M=new H2({doc:d,baseUrl:t,docId:n,awareness:p,headers:i,connect:!1});return M.on(`synced`,R=>{b(R),R&&y(!1)}),M.on(`status`,R=>{R===`connected`&&y(!1)}),M.on(`error`,R=>{E(R),y(!1)}),p.getLocalState()===null&&p.setLocalState({user:{name:r},playerId:u,type:`human`}),T.current=M,M.connect(),()=>{M.destroy(),T.current=null}},[n,d,p,t,i,r,u]),J.useEffect(()=>{const R=setInterval(()=>{const A=new Set([u]);if(p.getStates().forEach(H=>{H.playerId&&A.add(H.playerId)}),[...A].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(H=>H.roomId===n);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+mp*1e3})}catch{}},QO);return()=>clearInterval(R)},[p,o,n,u]),J.useEffect(()=>()=>{d.destroy()},[d]);const N=J.useMemo(()=>({doc:d,awareness:p,roomId:n,playerId:u,playerName:r,playerColor:g,isSynced:v,isLoading:m}),[d,p,n,u,r,g,v,m]);return w?F.jsxs(`div`,{style:ud.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ud.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ud.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(Yb.Provider,{value:N,children:F.jsx(P2,{roomId:n,children:F.jsx(nk,{onLeave:l})})})}const ud={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},Mv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],kv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function ik(){const n=Mv[Math.floor(Math.random()*Mv.length)],t=kv[Math.floor(Math.random()*kv.length)];return`${n} ${t}`}function rk(){return localStorage.getItem(`territory-player-name`)||ik()}function ak(){const[n,t]=J.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return J.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),n}function lk(){const n=ak(),{yjsEndpoint:t,yjsHeaders:i}=Qd(),[r,l]=J.useState(rk),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return n?F.jsx(sk,{roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(nR,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function ok(){return F.jsx(xC,{children:F.jsx(PO,{children:F.jsx(lk,{})})})}EC.createRoot(document.getElementById(`root`)).render(F.jsx(ok,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index c3a79d32da..60204d4c17 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +
From b523b79c640b4bd3329e17d3e31deb00d0f992aa Mon Sep 17 00:00:00 2001 From: Valter Balegas Date: Thu, 2 Apr 2026 02:29:16 +0100 Subject: [PATCH 36/36] chore: update territory wars demo bundle - Slower move speed (200ms), leader blink, bots never freeze Co-Authored-By: Claude Opus 4.6 (1M context) --- .../territory-wars/assets/index-CJXmzTYg.js | 44 +++++++++++++++++++ .../territory-wars/assets/index-CYvUTm66.js | 42 ------------------ .../public/demos/territory-wars/index.html | 2 +- 3 files changed, 45 insertions(+), 43 deletions(-) create mode 100644 website/public/demos/territory-wars/assets/index-CJXmzTYg.js delete mode 100644 website/public/demos/territory-wars/assets/index-CYvUTm66.js diff --git a/website/public/demos/territory-wars/assets/index-CJXmzTYg.js b/website/public/demos/territory-wars/assets/index-CJXmzTYg.js new file mode 100644 index 0000000000..06ced2270e --- /dev/null +++ b/website/public/demos/territory-wars/assets/index-CJXmzTYg.js @@ -0,0 +1,44 @@ +(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function fC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,`default`)?n.default:n}var xh={exports:{}},Ga={};var H0;function hC(){if(H0)return Ga;H0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Ga.Fragment=t,Ga.jsx=i,Ga.jsxs=i,Ga}var q0;function dC(){return q0||(q0=1,xh.exports=hC()),xh.exports}var F=dC(),_h={exports:{}},Ya={},Th={exports:{}},Ah={};var K0;function pC(){return K0||(K0=1,(function(n){function t(k,I){var Z=k.length;k.push(I);t:for(;0>>1,ft=k[it];if(0>>1;itl(Y,Z))Ql(ot,Y)?(k[it]=ot,k[Q]=Z,it=Q):(k[it]=Y,k[B]=Z,it=B);else if(Ql(ot,Z))k[it]=ot,k[Q]=Z,it=Q;else break t}}return I}function l(k,I){var Z=k.sortIndex-I.sortIndex;return Z!==0?Z:k.id-I.id}if(n.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var p=[],g=[],y=1,m=null,v=3,w=!1,b=!1,E=!1,_=!1,j=typeof setTimeout==`function`?setTimeout:null,O=typeof clearTimeout==`function`?clearTimeout:null,A=typeof setImmediate<`u`?setImmediate:null;function M(k){for(var I=i(g);I!==null;){if(I.callback===null)r(g);else if(I.startTime<=k)r(g),I.sortIndex=I.expirationTime,t(p,I);else break;I=i(g)}}function G(k){if(E=!1,M(k),!b)if(i(p)!==null)b=!0,q||(q=!0,nt());else{var I=i(g);I!==null&&dt(G,I.startTime-k)}}var q=!1,K=-1,W=5,et=-1;function X(){return _?!0:!(n.unstable_now()-etk&&X());){var it=m.callback;if(typeof it==`function`){m.callback=null,v=m.priorityLevel;var ft=it(m.expirationTime<=k);if(k=n.unstable_now(),typeof ft==`function`){m.callback=ft,M(k),I=!0;break e}m===i(p)&&r(p),M(k)}else r(p);m=i(p)}if(m!==null)I=!0;else{var T=i(g);T!==null&&dt(G,T.startTime-k),I=!1}}break t}finally{m=null,v=Z,w=!1}I=void 0}}finally{I?nt():q=!1}}}var nt;if(typeof A==`function`)nt=function(){A(at)};else if(typeof MessageChannel<`u`){var bt=new MessageChannel,Lt=bt.port2;bt.port1.onmessage=at,nt=function(){Lt.postMessage(null)}}else nt=function(){j(at,0)};function dt(k,I){K=j(function(){k(n.unstable_now())},I)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125it?(k.sortIndex=Z,t(g,k),i(p)===null&&k===i(g)&&(E?(O(K),K=-1):E=!0,dt(G,Z-it))):(k.sortIndex=ft,t(p,k),b||w||(b=!0,q||(q=!0,nt()))),k},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(k){var I=v;return function(){var Z=v;v=I;try{return k.apply(this,arguments)}finally{v=Z}}}})(Ah)),Ah}var V0;function gC(){return V0||(V0=1,Th.exports=pC()),Th.exports}var Oh={exports:{}},yt={};var $0;function yC(){if($0)return yt;$0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),y=Symbol.for(`react.lazy`),m=Symbol.for(`react.activity`),v=Symbol.iterator;function w(T){return T===null||typeof T!=`object`?null:(T=v&&T[v]||T[`@@iterator`],typeof T==`function`?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function j(T,B,Y){this.props=T,this.context=B,this.refs=_,this.updater=Y||b}j.prototype.isReactComponent={},j.prototype.setState=function(T,B){if(typeof T!=`object`&&typeof T!=`function`&&T!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,T,B,`setState`)},j.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,`forceUpdate`)};function O(){}O.prototype=j.prototype;function A(T,B,Y){this.props=T,this.context=B,this.refs=_,this.updater=Y||b}var M=A.prototype=new O;M.constructor=A,E(M,j.prototype),M.isPureReactComponent=!0;var G=Array.isArray;function q(){}var K={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function et(T,B,Y){var Q=Y.ref;return{$$typeof:n,type:T,key:B,ref:Q!==void 0?Q:null,props:Y}}function X(T,B){return et(T.type,B,T.props)}function at(T){return typeof T==`object`&&T!==null&&T.$$typeof===n}function nt(T){var B={"=":`=0`,":":`=2`};return`$`+T.replace(/[=:]/g,function(Y){return B[Y]})}var bt=/\/+/g;function Lt(T,B){return typeof T==`object`&&T!==null&&T.key!=null?nt(``+T.key):B.toString(36)}function dt(T){switch(T.status){case`fulfilled`:return T.value;case`rejected`:throw T.reason;default:switch(typeof T.status==`string`?T.then(q,q):(T.status=`pending`,T.then(function(B){T.status===`pending`&&(T.status=`fulfilled`,T.value=B)},function(B){T.status===`pending`&&(T.status=`rejected`,T.reason=B)})),T.status){case`fulfilled`:return T.value;case`rejected`:throw T.reason}}throw T}function k(T,B,Y,Q,ot){var st=typeof T;(st===`undefined`||st===`boolean`)&&(T=null);var mt=!1;if(T===null)mt=!0;else switch(st){case`bigint`:case`string`:case`number`:mt=!0;break;case`object`:switch(T.$$typeof){case n:case t:mt=!0;break;case y:return mt=T._init,k(mt(T._payload),B,Y,Q,ot)}}if(mt)return ot=ot(T),mt=Q===``?`.`+Lt(T,0):Q,G(ot)?(Y=``,mt!=null&&(Y=mt.replace(bt,`$&/`)+`/`),k(ot,B,Y,``,function(an){return an})):ot!=null&&(at(ot)&&(ot=X(ot,Y+(ot.key==null||T&&T.key===ot.key?``:(``+ot.key).replace(bt,`$&/`)+`/`)+mt)),B.push(ot)),1;mt=0;var Ut=Q===``?`.`:Q+`:`;if(G(T))for(var wt=0;wt`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Rh.exports=mC(),Rh.exports}var Q0;function vC(){if(Q0)return Ya;Q0=1;var n=gC(),t=Jd(),i=SC();function r(e){var s=`https://react.dev/errors/`+e;if(1ft||(e.current=it[ft],it[ft]=null,ft--)}function Y(e,s){ft++,it[ft]=e.current,e.current=s}var Q=T(null),ot=T(null),st=T(null),mt=T(null);function Ut(e,s){switch(Y(st,s),Y(ot,e),Y(Q,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=c0(s),e=u0(s,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(Q),Y(Q,e)}function wt(){B(Q),B(ot),B(st)}function an(e){e.memoizedState!==null&&Y(mt,e);var s=Q.current,a=u0(s,e.type);s!==a&&(Y(ot,e),Y(Q,a))}function $e(e){ot.current===e&&(B(Q),B(ot)),mt.current===e&&(B(mt),qa._currentValue=Z)}var Ps,ki;function Te(e){if(Ps===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Ps=s&&s[1]||``,ki=-1)`:-1f||x[c]!==z[f]){var H=` +`+x[c].replace(` at new `,` at `);return e.displayName&&H.includes(``)&&(H=H.replace(``,e.displayName)),H}while(1<=c&&0<=f);break}}}finally{ti=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?Te(a):``}function uu(e,s){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te(`Lazy`);case 13:return e.child!==s&&s!==null?Te(`Suspense Fallback`):Te(`Suspense`);case 19:return Te(`SuspenseList`);case 0:case 15:return Jr(e.type,!1);case 11:return Jr(e.type.render,!1);case 1:return Jr(e.type,!0);case 31:return Te(`Activity`);default:return``}}function Ui(e){try{var s=``,a=null;do s+=uu(e,a),a=e,e=e.return;while(e);return s}catch(c){return` +Error generating stack: `+c.message+` +`+c.stack}}var Zr=Object.prototype.hasOwnProperty,tt=n.unstable_scheduleCallback,P=n.unstable_cancelCallback,gt=n.unstable_shouldYield,pt=n.unstable_requestPaint,ht=n.unstable_now,Qt=n.unstable_getCurrentPriorityLevel,De=n.unstable_ImmediatePriority,Ge=n.unstable_UserBlockingPriority,Ye=n.unstable_NormalPriority,Gn=n.unstable_LowPriority,zi=n.unstable_IdlePriority,Wr=n.log,Qw=n.unstable_setDisableYieldValue,Pr=null,Fe=null;function vs(e){if(typeof Wr==`function`&&Qw(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pr,e)}catch{}}var Qe=Math.clz32?Math.clz32:Zw,Xw=Math.log,Jw=Math.LN2;function Zw(e){return e>>>=0,e===0?32:31-(Xw(e)/Jw|0)|0}var Dl=256,Ml=262144,kl=4194304;function ei(e){var s=e&42;if(s!==0)return s;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ul(e,s,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ei(c):(S&=C,S!==0?f=ei(S):a||(a=C&~e,a!==0&&(f=ei(a))))):(C=c&~h,C!==0?f=ei(C):S!==0?f=ei(S):a||(a=c&~e,a!==0&&(f=ei(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function ta(e,s){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&s)===0}function Ww(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $p(){var e=kl;return kl<<=1,(kl&62914560)===0&&(kl=4194304),e}function fu(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function ea(e,s){e.pendingLanes|=s,s!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pw(e,s,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,z=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var rE=/[\n"\\]/g;function on(e){return e.replace(rE,function(s){return`\\`+s.charCodeAt(0).toString(16)+` `})}function mu(e,s,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),s!=null?S===`number`?(s===0&&e.value===``||e.value!=s)&&(e.value=``+ln(s)):e.value!==``+ln(s)&&(e.value=``+ln(s)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),s!=null?Su(e,S,ln(s)):a!=null?Su(e,S,ln(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+ln(C):e.removeAttribute(`name`)}function sg(e,s,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),s!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||s!=null)){yu(e);return}a=a!=null?``+ln(a):``,s=s!=null?``+ln(s):a,C||s===e.value||(e.value=s),e.defaultValue=s}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),yu(e)}function Su(e,s,a){s===`number`&&jl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Hi(e,s,a,c){if(e=e.options,s){s={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),Cu=!1;if(Qn)try{var ra={};Object.defineProperty(ra,`passive`,{get:function(){Cu=!0}}),window.addEventListener(`test`,ra,ra),window.removeEventListener(`test`,ra,ra)}catch{Cu=!1}var ws=null,xu=null,Ll=null;function ug(){if(Ll)return Ll;var e,s=xu,a=s.length,c,f=`value`in ws?ws.value:ws.textContent,h=f.length;for(e=0;e=oa),yg=` `,mg=!1;function Sg(e,s){switch(e){case`keyup`:return UE.indexOf(s.keyCode)!==-1;case`keydown`:return s.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function vg(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $i=!1;function NE(e,s){switch(e){case`compositionend`:return vg(s);case`keypress`:return s.which!==32?null:(mg=!0,yg);case`textInput`:return e=s.data,e===yg&&mg?null:e;default:return null}}function jE(e,s){if($i)return e===`compositionend`||!Ru&&Sg(e,s)?(e=ug(),Ll=xu=ws=null,$i=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=Ag(a)}}function Rg(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?Rg(e,s.parentNode):`contains`in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=jl(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==`string`}catch{a=!1}if(a)e=s.contentWindow;else break;s=jl(e.document)}return s}function ku(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||s===`textarea`||e.contentEditable===`true`)}var $E=Qn&&`documentMode`in document&&11>=document.documentMode,Gi=null,Uu=null,ha=null,zu=!1;function Mg(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;zu||Gi==null||Gi!==jl(c)||(c=Gi,`selectionStart`in c&&ku(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ha&&fa(ha,c)||(ha=c,c=ko(Uu,`onSelect`),0>=S,f-=S,Mn=1<<32-Qe(s)+f|a<vt?(_t=lt,lt=null):_t=lt.sibling;var kt=N(D,lt,U[vt],V);if(kt===null){lt===null&&(lt=_t);break}e&<&&kt.alternate===null&&s(D,lt),R=h(kt,R,vt),Mt===null?ct=kt:Mt.sibling=kt,Mt=kt,lt=_t}if(vt===U.length)return a(D,lt),At&&Jn(D,vt),ct;if(lt===null){for(;vtvt?(_t=lt,lt=null):_t=lt.sibling;var Vs=N(D,lt,kt.value,V);if(Vs===null){lt===null&&(lt=_t);break}e&<&&Vs.alternate===null&&s(D,lt),R=h(Vs,R,vt),Mt===null?ct=Vs:Mt.sibling=Vs,Mt=Vs,lt=_t}if(kt.done)return a(D,lt),At&&Jn(D,vt),ct;if(lt===null){for(;!kt.done;vt++,kt=U.next())kt=$(D,kt.value,V),kt!==null&&(R=h(kt,R,vt),Mt===null?ct=kt:Mt.sibling=kt,Mt=kt);return At&&Jn(D,vt),ct}for(lt=c(lt);!kt.done;vt++,kt=U.next())kt=L(lt,D,vt,kt.value,V),kt!==null&&(e&&kt.alternate!==null&<.delete(kt.key===null?vt:kt.key),R=h(kt,R,vt),Mt===null?ct=kt:Mt.sibling=kt,Mt=kt);return e&<.forEach(function(uC){return s(D,uC)}),At&&Jn(D,vt),ct}function qt(D,R,U,V){if(typeof U==`object`&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U==`object`&&U!==null){switch(U.$$typeof){case w:t:{for(var ct=U.key;R!==null;){if(R.key===ct){if(ct=U.type,ct===E){if(R.tag===7){a(D,R.sibling),V=f(R,U.props.children),V.return=D,D=V;break t}}else if(R.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===W&&hi(ct)===R.type){a(D,R.sibling),V=f(R,U.props),Sa(V,U),V.return=D,D=V;break t}a(D,R);break}else s(D,R);R=R.sibling}U.type===E?(V=li(U.props.children,D.mode,V,U.key),V.return=D,D=V):(V=Ql(U.type,U.key,U.props,null,D.mode,V),Sa(V,U),V.return=D,D=V)}return S(D);case b:t:{for(ct=U.key;R!==null;){if(R.key===ct)if(R.tag===4&&R.stateNode.containerInfo===U.containerInfo&&R.stateNode.implementation===U.implementation){a(D,R.sibling),V=f(R,U.children||[]),V.return=D,D=V;break t}else{a(D,R);break}else s(D,R);R=R.sibling}V=qu(U,D.mode,V),V.return=D,D=V}return S(D);case W:return U=hi(U),qt(D,R,U,V)}if(dt(U))return rt(D,R,U,V);if(nt(U)){if(ct=nt(U),typeof ct!=`function`)throw Error(r(150));return U=ct.call(U),ut(D,R,U,V)}if(typeof U.then==`function`)return qt(D,R,eo(U),V);if(U.$$typeof===A)return qt(D,R,Zl(D,U),V);no(D,U)}return typeof U==`string`&&U!==``||typeof U==`number`||typeof U==`bigint`?(U=``+U,R!==null&&R.tag===6?(a(D,R.sibling),V=f(R,U),V.return=D,D=V):(a(D,R),V=Hu(U,D.mode,V),V.return=D,D=V),S(D)):a(D,R)}return function(D,R,U,V){try{ma=0;var ct=qt(D,R,U,V);return nr=null,ct}catch(lt){if(lt===er||lt===Pl)throw lt;var Mt=Je(29,lt,null,D.mode);return Mt.lanes=V,Mt.return=D,Mt}}}var pi=ty(!0),ey=ty(!1),Ts=!1;function Pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tf(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function As(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Os(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(zt&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=Fl(e),Lg(e,null,a),s}return Yl(e,c,s,a),Fl(e)}function va(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Yp(e,a)}}function ef(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var nf=!1;function ba(){if(nf){var e=tr;if(e!==null)throw e}}function wa(e,s,a,c){nf=!1;var f=e.updateQueue;Ts=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,z=x.next;x.next=null,S===null?h=z:S.next=z,S=x;var H=e.alternate;H!==null&&(H=H.updateQueue,C=H.lastBaseUpdate,C!==S&&(C===null?H.firstBaseUpdate=z:C.next=z,H.lastBaseUpdate=x))}if(h!==null){var $=f.baseState;S=0,H=z=x=null,C=h;do{var N=C.lane&-536870913,L=N!==C.lane;if(L?(xt&N)===N:(c&N)===N){N!==0&&N===Pi&&(nf=!0),H!==null&&(H=H.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ut=C;N=s;var qt=a;switch(ut.tag){case 1:if(rt=ut.payload,typeof rt==`function`){$=rt.call(qt,$,N);break t}$=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ut.payload,N=typeof rt==`function`?rt.call(qt,$,N):rt,N==null)break t;$=m({},$,N);break t;case 2:Ts=!0}}N=C.callback,N!==null&&(e.flags|=64,L&&(e.flags|=8192),L=f.callbacks,L===null?f.callbacks=[N]:L.push(N))}else L={lane:N,tag:C.tag,payload:C.payload,callback:C.callback,next:null},H===null?(z=H=L,x=$):H=H.next=L,S|=N;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;L=C,C=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}}while(!0);H===null&&(x=$),f.baseState=x,f.firstBaseUpdate=z,f.lastBaseUpdate=H,h===null&&(f.shared.lanes=0),Us|=S,e.lanes=S,e.memoizedState=$}}function ny(e,s){if(typeof e!=`function`)throw Error(r(191,e));e.call(s)}function sy(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=k.T,C={};k.T=C,Ef(e,!1,s,a);try{var x=f(),z=k.S;if(z!==null&&z(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var H=PE(x,c);xa(e,s,H,en(e))}else xa(e,s,c,en(e))}catch($){xa(e,s,{then:function(){},status:`rejected`,reason:$},en())}finally{I.p=h,S!==null&&C.types!==null&&(S.types=C.types),k.T=S}}function r1(){}function bf(e,s,a,c){if(e.tag!==5)throw Error(r(476));var f=Ny(e).queue;zy(e,f,s,Z,a===null?r1:function(){return jy(e),a(c)})}function Ny(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:Z},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&&(e.memoizedState=s),s}function jy(e){var s=Ny(e);s.next===null&&(s=e.alternate.memoizedState),xa(e,s.next.queue,{},en())}function wf(){return Ee(qa)}function By(){return te().memoizedState}function Ly(){return te().memoizedState}function a1(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=en();e=As(a);var c=Os(s,e,a);c!==null&&(Ke(c,s,a),va(c,s,a)),s={cache:Xu()},e.payload=s;return}s=s.return}}function l1(e,s,a){var c=en();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ho(e)?Hy(s,a):(a=Lu(e,s,a,c),a!==null&&(Ke(a,e,c),qy(a,s,c)))}function Iy(e,s,a){var c=en();xa(e,s,a,c)}function xa(e,s,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ho(e))Hy(s,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var S=s.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,Xe(C,S))return Yl(e,s,f,0),Kt===null&&Gl(),!1}catch{}if(a=Lu(e,s,f,c),a!==null)return Ke(a,e,c),qy(a,s,c),!0}return!1}function Ef(e,s,a,c){if(c={lane:2,revertLane:th(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},ho(e)){if(s)throw Error(r(479))}else s=Lu(e,a,c,2),s!==null&&Ke(s,e,2)}function ho(e){var s=e.alternate;return e===St||s!==null&&s===St}function Hy(e,s){ir=ro=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function qy(e,s,a){if((a&4194048)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Yp(e,a)}}var _a={readContext:Ee,use:oo,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};_a.useEffectEvent=Xt;var Ky={readContext:Ee,use:oo,useCallback:function(e,s){return Me().memoizedState=[e,s===void 0?null:s],e},useContext:Ee,useEffect:_y,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,uo(4194308,4,Ry.bind(null,s,e),a)},useLayoutEffect:function(e,s){return uo(4194308,4,e,s)},useInsertionEffect:function(e,s){uo(4,2,e,s)},useMemo:function(e,s){var a=Me();s=s===void 0?null:s;var c=e();if(gi){vs(!0);try{e()}finally{vs(!1)}}return a.memoizedState=[c,s],c},useReducer:function(e,s,a){var c=Me();if(a!==void 0){var f=a(s);if(gi){vs(!0);try{a(s)}finally{vs(!1)}}}else f=s;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=l1.bind(null,St,e),[c.memoizedState,e]},useRef:function(e){var s=Me();return e={current:e},s.memoizedState=e},useState:function(e){e=gf(e);var s=e.queue,a=Iy.bind(null,St,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:Sf,useDeferredValue:function(e,s){var a=Me();return vf(a,e,s)},useTransition:function(){var e=gf(!1);return e=zy.bind(null,St,e.queue,!0,!1),Me().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var c=St,f=Me();if(At){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),Kt===null)throw Error(r(349));(xt&127)!==0||cy(c,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,_y(fy.bind(null,c,h,e),[e]),c.flags|=2048,ar(9,{destroy:void 0},uy.bind(null,c,h,a,s),null),a},useId:function(){var e=Me(),s=Kt.identifierPrefix;if(At){var a=kn,c=Mn;a=(c&~(1<<32-Qe(c)-1)).toString(32)+a,s=`_`+s+`R_`+a,a=ao++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[be]=s,h[je]=c;t:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break t;for(;S.sibling===null;){if(S.return===null||S.return===s)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=h;t:switch(xe(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&ns(s)}}return Yt(s),jf(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&&s.stateNode!=null)e.memoizedProps!==c&&ns(s);else{if(typeof c!=`string`&&s.stateNode===null)throw Error(r(166));if(e=st.current,Zi(s)){if(e=s.stateNode,a=s.memoizedProps,c=null,f=we,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[be]=s,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||l0(e.nodeValue,a)),e||xs(s,!0)}else e=Uo(e).createTextNode(c),e[be]=s,s.stateNode=e}return Yt(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(c=Zi(s),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[be]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),e=!1}else a=Gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&256?(We(s),s):(We(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zi(s),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[be]=s}else oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),f=!1}else f=Gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(We(s),s):(We(s),null)}return We(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(s.child.flags|=8192),So(s,s.updateQueue),Yt(s),null);case 4:return wt(),e===null&&ih(s.stateNode.containerInfo),Yt(s),null;case 10:return Wn(s.type),Yt(s),null;case 19:if(B(Pt),c=s.memoizedState,c===null)return Yt(s),null;if(f=(s.flags&128)!==0,h=c.rendering,h===null)if(f)Aa(c,!1);else{if(Jt!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(h=io(e),h!==null){for(s.flags|=128,Aa(c,!1),e=h.updateQueue,s.updateQueue=e,So(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)Ig(a,e),a=a.sibling;return Y(Pt,Pt.current&1|2),At&&Jn(s,c.treeForkCount),s.child}e=e.sibling}c.tail!==null&&ht()>Co&&(s.flags|=128,f=!0,Aa(c,!1),s.lanes=4194304)}else{if(!f)if(e=io(h),e!==null){if(s.flags|=128,f=!0,e=e.updateQueue,s.updateQueue=e,So(s,e),Aa(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!At)return Yt(s),null}else 2*ht()-c.renderingStartTime>Co&&a!==536870912&&(s.flags|=128,f=!0,Aa(c,!1),s.lanes=4194304);c.isBackwards?(h.sibling=s.child,s.child=h):(e=c.last,e!==null?e.sibling=h:s.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=ht(),e.sibling=null,a=Pt.current,Y(Pt,f?a&1|2:a&1),At&&Jn(s,c.treeForkCount),e):(Yt(s),null);case 22:case 23:return We(s),rf(),c=s.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),a=s.updateQueue,a!==null&&So(s,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),e!==null&&B(fi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),Wn(se),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function h1(e,s){switch(Vu(s),s.tag){case 1:return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return Wn(se),wt(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 26:case 27:case 5:return $e(s),null;case 31:if(s.memoizedState!==null){if(We(s),s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 13:if(We(s),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));oi()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return B(Pt),null;case 4:return wt(),null;case 10:return Wn(s.type),null;case 22:case 23:return We(s),rf(),e!==null&&B(fi),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 24:return Wn(se),null;case 25:return null;default:return null}}function hm(e,s){switch(Vu(s),s.tag){case 3:Wn(se),wt();break;case 26:case 27:case 5:$e(s);break;case 4:wt();break;case 31:s.memoizedState!==null&&We(s);break;case 13:We(s);break;case 19:B(Pt);break;case 10:Wn(s.type);break;case 22:case 23:We(s),rf(),e!==null&&B(fi);break;case 24:Wn(se)}}function Oa(e,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(s,s.return,C)}}function Ms(e,s,a){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=s;var x=a,z=C;try{z()}catch(H){Bt(f,x,H)}}}c=c.next}while(c!==h)}}catch(H){Bt(s,s.return,H)}}function dm(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{sy(s,a)}catch(c){Bt(e,e.return,c)}}}function pm(e,s,a){a.props=yi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,s,c)}}function Ra(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,s,f)}}function Un(e,s){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,s,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,s,f)}else a.current=null}function gm(e){var s=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(s){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function Bf(e,s,a){try{var c=e.stateNode;z1(c,e.type,a,s),c[je]=s}catch(f){Bt(e,e.return,f)}}function ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ls(e.type)||e.tag===4}function Lf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||ym(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ls(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function If(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Fn));else if(c!==4&&(c===27&&Ls(e.type)&&(a=e.stateNode,s=null),e=e.child,e!==null))for(If(e,s,a),e=e.sibling;e!==null;)If(e,s,a),e=e.sibling}function vo(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(c===27&&Ls(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vo(e,s,a),e=e.sibling;e!==null;)vo(e,s,a),e=e.sibling}function mm(e){var s=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);xe(s,c,a),s[be]=e,s[je]=a}catch(h){Bt(e,e.return,h)}}var ss=!1,ae=!1,Hf=!1,Sm=typeof WeakSet==`function`?WeakSet:Set,pe=null;function d1(e,s){if(e=e.containerInfo,lh=Ho,e=Dg(e),ku(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,z=0,H=0,$=e,N=null;e:for(;;){for(var L;$!==a||f!==0&&$.nodeType!==3||(C=S+f),$!==h||c!==0&&$.nodeType!==3||(x=S+c),$.nodeType===3&&(S+=$.nodeValue.length),(L=$.firstChild)!==null;)N=$,$=L;for(;;){if($===e)break e;if(N===a&&++z===f&&(C=S),N===h&&++H===c&&(x=S),(L=$.nextSibling)!==null)break;$=N,N=$.parentNode}$=L}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(oh={focusedElem:e,selectionRange:a},Ho=!1,pe=s;pe!==null;)if(s=pe,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,pe=e;else for(;pe!==null;){switch(s=pe,h=s.alternate,e=s.flags,s.tag){case 0:if((e&4)!==0&&(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),xe(h,c,a),h[be]=e,de(h),c=h;break t;case`link`:var S=x0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;Cqt&&(S=qt,qt=ut,ut=S);var D=Og(C,ut),R=Og(C,qt);if(D&&R&&(L.rangeCount!==1||L.anchorNode!==D.node||L.anchorOffset!==D.offset||L.focusNode!==R.node||L.focusOffset!==R.offset)){var U=$.createRange();U.setStart(D.node,D.offset),L.removeAllRanges(),ut>qt?(L.addRange(U),L.extend(R.node,R.offset)):(U.setEnd(R.node,R.offset),L.addRange(U))}}}}for($=[],L=C;L=L.parentNode;)L.nodeType===1&&$.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;C<$.length;C++){var V=$[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Ho=!!lh,oh=lh=null}finally{zt=f,I.p=c,k.T=a}}e.current=s,ce=2}}function Gm(){if(ce===2){ce=0;var e=Ns,s=fr,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var c=I.p;I.p=2;var f=zt;zt|=4;try{vm(e,s.alternate,s)}finally{zt=f,I.p=c,k.T=a}}ce=3}}function Ym(){if(ce===4||ce===3){ce=0,pt();var e=Ns,s=fr,a=os,c=km;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ce=5:(ce=0,fr=Ns=null,Fm(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(zs=null),du(a),s=s.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pr,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=k.T,f=I.p,I.p=2,k.T=null;try{for(var h=e.onRecoverableError,S=0;Sa?32:a,k.T=null,a=Ff,Ff=null;var h=Ns,S=os;if(ce=0,fr=Ns=null,os=0,(zt&6)!==0)throw Error(r(331));var C=zt;if(zt|=4,Rm(h.current),Tm(h,h.current,S,a),zt=C,Na(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pr,h)}catch{}return!0}finally{I.p=f,k.T=c,Fm(e,s)}}function Xm(e,s,a){s=un(a,s),s=Tf(e.stateNode,s,2),e=Os(e,s,2),e!==null&&(ea(e,2),zn(e))}function Bt(e,s,a){if(e.tag===3)Xm(e,e,a);else for(;s!==null;){if(s.tag===3){Xm(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(zs===null||!zs.has(c))){e=un(a,e),a=Jy(2),c=Os(s,a,2),c!==null&&(Zy(a,c,s,e),ea(c,2),zn(c));break}}s=s.return}}function Zf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new y1;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(a)||(Vf=!0,f.add(a),e=w1.bind(null,e,s,a),s.then(e,e))}function w1(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Kt===e&&(xt&a)===a&&(Jt===4||Jt===3&&(xt&62914560)===xt&&300>ht()-Eo?(zt&2)===0&&hr(e,0):$f|=a,ur===xt&&(ur=0)),zn(e)}function Jm(e,s){s===0&&(s=$p()),e=ai(e,s),e!==null&&(ea(e,s),zn(e))}function E1(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Jm(e,a)}function C1(e,s){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Jm(e,a)}function x1(e,s){return tt(e,s)}var Ro=null,pr=null,Wf=!1,Do=!1,Pf=!1,Bs=0;function zn(e){e!==pr&&e.next===null&&(pr===null?Ro=pr=e:pr=pr.next=e),Do=!0,Wf||(Wf=!0,T1())}function Na(e,s){if(!Pf&&Do){Pf=!0;do for(var a=!1,c=Ro;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Qe(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,t0(c,h))}else h=xt,h=Ul(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||ta(c,h)||(a=!0,t0(c,h));c=c.next}while(a);Pf=!1}}function _1(){Zm()}function Zm(){Do=Wf=!1;var e=0;Bs!==0&&j1()&&(e=Bs);for(var s=ht(),a=null,c=Ro;c!==null;){var f=c.next,h=Wm(c,s);h===0?(c.next=null,a===null?Ro=f:a.next=f,f===null&&(pr=a)):(a=c,(e!==0||(h&3)!==0)&&(Do=!0)),c=f}ce!==0&&ce!==5||Na(e),Bs!==0&&(Bs=0)}function Wm(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var H=x.transferSize,$=x.initiatorType;H&&o0($)&&(x=x.responseEnd,S+=H*(x`u`?null:document;function b0(e,s,a){var c=gr;if(c&&typeof s==`string`&&s){var f=on(s);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),v0.has(f)||(v0.add(f),e={rel:e,crossOrigin:a,href:s},c.querySelector(f)===null&&(s=c.createElement(`link`),xe(s,`link`,e),de(s),c.head.appendChild(s)))}}function G1(e){cs.D(e),b0(`dns-prefetch`,e,null)}function Y1(e,s){cs.C(e,s),b0(`preconnect`,e,s)}function F1(e,s,a){cs.L(e,s,a);var c=gr;if(c&&e&&s){var f=`link[rel="preload"][as="`+on(s)+`"]`;s===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+on(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+on(a.imageSizes)+`"]`)):f+=`[href="`+on(e)+`"]`;var h=f;switch(s){case`style`:h=yr(e);break;case`script`:h=mr(e)}yn.has(h)||(e=m({rel:`preload`,href:s===`image`&&a&&a.imageSrcSet?void 0:e,as:s},a),yn.set(h,e),c.querySelector(f)!==null||s===`style`&&c.querySelector(Ia(h))||s===`script`&&c.querySelector(Ha(h))||(s=c.createElement(`link`),xe(s,`link`,e),de(s),c.head.appendChild(s)))}}function Q1(e,s){cs.m(e,s);var a=gr;if(a&&e){var c=s&&typeof s.as==`string`?s.as:`script`,f=`link[rel="modulepreload"][as="`+on(c)+`"][href="`+on(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=mr(e)}if(!yn.has(h)&&(e=m({rel:`modulepreload`,href:e},s),yn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(Ha(h)))return}c=a.createElement(`link`),xe(c,`link`,e),de(c),a.head.appendChild(c)}}}function X1(e,s,a){cs.S(e,s,a);var c=gr;if(c&&e){var f=Li(c).hoistableStyles,h=yr(e);s=s||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ia(h)))C.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":s},a),(a=yn.get(h))&&gh(e,a);var x=S=c.createElement(`link`);de(x),xe(x,`link`,e),x._p=new Promise(function(z,H){x.onload=z,x.onerror=H}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,No(S,s,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function J1(e,s){cs.X(e,s);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Ha(f)),h||(e=m({src:e,async:!0},s),(s=yn.get(f))&&yh(e,s),h=a.createElement(`script`),de(h),xe(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function Z1(e,s){cs.M(e,s);var a=gr;if(a&&e){var c=Li(a).hoistableScripts,f=mr(e),h=c.get(f);h||(h=a.querySelector(Ha(f)),h||(e=m({src:e,async:!0,type:`module`},s),(s=yn.get(f))&&yh(e,s),h=a.createElement(`script`),de(h),xe(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function w0(e,s,a,c){var f=(f=st.current)?zo(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(s=yr(a.href),a=Li(f).hoistableStyles,c=a.get(s),c||(c={type:`style`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=yr(a.href);var h=Li(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ia(e)))&&!h._p&&(S.instance=h,S.state.loading=5),yn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},yn.set(e,a),h||W1(f,e,a,S.state))),s&&c===null)throw Error(r(528,``));return S}if(s&&c!==null)throw Error(r(529,``));return null;case`script`:return s=a.async,a=a.src,typeof a==`string`&&s&&typeof s!=`function`&&typeof s!=`symbol`?(s=mr(a),a=Li(f).hoistableScripts,c=a.get(s),c||(c={type:`script`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yr(e){return`href="`+on(e)+`"`}function Ia(e){return`link[rel="stylesheet"][`+e+`]`}function E0(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function W1(e,s,a,c){e.querySelector(`link[rel="preload"][as="style"][`+s+`]`)?c.loading=1:(s=e.createElement(`link`),c.preload=s,s.addEventListener(`load`,function(){return c.loading|=1}),s.addEventListener(`error`,function(){return c.loading|=2}),xe(s,`link`,a),de(s),e.head.appendChild(s))}function mr(e){return`[src="`+on(e)+`"]`}function Ha(e){return`script[async]`+e}function C0(e,s,a){if(s.count++,s.instance===null)switch(s.type){case`style`:var c=e.querySelector(`style[data-href~="`+on(a.href)+`"]`);if(c)return s.instance=c,de(c),c;var f=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),de(c),xe(c,`style`,f),No(c,a.precedence,e),s.instance=c;case`stylesheet`:f=yr(a.href);var h=e.querySelector(Ia(f));if(h)return s.state.loading|=4,s.instance=h,de(h),h;c=E0(a),(f=yn.get(f))&&gh(c,f),h=(e.ownerDocument||e).createElement(`link`),de(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),xe(h,`link`,c),s.state.loading|=4,No(h,a.precedence,e),s.instance=h;case`script`:return h=mr(a.src),(f=e.querySelector(Ha(h)))?(s.instance=f,de(f),f):(c=a,(f=yn.get(h))&&(c=m({},a),yh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),de(f),xe(f,`link`,c),e.head.appendChild(f),s.instance=f);case`void`:return null;default:throw Error(r(443,s.type))}else s.type===`stylesheet`&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,No(c,a.precedence,e));return s.instance}function No(e,s,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function P1(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof s.precedence!=`string`||typeof s.href!=`string`||s.href===``)break;return!0;case`link`:if(typeof s.rel!=`string`||typeof s.href!=`string`||s.href===``||s.onLoad||s.onError)break;switch(s.rel){case`stylesheet`:return e=s.disabled,typeof s.precedence==`string`&&e==null;default:return!0}case`script`:if(s.async&&typeof s.async!=`function`&&typeof s.async!=`symbol`&&!s.onLoad&&!s.onError&&s.src&&typeof s.src==`string`)return!0}return!1}function T0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function tC(e,s,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=yr(c.href),h=s.querySelector(Ia(f));if(h){s=h._p,s!==null&&typeof s==`object`&&typeof s.then==`function`&&(e.count++,e=Bo.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=h,de(h);return}h=s.ownerDocument||s,c=E0(c),(f=yn.get(f))&&gh(c,f),h=h.createElement(`link`),de(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),xe(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Bo.bind(e),s.addEventListener(`load`,a),s.addEventListener(`error`,a))}}var mh=0;function eC(e,s){return e.stylesheets&&e.count===0&&Io(e,e.stylesheets),0mh?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function Bo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Io(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Lo=null;function Io(e,s){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lo=new Map,s.forEach(nC,e),Lo=null,Bo.call(e))}function nC(e,s){if(!(s.state.loading&4)){var a=Lo.get(e);if(a)var c=a.get(null);else{a=new Map,Lo.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),_h.exports=vC(),_h.exports}var wC=bC(),J=Jd();const EC={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk3NjY0NH0.F67aNfIfZTYJHWg1hI8aFjlXlWqRRv1R9XdnRpRPCLg`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTc2NjU4fQ.hP1i-w7N4NIYQUXGSMJDh8kL6JJaTTmh84Ha2e7qVbk`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},Uv=J.createContext(null);function Zd(){const n=J.useContext(Uv);if(!n)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return n}function Fo(n){const t=EC[n];if(!t)throw new Error(`Missing environment variable: ${n}`);return t}function CC({children:n}){const t=Fo(`VITE_YJS_URL`),i=Fo(`VITE_DS_URL`),r=J.useMemo(()=>({Authorization:`Bearer ${Fo(`VITE_YJS_TOKEN`)}`}),[]),l=J.useMemo(()=>({Authorization:`Bearer ${Fo(`VITE_DS_TOKEN`)}`}),[]),o=J.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(Uv.Provider,{value:o,children:n})}const xC=`__includes_scalar__`;class _i{}class jr extends _i{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class Sn extends _i{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Oe extends _i{constructor(t){super(),this.path=t,this.type=`ref`}}class Ue extends _i{constructor(t){super(),this.value=t,this.type=`val`}}class Ve extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class zv extends _i{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class Ti extends _i{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Br(n){return n instanceof zv||n instanceof Ve||n instanceof Oe||n instanceof Ue||n instanceof Ti}function Wd(n){return typeof n==`object`&&`expression`in n?n.expression:n}function J0(n){return typeof n==`object`&&`expression`in n?n.expression:n}function Z0(n){return typeof n==`object`&&`expression`in n&&n.residual===!0}function _C(n){return{expression:n,residual:!0}}function TC(n,t){if(n.from.alias===t)return n.from;for(const i of n.join||[])if(i.from.alias===t)return i.from}function ol(n,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(n.select){const l=n.select[r];if(l&&l.type===`ref`)return ol(n,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=TC(n,r);return o?o.type===`queryRef`?ol(o.query,new Oe(l),i):{collection:o.collection,path:l}:void 0}}}class wn extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class W0 extends wn{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` +- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Ai extends wn{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class AC extends Ai{constructor(){super(`Collection requires a config`)}}class OC extends Ai{constructor(){super(`Collection requires a sync config`)}}class RC extends Ai{constructor(){super(`Schema must implement the standard-schema interface`)}}class P0 extends Ai{constructor(){super(`Schema validation must be synchronous`)}}class Cl extends wn{constructor(t){super(t),this.name=`CollectionStateError`}}class DC extends Cl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class MC extends Cl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class kC extends Cl{constructor(){super(`Collection is in error state`)}}class UC extends Cl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class $n extends wn{constructor(t){super(t),this.name=`CollectionOperationError`}}class zC extends $n{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class NC extends $n{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class jC extends $n{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class BC extends $n{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class LC extends $n{constructor(){super(`The first argument to update is missing`)}}class IC extends $n{constructor(){super(`No keys were passed to update`)}}class HC extends $n{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class qC extends $n{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class KC extends $n{constructor(){super(`No keys were passed to delete`)}}class VC extends $n{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class Pd extends wn{constructor(t){super(t),this.name=`MissingHandlerError`}}class $C extends Pd{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class GC extends Pd{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class YC extends Pd{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class ys extends wn{constructor(t){super(t),this.name=`TransactionError`}}class FC extends ys{constructor(){super(`mutationFn is required when creating a transaction`)}}class QC extends ys{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class XC extends ys{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class JC extends ys{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class ZC extends ys{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class Dh extends ys{constructor(){super(`No pending sync transaction to write to`)}}class Mh extends ys{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class WC extends ys{constructor(){super(`No pending sync transaction to commit`)}}class PC extends ys{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class Oi extends wn{constructor(t){super(t),this.name=`QueryBuilderError`}}class tx extends Oi{constructor(t){super(`Only one source is allowed in the ${t}`)}}class ex extends Oi{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class nx extends Oi{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Qo extends Oi{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class sx extends Oi{constructor(){super(`Join condition must be an equality expression`)}}class ix extends Oi{constructor(){super(`Query must have a from clause`)}}class tS extends Oi{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: + + ❌ .where(({ user }) => user.id === 'abc') + ✅ .where(({ user }) => eq(user.id, 'abc')) + +Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class ze extends wn{constructor(t){super(t),this.name=`QueryCompilationError`}}class rx extends ze{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class ax extends ze{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class lx extends ze{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class ox extends ze{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class cx extends ze{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Nv extends ze{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class ux extends ze{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class fx extends ze{constructor(t){super(`Unsupported FROM type: ${t}`)}}class hx extends ze{constructor(t){super(`Unknown expression type: ${t}`)}}class dx extends ze{constructor(){super(`Reference path cannot be empty`)}}class px extends ze{constructor(t){super(`Unknown function: ${t}`)}}class eS extends ze{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Ri extends wn{constructor(t){super(t),this.name=`JoinError`}}class gx extends Ri{constructor(t){super(`Unsupported join type: ${t}`)}}class yx extends Ri{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class mx extends Ri{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Sx extends Ri{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class vx extends Ri{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class bx extends Ri{constructor(){super(`Invalid join condition`)}}class wx extends Ri{constructor(t){super(`Unsupported join source type: ${t}`)}}class Vc extends wn{constructor(t){super(t),this.name=`GroupByError`}}class Ex extends Vc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class Cx extends Vc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class xx extends Vc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class _x extends Vc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class nS extends wn{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class Tx extends wn{constructor(t){super(t),this.name=`QueryOptimizerError`}}class Ax extends Tx{constructor(){super(`Cannot combine empty expression list`)}}class Ox extends ze{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class Rx extends ze{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class Dx extends ze{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Bn(n,t){return rc(n,t,new Map)}function rc(n,t,i){if(n===t)return!0;if(n==null||t==null||typeof n!=typeof t)return!1;if(n instanceof Date)return t instanceof Date?n.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(n instanceof RegExp)return t instanceof RegExp?n.source===t.source&&n.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(n instanceof Map){if(!(t instanceof Map)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const l=Array.from(n.entries()).every(([o,u])=>t.has(o)&&rc(u,t.get(o),i));return i.delete(n),l}if(t instanceof Map)return!1;if(n instanceof Set){if(!(t instanceof Set)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Array.from(n),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(n),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(n),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)&&!(n instanceof DataView)&&!(t instanceof DataView)){const r=n,l=t;if(r.length!==l.length)return!1;for(let o=0;orc(l,t[o],i));return i.delete(n),r}if(Array.isArray(t))return!1;if(typeof n==`object`){if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Object.keys(n),l=Object.keys(t);if(r.length!==l.length)return i.delete(n),!1;const o=r.every(u=>u in t&&rc(n[u],t[u],i));return i.delete(n),o}return!1}const Mx=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function Xs(n){if(n==null||typeof n!=`object`)return!1;const t=n[Symbol.toStringTag];return typeof t==`string`&&Mx.has(t)}const jv={direction:`asc`,nulls:`first`,stringSort:`locale`},kh=new WeakMap;let kx=1;function sS(n){if(kh.has(n))return kh.get(n);const t=kx++;return kh.set(n,t),t}const tp=(n,t,i)=>{const{nulls:r}=i;if(n==null&&t==null)return 0;if(n==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof n==`string`&&typeof t==`string`&&i.stringSort===`locale`)return n.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(n)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof n==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=sS(n),d=sS(t);return u-d}if(l)return 1;if(o)return-1}return nt?1:0},Ux=(n,t,i)=>tp(t,n,{...i,nulls:i.nulls===`first`?`last`:`first`});function Pa(n){return(t,i)=>n.direction===`asc`?tp(t,i,n):Ux(t,i,n)}const zx=Pa({direction:`asc`,nulls:`first`,stringSort:`locale`});function Nx(n,t){if(n.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?Hx(n):Ix(n);case`func`:return qx(n,t);default:throw new hx(n.type)}}function Ix(n){const[t,...i]=n.path;if(!t)throw new dx;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function Hx(n){const t=n.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function qx(n,t){const i=n.args.map(r=>ep(r,t));switch(n.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=xr(r(o)),d=xr(l(o));return ge(u)||ge(d)?null:Bx(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ge(u)||ge(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ge(u)||ge(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ge(u)||ge(d)?null:u{const u=r(o),d=l(o);return ge(u)||ge(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ge(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ge(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return ge(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=xr(r(o)),d=l(o);return ge(u)?null:Array.isArray(d)?d.some(p=>xr(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ge(u)||ge(d)?null:iS(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ge(u)||ge(d)?null:iS(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Uh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Uh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Uh(d);return p?Lx(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new px(n.name)}}function iS(n,t,i){if(typeof n!=`string`||typeof t!=`string`)return!1;const r=i?n.toLowerCase():n;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class Kx{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function rS(n,t,i,r,l){const o=n;return{...n,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const pd=[`$synced`,`$origin`,`$key`,`$collectionId`];function Vx(n){return pd.includes(n)}function Lv(n){return n.some(t=>Vx(t))}function xl(n,t,i){if(Lv(t))return;const r=i??{...jv,...n.compareOptions};for(const l of n.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new Kx(l)}function $x(n){if(n.length===0)return new Set;if(n.length===1)return new Set(n[0]);let t=new Set(n[0]);for(let i=1;i=2){const o=r.split(`.`),u=xl(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,y=!0;for(const{operation:v,value:w}of l)switch(v){case`gt`:(d===void 0||w>d)&&(d=w,g=!1);break;case`gte`:(d===void 0||w>d)&&(d=w,g=!0);break;case`lt`:(p===void 0||w0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:$x(l)}}return{canOptimize:!1,matchingKeys:new Set}}function Jx(n,t){if(n.type!==`func`||n.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of n.args){const l=np(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:Gx(r)}}return{canOptimize:!1,matchingKeys:new Set}}function Zx(n,t){if(n.type!==`func`||n.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=n.args[0],r=n.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=xl(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const y of g)d.add(y)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Iv(n){return n.config.autoIndex===`eager`}function $c(n,t,i,r,l){if(Lv(t)||!Iv(i))return;const o=r??{...jv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function Wx(n,t){if(!Iv(t))return;const i=Px(n);for(const{fieldName:r,fieldPath:l}of i)$c(r,l,t)}function Px(n){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(n),t}class t_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const zh=3e4;function Nh(n,t){if(t.length<=zh)n.push(...t);else for(let i=0;i0)l=o;else return o}return r}class n_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof n==`string`?-1:1}function cl(n){return JSON.stringify(n,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const i_=Se(),r_=Se(),a_=Se(),l_=Se(),o_=Se();function Se(){return Math.random()*(2**31-1)>>>0}const Hv=new ArrayBuffer(8),c_=new DataView(Hv),$s=new Uint8Array(Hv);class _l{constructor(){this.hash=i_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(o_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(r_);for(let i=0;i>>8&255)}return;case`number`:c_.setFloat64(0,t,!0),this.writeByte($s[0]),this.writeByte($s[1]),this.writeByte($s[2]),this.writeByte($s[3]),this.writeByte($s[4]),this.writeByte($s[5]),this.writeByte($s[6]),this.writeByte($s[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(l_)):this.update(a_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const u_=Se(),f_=Se(),h_=Se(),d_=Se(),p_=Se(),g_=Se(),y_=Se(),m_=Se(),S_=Se(),v_=Se(),b_=Se(),w_=Se(),E_=Se(),C_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function x_(n){const t=n[Symbol.toStringTag];return typeof t==`string`&&C_.has(t)}const __=128,ul=new WeakMap;function ke(n){const t=new _l;return qv(t,n),t.digest()}function T_(n){const t=ul.get(n);if(t!==void 0)return t;let i;if(n instanceof Date)i=A_(n);else if(typeof Buffer<`u`&&n instanceof Buffer||n instanceof Uint8Array)if(n.byteLength<=__)i=O_(n);else return yd(n);else{if(n instanceof File)return yd(n);if(x_(n))i=R_(n);else{let r=n,l=m_;n instanceof Array&&(l=S_),n instanceof Map&&(l=v_,r=[...n.entries()]),n instanceof Set&&(l=b_,r=[...n.entries()]),i=D_(r,l)}}return ul.set(n,i),i}function A_(n){const t=new _l;return t.update(y_),t.update(n.getTime()),t.digest()}function O_(n){const t=new _l;t.update(w_),t.update(n.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ee(this.#t.filter(([i,r])=>t(i)))}negate(){return new ee(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Nh(i,this.#t),Nh(i,t.getInner()),new ee(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${jh.getStringId(u)}|${jh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=jh.getStringId(p);const y=d+`|`+g;t.set(y,(t.get(y)||0)+u),i.has(y)||i.set(y,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ee(l)}#n(){const t=new t_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const y=u?ke(p):p;u&&!i.has(y)&&i.set(y,p),t.update(y,m=>m+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const y=u?i.get(p):p;d.push([y,g])}return new ee(d)}extend(t){const i=t instanceof ee?t.getInner():t;Nh(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class U_{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class Rn{#t=[];sendData(t){t instanceof ee||(t=new ee(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new U_(t)}}class Kv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Di extends Kv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class z_ extends Kv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class sp extends Di{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class N_{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new Rn;return new j_(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class Dn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class j_ extends Dn{sendData(t){this.writer.sendData(t)}}class B_ extends Di{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ee;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Vv(){return n=>{const t=new Dn(n.graph,new Rn),i=new B_(n.graph.getNextOperatorId(),n.connectReader(),t.writer);return n.graph.addOperator(i),t}}const Qa=Symbol(`NO_PREFIX`);class lS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=tl(t),l=this.get(r);if(ac(l)){const[o,u]=l;if(tl(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||ke(o)===ke(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Xa;p.set(ke(o),l),p.set(ke(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Xa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=ke(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Fs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Fs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(ac(i))yield i;else{if(i===void 0)return;if(i instanceof Xa)for(const r of i.values())yield r;else for(const r of i.values())if(ac(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(ac(u)){this.#n(t,u,r,l);return}if(u instanceof Xa){const d=tl(r);if(d!==Qa){const p=new lS;p.set(Qa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=tl(r),p=tl(o);if(p===d&&(o===r||ke(o)===ke(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Qa&&d===Qa){const g=new Xa;g.set(ke(o),i),g.set(ke(r),[r,l]),this.#t.set(t,g)}else{const g=new lS;if(p===d){const y=new Xa;y.set(ke(o),i),y.set(ke(r),[r,l]),g.set(p,y)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ee(i)}}function tl(n){return Array.isArray(n)&&(typeof n[0]==`string`||typeof n[0]==`number`||typeof n[0]==`bigint`)?n[0]:Qa}function ac(n){return Array.isArray(n)}class L_ extends Di{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,y]of u){const m=d.get(g)??0;d.set(g,m+y)}for(const[g,y]of o){const m=p.get(g)??0;p.set(g,m+y)}for(const[g,y]of p)d.has(g)||(i.push([[r,g],-y]),this.#e.addValue(r,[g,-y]));for(const[g,y]of d)p.has(g)||y!==0&&(i.push([[r,g],y]),this.#e.addValue(r,[g,y]));for(const[g,y]of d){const m=p.get(g);if(m!==void 0){const v=y-m;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ee(i))}}function $v(n){return t=>{const i=new Dn(t.graph,new Rn),r=new L_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class I_ extends Di{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=ke(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[ke(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[ke(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ee(i))}}function H_(n=t=>t){return t=>{const i=new Dn(t.graph,new Rn),r=new I_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class q_ extends sp{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ps(n){return t=>{const i=new Dn(t.graph,new Rn),r=new q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}const K_=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function _r(n,t,i){const r=i[0];if(t!=null&&n>=t)throw new Error(n+` >= `+t);if(n.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(n[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+_r(n.slice(u),t.slice(u),i)}const l=n?i.indexOf(n[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+_r(n.slice(1),null,i)}function Gv(n){if(n.length!==Yv(n[0]))throw new Error(`invalid integer part of order key: `+n)}function Yv(n){if(n>=`a`&&n<=`z`)return n.charCodeAt(0)-97+2;if(n>=`A`&&n<=`Z`)return 90-n.charCodeAt(0)+2;throw new Error(`invalid order key head: `+n)}function Ja(n){const t=Yv(n[0]);if(t>n.length)throw new Error(`invalid order key: `+n);return n.slice(0,t)}function oS(n,t){if(n===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+n);const i=Ja(n);if(n.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+n)}function cS(n,t){Gv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function V_(n,t){Gv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function $_(n,t,i=K_){if(n!=null&&oS(n,i),t!=null&&oS(t,i),n!=null&&t!=null&&n>=t)throw new Error(n+` >= `+t);if(n==null){if(t==null)return`a`+i[0];const p=Ja(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+_r(``,g,i);if(p{const o=n(i,l);return o!==0?o:gd(t,r)}}class ip{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=s_(o,u),g=[];p.forEach(m=>{const v=this.#t[m];v&&g.push(v)});const y=[];return d.forEach(m=>{const v=this.#t[m];v&&y.push(v)}),{moveIns:g,moveOuts:y,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:hS(this.#t[r-1]),o=r===this.#t.length?null:hS(this.#t[r]),u=$_(l,o),d=uS(t,u);if(this.#t.splice(r,0,d),rthis.#e(fS(i),fS(r)))}}class Qv{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof ip))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function bc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],1])}}function wc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],-1])}}class G_ extends Di{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=Fv(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new ip(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new Qv(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>bc(d,r)),u.moveOuts.forEach(d=>wc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);bc(d.moveIn,l),wc(d.moveOut,l),this.#l(o,u)}}function Y_(n,t){return i=>{const r=new Dn(i.graph,new Rn),l=new G_(i.graph.getNextOperatorId(),i.connectReader(),r.writer,n,t);return i.graph.addOperator(l),r}}class F_ extends z_{#t=new Fs;#e=new Fs;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Fs.fromMultiSets(this.inputAMessages()),i=Fs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ee;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[g,null]],y)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#t.getIterator(l))y!==0&&r.add([l,[g,null]],p?-y:+y)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,y]of o)y!==0&&r.add([l,[null,g]],y)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,y]of this.#e.getIterator(l))y!==0&&r.add([l,[null,g]],p?-y:+y)}}}function Xv(n,t=`inner`){return i=>{if(i.graph!==n.graph)throw new Error(`Cannot join streams from different graphs`);const r=new Dn(i.graph,new Rn),l=new F_(i.graph.getNextOperatorId(),i.connectReader(),n.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class Q_ extends sp{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function le(n){return t=>{const i=new Dn(t.graph,new Rn),r=new Q_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class X_ extends Di{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function md(n){return t=>{const i=new Dn(t.graph,new Rn),r=new X_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class J_ extends sp{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function Z_(n){return t=>{const i=new Dn(t.graph,new Rn),r=new J_(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class W_ extends Di{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,Fv(l));this.#t=new Qv(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new ip(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>bc(o,r)),l.moveOuts.forEach(o=>wc(o,r)),l.changes&&this.output.sendData(new ee(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ee(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);bc(o.moveIn,l),wc(o.moveOut,l)}}function P_(n,t){const i=t||{};return r=>{const l=new Dn(r.graph,new Rn),o=new W_(r.graph.getNextOperatorId(),r.connectReader(),l.writer,n,i);return r.graph.addOperator(o),l}}function dS(n){return`pipe`in n}function pS(n,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!dS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>dS(l))),r=>{const l=`__original_key__`;return r.pipe(le(d=>{const p=n(d),g=cl(p),y={};y[l]=p;for(const[m,v]of Object.entries(i))y[m]=v.preMap(d);return[g,y]})).pipe($v(d=>{let p=0;for(const[m,v]of d)p+=v;if(p<=0)return[];const g={},y=d[0]?.[0]?.[l];g[l]=y;for(const[m,v]of Object.entries(i)){const w=d.map(([b,E])=>[b[m],E]);g[m]=v.reduce(w)}return[[g,1]]})).pipe(le(([d,p])=>{const g=p[l],y={};Object.assign(y,g);for(const[m,v]of Object.entries(i))v.postMap?y[m]=v.postMap(p[m]):y[m]=p[m];return[d,y]}))}}function tT(n=t=>t){return{preMap:t=>n(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function eT(n=t=>t){return{preMap:t=>n(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function nT(n=t=>t){return{preMap:t=>({sum:n(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function sT(n){const t=n??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const rT={sum:tT,count:eT,avg:nT,min:sT,max:iT};function aT(n,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(Y_((g,y)=>d(n(g),n(y)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Vv())}function lT(n,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(n((g,y)=>d(t(g),t(y)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Vv())}function oT(n,t){return lT(P_,n,t)}const Bh=`__virtual_synced__`,Lh=`__virtual_has_local__`;function gS(n){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(n)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:cT,count:uT,avg:fT,min:hT,max:dT}=rT;function pT(n,t){const i=new Map,r=[...n];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Lr(o))continue;const u=r.findIndex(d=>Ec(o,d));if(u===-1)throw new Ex(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function yS(n,t,i,r,l,o,u){const d={[Bh]:{preMap:([,b])=>gS(b).synced,reduce:b=>{for(const[E,_]of b)if(!E&&_>0)return!1;return!0}},[Lh]:{preMap:([,b])=>gS(b).hasLocal,reduce:b=>{for(const[E,_]of b)if(E&&_>0)return!0;return!1}}};if(t.length===0){const b=d,E={},_={value:0};if(r){for(const[O,A]of Object.entries(r))if(A.type===`agg`)b[O]=Jo(A);else if(Lr(A)){const{transformed:M,extracted:G}=Sd(A,_);for(const[q,K]of Object.entries(G))b[q]=Jo(K);E[O]=ue(M)}}const j=u?([,O])=>({__singleGroup:!0,__correlationKey:O?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(n=n.pipe(pS(j,b)),n=n.pipe(le(([,O])=>{const M={...O.$selected||{}};if(r){for(const[X,at]of Object.entries(r))at.type===`agg`&&(M[X]=O[X]);mS(M,O,E)}const G=u?O.__correlationKey:void 0,q=G!==void 0?`single_group_${cl(G)}`:`single_group`,K={...O,$selected:M},W=O[Bh],et=O[Lh];return K.$synced=W??!0,K.$origin=et?`local`:`remote`,K.$key=q,K.$collectionId=o??K.$collectionId,u&&G!==void 0&&(K[u]={__correlationKey:G}),[q,K]})),i&&i.length>0)for(const O of i){const A=J0(O),M=Cc(A,r||{},`$selected`),G=ue(M);n=n.pipe(ps(([,q])=>{const K={$selected:q.$selected};return Ar(G(K))}))}if(l&&l.length>0)for(const O of l)n=n.pipe(ps(([,A])=>{const M={$selected:A.$selected};return Ar(O(M))}));return n}const p=pT(t,r),g=t.map(b=>ue(b)),y=([,b])=>{const E={...b};delete E.$selected;const _={};for(let j=0;j{const E=b.$selected||{},_={};if(r){for(const[K,W]of Object.entries(r))if(W.type===`agg`)_[K]=b[K];else if(!v[K]){const et=p.selectToGroupByIndex.get(K);et!==void 0?_[K]=b[`__key_${et}`]:_[K]=E[K]}mS(_,b,v)}else for(let K=0;K0)for(const b of i){const E=J0(b),_=Cc(E,r||{}),j=ue(_);n=n.pipe(ps(([,O])=>{const A={$selected:O.$selected};return j(A)}))}if(l&&l.length>0)for(const b of l)n=n.pipe(ps(([,E])=>{const _={$selected:E.$selected};return Ar(b(_))}));return n}function Ec(n,t){if(!n||!t||n.type!==t.type)return!1;switch(n.type){case`ref`:return!n.path||!t.path||n.path.length!==t.path.length?!1:n.path.every((i,r)=>i===t.path[r]);case`val`:return n.value===t.value;case`func`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Ec(i,t.args[r]));case`agg`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>Ec(i,t.args[r]));default:return!1}}function Jo(n){const t=ue(n.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(n.name.toLowerCase()){case`sum`:return cT(i);case`count`:return uT(l);case`avg`:return fT(i);case`min`:return hT(r);case`max`:return dT(r);default:throw new Cx(n.name)}}function Cc(n,t,i=`$selected`){switch(n.type){case`agg`:{const r=n;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&gT(r,o))return new Oe([i,l]);throw new xx(r.name)}case`func`:{const r=n,l=r.args.map(o=>Cc(o,t));return new Ve(r.name,l)}case`ref`:return n;case`val`:return n;default:throw new _x(n.type)}}function mS(n,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(n[r]=t[r]);for(const[r,l]of Object.entries(i))n[r]=l({$selected:n});for(const r of Object.keys(n))r.startsWith(`__agg_`)&&delete n[r]}function Lr(n){return Br(n)?n.type===`agg`?!0:n.type===`func`&&`args`in n?n.args.some(t=>Lr(t)):!1:!1}function Sd(n,t){if(n.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Oe([`$selected`,i]),extracted:{[i]:n}}}if(n.type===`func`){const i={},r=n.args.map(l=>{const o=Sd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Ve(n.name,r),extracted:i}}return{transformed:n,extracted:{}}}function gT(n,t){return n.name===t.name&&n.args.length===t.args.length&&n.args.every((i,r)=>Ec(i,t.args[r]))}function yT(n,t,i,r,l,o,u,d,p,g){const y=i.map(E=>{const _=Cc(E.expression,r,`$selected`);return{compiledExpression:ue(_),compareOptions:vd(E,l)}}),m=E=>{const _=E;return i.length>1?y.map(j=>j.compiledExpression(_)):i.length===1?y[0].compiledExpression(_):null},v=(E,_)=>{if(i.length>1){const j=E,O=_;for(let A=0;A1?String(M.path[0]):n.from.alias}}if(j){const q=i.every(X=>X.expression.type===`ref`)?i.map(X=>{const at=X.expression,nt=ol(n,at,l);return ue(nt?new Oe(nt.path):X.expression,!0)}):void 0;b={alias:O,offset:p??0,limit:d,comparator:(X,at)=>{if(i.length===1){const nt=X&&j(X),bt=at&&j(at);return v(nt,bt)}if(q){const nt=bt=>bt&&q.map(Lt=>Lt(bt));return v(nt(X),nt(at))}return 0},valueExtractorForRawRow:X=>{if(i.length===1)return j(X);if(q)return q.map(at=>at(X))},firstColumnValueExtractor:j,index:E,orderBy:i};const et=_?.id??l.id;o[et]=b,w=X=>{o[et].dataNeeded=()=>{const at=X();return Math.max(0,b.limit-at)}}}}return g?t.pipe(aT(m,{limit:d,offset:p,comparator:v,setSizeCallback:w,groupKeyFn:g,setWindowFn:E=>{u(_=>{E(_),b&&(b.offset=_.offset??b.offset,b.limit=_.limit??b.limit)})}})):t.pipe(oT(m,{limit:d,offset:p,comparator:v,setSizeCallback:w,setWindowFn:E=>{u(_=>{E(_),b&&(b.offset=_.offset??b.offset,b.limit=_.limit??b.limit)})}}))}function vd(n,t){return n.compareOptions.stringSort!==void 0?n.compareOptions:{...t.compareOptions,direction:n.compareOptions.direction,nulls:n.compareOptions.nulls}}function mT(n,t={}){const i=r=>{const l=[];for(const[o,u]of n.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?el(t.where):void 0,l=vT(n,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=Yx(r,n);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=el(r);return i(o)}}catch(r){console.warn(`${n.id?`[${n.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=el(t.where);return t.optimizedOnly?void 0:i(l)}}function el(n){const t=Bv(n);return i=>{try{const r=t(i);return Ar(r)}catch{return!1}}}function ST(n,t){const i=el(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&n(l)}}function vT(n,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const m=g.path,v=vd(p,n);$c(m[0],m,n,v);const w=xl(n,m,v);if(w&&w.supports(`gt`)){const b=E=>{const _=n.get(E);return _===void 0?!1:r?.(_)??!0};return w.takeFromStart(i??w.keyCount,b)}}}if(l)return;const o=[];for(const[p,g]of n.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const y of t){const m=Pa(y.compareOptions),v=SS(p.value,y.expression),w=SS(g.value,y.expression),b=m(v,w);if(b!==0)return b}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function SS(n,t){if(t.type===`ref`){const i=t;let r=n;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:Bv(t)(n)}class vS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=gd(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const lc=`__tanstack_db_direct`;class bT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),y=o?r.find(O=>O.truncate)?.optimisticSnapshot:null;let m,v;const w=new Set;for(const O of r){for(const A of O.operations)w.add(A.key);for(const[A]of O.rowMetadataWrites)w.add(A)}let b=this.preSyncVisibleState;if(b.size===0){b=new Map;for(const O of w){const A=this.get(O);A!==void 0&&b.set(O,A)}}const E=[],_=this.config.sync.rowUpdateMode||`partial`,j=new Map;for(const O of this.transactions.values())if(O.state===`completed`)for(const A of O.mutations)this.isThisCollection(A.collection)&&A.optimistic&&j.set(A.key,{type:A.type,value:A.modified});for(const O of r){if(O.truncate){const A=new Set([...this.syncedData.keys(),...y?.upserts.keys()||[]]);for(const M of A){if(y?.deletes.has(M))continue;const G=y?.upserts.get(M)||this.syncedData.get(M);G!==void 0&&E.push({type:`delete`,key:M,value:G})}m=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const M of w)b.delete(M);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const A of O.operations){const M=A.key;this.syncedKeys.add(M);const G=this.isLocalOnly||this.pendingLocalChanges.has(M)||this.pendingLocalOrigins.has(M)||m?.has(M)===!0||v?.has(M)===!0?`local`:`remote`;switch(A.type){case`insert`:this.syncedData.set(M,A.value),this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break;case`update`:{if(_===`partial`){const q=Object.assign({},this.syncedData.get(M),A.value);this.syncedData.set(M,q)}else this.syncedData.set(M,A.value);this.rowOrigins.set(M,G),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}case`delete`:this.syncedData.delete(M),this.syncedMetadata.delete(M),this.rowOrigins.delete(M),this.pendingLocalChanges.delete(M),this.pendingLocalOrigins.delete(M),this.pendingOptimisticUpserts.delete(M),this.pendingOptimisticDeletes.delete(M),this.pendingOptimisticDirectUpserts.delete(M),this.pendingOptimisticDirectDeletes.delete(M);break}}for(const[A,M]of O.rowMetadataWrites){if(M.type===`delete`){this.syncedMetadata.delete(A);continue}this.syncedMetadata.set(A,M.value)}for(const[A,M]of O.collectionMetadataWrites){if(M.type===`delete`){this.syncedCollectionMetadata.delete(A);continue}this.syncedCollectionMetadata.set(A,M.value)}}if(o){const O=new Set;for(const G of r)for(const q of G.operations)(q.type===`insert`||q.type===`update`)&&O.add(q.key);const A=new Map(y.upserts),M=new Set(y.deletes);for(const[G,q]of A)if(!M.has(G))if(O.has(G)){let K=!1;for(let W=E.length-1;W>=0;W--){const et=E[W];if(et.key===G&&et.type===`insert`){et.value=q,K=!0;break}}K||E.push({type:`insert`,key:G,value:q})}else E.push({type:`insert`,key:G,value:q});if(E.length>0&&M.size>0){const G=[];for(const q of E)q.type===`insert`&&M.has(q.key)||G.push(q);E.length=0,E.push(...G)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&y){for(const[O,A]of y.upserts)this.optimisticUpserts.set(O,A);for(const O of y.deletes)this.optimisticDeletes.add(O)}for(const O of this.transactions.values())if(![`completed`,`failed`].includes(O.state)){for(const A of O.mutations)if(this.isThisCollection(A.collection)&&A.optimistic)switch(A.type){case`insert`:case`update`:this.optimisticUpserts.set(A.key,A.modified),this.optimisticDeletes.delete(A.key);break;case`delete`:this.optimisticUpserts.delete(A.key),this.optimisticDeletes.add(A.key);break}}for(const O of w){const A=b.get(O),M=this.get(O),G=this.getVirtualPropsSnapshotForState(O,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:j}),q=this.getVirtualPropsSnapshotForState(O),K=G.$synced!==q.$synced||G.$origin!==q.$origin,W=A!==void 0?rS(A,O,this.collection.id,()=>G.$synced,()=>G.$origin):void 0,et=j.get(O);let X=!1;et&&(et.type===`delete`&&A!==void 0&&M===void 0&&Bn(et.value,A)||M!==void 0&&Bn(et.value,M))&&(X=!0);const at=K&&A!==void 0&&M!==void 0&&Bn(A,M);if(!(X&&!at))if(A===void 0&&M!==void 0){const nt=j.get(O);if(nt){const bt=nt.value,Lt=rS(bt,O,this.collection.id,()=>G.$synced,()=>G.$origin);E.push({type:`update`,key:O,value:M,previousValue:Lt})}else E.push({type:`insert`,key:O,value:M})}else A!==void 0&&M===void 0?E.push({type:`delete`,key:O,value:W??A}):A!==void 0&&M!==void 0&&(!Bn(A,M)||at)&&E.push({type:`update`,key:O,value:M,previousValue:W??A})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new vS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new vS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const m of this.transactions.values()){const v=m.metadata[lc]===!0;if(m.state===`completed`){for(const w of m.mutations)if(this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.add(w.key),!!w.optimistic))switch(w.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(w.key,w.modified),this.pendingOptimisticDeletes.delete(w.key),v?(this.pendingOptimisticDirectUpserts.add(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break;case`delete`:this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.add(w.key),v?(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.add(w.key)):(this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key));break}}else if(m.state===`failed`)for(const w of m.mutations)this.isThisCollection(w.collection)&&(this.pendingLocalOrigins.delete(w.key),w.optimistic&&(this.pendingOptimisticUpserts.delete(w.key),this.pendingOptimisticDeletes.delete(w.key),this.pendingOptimisticDirectUpserts.delete(w.key),this.pendingOptimisticDirectDeletes.delete(w.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const m of this.pendingSyncedTransactions)for(const v of m.operations)o.add(v.key);const u=[];for(const[m,v]of this.pendingOptimisticUpserts)o.has(m)||this.pendingOptimisticDirectUpserts.has(m)?this.optimisticUpserts.set(m,v):u.push(m);for(const m of u)this.pendingOptimisticUpserts.delete(m),this.pendingLocalOrigins.delete(m);const d=[];for(const m of this.pendingOptimisticDeletes)o.has(m)||this.pendingOptimisticDirectDeletes.has(m)?this.optimisticDeletes.add(m):d.push(m);for(const m of d)this.pendingOptimisticDeletes.delete(m),this.pendingLocalOrigins.delete(m);const p=[];for(const m of this.transactions.values())[`completed`,`failed`].includes(m.state)||p.push(m);for(const m of p)for(const v of m.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const y=g.filter(m=>!!(!this.recentlySyncedKeys.has(m.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const m=new Set;for(const w of this.pendingSyncedTransactions)for(const b of w.operations)m.add(b.key);const v=y.filter(w=>!(w.type===`delete`&&m.has(w.key)&&!p.some(E=>E.mutations.some(_=>this.isThisCollection(_.collection)&&_.key===w.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else y.length>0&&this.indexes.updateIndexes(y),this.changes.emitEvents(y,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),y=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:y}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:y,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function Jv(){const n=new Map;function t(i){const r=i.join(`.`);if(n.has(r))return n.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return n.set(r,l),l}return t([])}function vi(n){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,y=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,y)||Object.defineProperty(p,y,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(n.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&n.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...n,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&n.includes(u))return{enumerable:!0,configurable:!0}}})}function bS(n){const t=vi(n),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,y){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,y);const m=[...o,String(g)];return r(m)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function ne(n){return oc(n)?new Oe(n.__path):n&&typeof n==`object`&&`type`in n&&(n.type===`func`||n.type===`ref`||n.type===`val`||n.type===`agg`)?n:new Ue(n)}function oc(n){return n&&typeof n==`object`&&n.__refProxy===!0}function bd(n,t){return new Ve(`eq`,[ne(n),ne(t)])}function wd(n,t){return new Ve(`gt`,[ne(n),ne(t)])}function wT(n,t){return new Ve(`gte`,[ne(n),ne(t)])}function Ed(n,t){return new Ve(`lt`,[ne(n),ne(t)])}function Cd(n,t,...i){const r=[n,t,...i];return new Ve(`and`,r.map(l=>ne(l)))}function ET(n,t,...i){const r=[n,t,...i];return new Ve(`or`,r.map(l=>ne(l)))}function CT(n,t){return new Ve(`in`,[ne(n),ne(t)])}class xT{constructor(t){this.query=t}}class _T{constructor(t){this.query=t}}class Zv{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function TT(n,t){if(t.length===0||n.length===0)return;if(n.length===1){const{expression:r,compareOptions:l}=n[0];return(l.direction===`asc`?wd:Ed)(r,new Ue(t[0]))}const i=[];for(let r=0;rCd(y,m)))}}return i.length===1?i[0]:i.reduce((r,l)=>ET(r,l))}class AT extends Zv{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&Wx(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?ST(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,y=Cd(g,p);i.where=y}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],y=this.orderByIndex,m=this.options.whereExpression,v=m?el(m):void 0,w=et=>{if(et!==void 0&&this.sentKeys.has(et))return!1;const X=this.collection.get(et);return X===void 0?!1:v?.(X)??!0};let b=g;const E=[];let _=[];if(d){const{expression:et}=t[0],X=this.collection.currentStateAsChanges({where:bd(et,new Ue(g))});if(X){const at=X.map(bt=>bt.key).filter(bt=>!this.sentKeys.has(bt)&&w(bt));_.push(...at);const nt=y.take(i-_.length,g,w);_.push(...nt)}else _=y.take(i,g,w)}else _=y.takeFromStart(i,w);const j=()=>Math.max(i-E.length,0),O=()=>_.length===0,A=t[0].expression,M=A.type===`ref`?ue(new Oe(A.path),!0):null;for(;j()>0&&!O();){const et=new Set;for(const X of _){const at=this.collection.get(X);E.push({type:`insert`,key:X,value:at}),b=M?M(at):at,et.add(X)}_=y.take(j(),b,w)}const G=this.limitedSnapshotRowCount;for(const et of E)this.sentKeys.add(et.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let q;if(r!==void 0&&r.length>0){const et=TT(t,r);if(et){const{expression:X}=t[0],at=r[0];let nt;if(at instanceof Date){const bt=new Date(at.getTime()+1);nt=Cd(wT(X,new Ue(at)),Ed(X,new Ue(bt)))}else nt=bd(X,new Ue(at));q={whereFrom:et,whereCurrent:nt,lastKey:this.lastSentKey}}}const K={where:m,limit:i,orderBy:t,cursor:q,offset:l??G,subscription:this},W=this.collection._sync.loadSubset(K);u?.(W),this.loadedSubsets.push(K),o&&this.trackLoadSubsetPromise(W)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class OT{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=Jv(),p=r(d);o=ne(p)}const u=new AT(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new UC;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const RT=n=>setTimeout(()=>{n({didTimeout:!0,timeRemaining:()=>50})},0),DT=n=>{clearTimeout(n)},MT=typeof window<`u`&&`requestIdleCallback`in window?(n,t)=>window.requestIdleCallback(n,t):(n,t)=>RT(n),Ih=typeof window<`u`&&`cancelIdleCallback`in window?n=>window.cancelIdleCallback(n):DT,Wv=class fs{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return fs.instance||(fs.instance=new fs),fs.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){fs.instance&&(fs.instance.timeoutId!==null&&clearTimeout(fs.instance.timeoutId),fs.instance=null)}};Wv.instance=null;let Hh=Wv;class kT{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new MC(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new Cl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new DC(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||Hh.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){Hh.getInstance().cancel(this),this.idleCallbackId!==null&&(Ih(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Ih(this.idleCallbackId),this.idleCallbackId=MT(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),Hh.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Ih(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const rp=Symbol(`liveQueryInternal`);class UT{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=zT(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new Dh;if(r.committed)throw new Mh;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const y=this.state.syncedData.get(l);if(y!==void 0&&Bn(y,i.value))o=`update`;else{const w=this.config.utils[rp];throw new BC(l,this.id,{hasCustomGetKey:w?.hasCustomGetKey??!1,hasJoins:w?.hasJoins??!1,hasDistinct:w?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new WC;if(i.committed)throw new PC;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Dh;if(i.committed)throw new Mh;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Ai(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new Dh;if(t.committed)throw new Mh;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new kC);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new nS(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new nS(this.id,t)})}this.preloadPromise=null}}function zT(n){if(typeof n==`function`)return{cleanup:n};if(typeof n==`object`)return n}const wS=1;function cc(n,t){return n===t?0:nGs(r)??null);if(n instanceof Date)return{__type:`date`,value:n.toISOString()};if(n instanceof Set)return{__type:`set`,values:Array.from(n).map(l=>Gs(l)??null).sort((l,o)=>cc(bi(l),bi(o)))};if(n instanceof Map)return{__type:`map`,entries:Array.from(n.entries()).map(([l,o])=>({key:Gs(l)??null,value:Gs(o)??null})).sort((l,o)=>cc(bi(l.key),bi(o.key)))};if(n instanceof RegExp)return{__type:`regexp`,value:n.toString()};const t={},i=Object.entries(n).sort(([r],[l])=>cc(r,l));for(const[r,l]of i){const o=Gs(l);o!==void 0&&(t[r]=o)}return t}function bi(n){return n===null?`null`:Array.isArray(n)?`[${n.map(bi).join(`,`)}]`:typeof n!=`object`?JSON.stringify(n):`{${Object.keys(n).sort((r,l)=>cc(r,l)).map(r=>`${JSON.stringify(r)}:${bi(n[r])}`).join(`,`)}}`}function jT(n,t,i,r,l){const o=NT(r),u=Gs(t)??null,d=Gs(l),g=Gs({signatureVersion:wS,expression:u,options:d??null})??null,y=bi(g);return{signatureVersion:wS,signature:y,indexId:n,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function xd(n){if(n===null||typeof n!=`object`)return n;if(Array.isArray(n))return n.map(i=>xd(i));const t={};for(const[i,r]of Object.entries(n))t[i]=xd(r);return t}function BT(n){return JSON.parse(JSON.stringify(n))}class LT{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=Jv(),o=t(l),u=ne(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Ai(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=jT(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:BT(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:xd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var IT={};const HT=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),qT=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),KT=new Set([`set`,`delete`,`clear`,`add`]),VT=new Set([`entries`,`keys`,`values`,`forEach`]);function ap(n){return n!==null&&typeof n==`object`&&!(n instanceof Date)&&!(n instanceof RegExp)&&!Xs(n)}function $T(n,t,i,r){if(HT.has(n))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,y)=>{if(ap(g)){const m={tracker:i,prop:String(y)},{proxy:v}=r(g,m);return v}return g},d=function(g,y,m){const v=u(g,y);return o.call(this,v,y,m)};if(n===`reduce`||n===`reduceRight`){const g=function(y,m,v,w){const b=u(m,v);return o.call(this,y,b,v,w)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((n===`find`||n===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return n===`filter`&&Array.isArray(p)?p.map(g=>{const y=i.copy_.indexOf(g);return y!==-1?u(g,y):g}):p}}function GT(n,t){return function(){const i=n.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(ap(l)){const u={tracker:n,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function ES(n,t,i){return function(...r){const l=n.apply(t.copy_,r);return i(t),l}}function YT(n,t,i,r,l,o,u){if(VT.has(n)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(n===`forEach`){const m=p[0];if(typeof m==`function`){const v=function(w,b,E){const _=m.call(this,w,b,E);return u(l),_};return i.apply(r,[v,...p.slice(1)])}}if(n===`entries`||n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator){const m=g,v=new Map;if(n===`values`&&r instanceof Map)for(const[b,E]of l.copy_.entries())v.set(E,b);const w=new Map;if(r instanceof Set)for(const b of l.copy_.values())w.set(b,b);return{next(){const b=m.next();if(!b.done&&b.value&&typeof b.value==`object`){if(n===`entries`&&Array.isArray(b.value)&&b.value.length===2){if(b.value[1]&&typeof b.value[1]==`object`){const E=b.value[0],_={tracker:l,prop:E,updateMap:O=>{l.copy_ instanceof Map&&l.copy_.set(E,O)}},{proxy:j}=o(b.value[1],_);b.value[1]=j}}else if(n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator)if(n===`values`&&r instanceof Map){const E=v.get(b.value);if(E!==void 0){const _={tracker:l,prop:E,updateMap:O=>{l.copy_ instanceof Map&&l.copy_.set(E,O)}},{proxy:j}=o(b.value,_);b.value=j}}else if(r instanceof Set){const E=b.value,_={tracker:l,prop:E,updateSet:O=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(O),w.set(E,O))}},{proxy:j}=o(b.value,_);b.value=j}else{const E=Symbol(`iterator-value`),{proxy:_}=o(b.value,{tracker:l,prop:E});b.value=_}}return b},[Symbol.iterator](){return this}}}return g}}function Tt(...n){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...n):!t&&typeof process<`u`&&IT.DEBUG===`true`&&console.log(`[proxy]`,...n)}function ds(n,t=new WeakMap){if(n==null||typeof n!=`object`)return n;if(t.has(n))return t.get(n);if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n.source,n.flags);if(Array.isArray(n)){const l=[];return t.set(n,l),n.forEach((o,u)=>{l[u]=ds(o,t)}),l}if(ArrayBuffer.isView(n)&&!(n instanceof DataView)){const l=Object.getPrototypeOf(n).constructor,o=new l(n.length);t.set(n,o);for(let u=0;u{l.set(u,ds(o,t))}),l}if(n instanceof Set){const l=new Set;return t.set(n,l),n.forEach(o=>{l.add(ds(o,t))}),l}if(Xs(n))return n;const i={};t.set(n,i);for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=ds(n[l],t));const r=Object.getOwnPropertySymbols(n);for(const l of r)i[l]=ds(n[l],t);return i}let CS=0;function FT(){return CS+=1,CS}function lp(n,t){const i=new Map;function r(m,v){if(Tt(`Object ID:`,m.constructor.name),i.has(m))return i.get(m);{const w=lp(m,v);return i.set(m,w),w}}const l=new Map,o={copy_:ds(n),originalObject:ds(n),proxyCount:FT(),modified:!1,assigned_:{},parent:t,target:n};Tt(`createChangeProxy called for target`,n,o.proxyCount);function u(m){m.modified||(m.modified=!0),m.parent&&(Tt(`propagating change to parent`),`updateMap`in m.parent?m.parent.updateMap(m.copy_):`updateSet`in m.parent?m.parent.updateSet(m.copy_):(m.parent.tracker.copy_[m.parent.prop]=m.copy_,m.parent.tracker.assigned_[m.parent.prop]=!0),u(m.parent.tracker))}function d(m){if(Tt(`checkIfReverted called with assigned keys:`,Object.keys(m.assigned_)),Object.keys(m.assigned_).length===0&&Object.getOwnPropertySymbols(m.assigned_).length===0)return Tt(`No assigned properties, returning true`),!0;for(const w in m.assigned_)if(m.assigned_[w]===!0){const b=m.copy_[w],E=m.originalObject[w];if(Tt(`Checking property ${String(w)}, current:`,b,`original:`,E),!Bn(b,E))return Tt(`Property ${String(w)} is different, returning false`),!1}else if(m.assigned_[w]===!1)return Tt(`Property ${String(w)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(m.assigned_);for(const w of v)if(m.assigned_[w]===!0){const b=m.copy_[w],E=m.originalObject[w];if(!Bn(b,E))return Tt(`Symbol property is different, returning false`),!1}else if(m.assigned_[w]===!1)return Tt(`Symbol property was deleted, returning false`),!1;return Tt(`All properties match original values, returning true`),!0}function p(m,v){Tt(`checkParentStatus called for child prop:`,v);const w=d(m);Tt(`Parent checkIfReverted returned:`,w),w&&(Tt(`Parent is fully reverted, clearing tracking`),m.modified=!1,m.assigned_={},m.parent&&(Tt(`Continuing up the parent chain`),p(m.parent.tracker,m.parent.prop)))}function g(m){if(Tt(`createObjectProxy`,m),l.has(m))return Tt(`proxyCache found match`),l.get(m);const v=new Proxy(m,{get(w,b){Tt(`get`,w,b);const E=o.copy_[b]??o.originalObject[b],_=o.originalObject[b];if(Tt(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(w,b)?.get)return E;if(typeof E==`function`){if(Array.isArray(w)){const O=b.toString();if(qT.has(O))return ES(E,o,u);const A=$T(O,E,o,r);if(A)return A;if(b===Symbol.iterator)return GT(o,r)}if(w instanceof Map||w instanceof Set){const O=b.toString();if(KT.has(O))return ES(E,o,u);const A=YT(O,b,E,w,o,r,u);if(A)return A}return E.bind(w)}if(ap(E)){const O={tracker:o,prop:String(b)},{proxy:A}=r(_,O);return l.set(E,A),A}return E},set(w,b,E){const _=o.copy_[b];if(Tt(`set called for property ${String(b)}, current:`,_,`new:`,E),Bn(_,E))Tt(`Value unchanged, not tracking`);else{const j=o.originalObject[b],O=Bn(E,j);if(Tt(`value:`,E,`original:`,j,`isRevertToOriginal:`,O),O){Tt(`Reverting property ${String(b)} to original value`),delete o.assigned_[b.toString()],Tt(`Updating copy with original value for ${String(b)}`),o.copy_[b]=ds(j),Tt(`Checking if all properties reverted`);const A=d(o);Tt(`All reverted:`,A),A?(Tt(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(Tt(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(Tt(`Some properties still changed, keeping modified flag`),o.modified=!0)}else Tt(`Setting new value for property ${String(b)}`),o.copy_[b]=E,o.assigned_[b.toString()]=!0,Tt(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(w,b,E){const _=Reflect.defineProperty(w,b,E);return _&&`value`in E&&(o.copy_[b]=ds(E.value),o.assigned_[b.toString()]=!0,u(o)),_},getOwnPropertyDescriptor(w,b){return Reflect.getOwnPropertyDescriptor(w,b)},preventExtensions(w){return Reflect.preventExtensions(w)},isExtensible(w){return Reflect.isExtensible(w)},deleteProperty(w,b){Tt(`deleteProperty`,w,b);const E=typeof b==`symbol`?b.toString():b;if(E in w){const _=E in o.originalObject,j=Reflect.deleteProperty(w,b);return j&&(_?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),j}return!0}});return l.set(m,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(Tt(`getChanges called, modified:`,o.modified),Tt(o),!o.modified)return Tt(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const m={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(m[v]=o.copy_[v]);return Tt(`Returning copy:`,m),m}}}function QT(n){const t=n.map(i=>lp(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function XT(n,t){const{proxy:i,getChanges:r}=lp(n);return t(i),r()}function JT(n,t){const{proxies:i,getChanges:r}=QT(n);return t(i),r()}function ZT(){let n,t,i=!0;return{promise:new Promise((l,o)=>{n=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:n,reject:t,isPending:()=>i}}function WT(n){return typeof n==`object`&&n!==null&&typeof n.hasPendingGraphRun==`function`}class PT{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const xc=new PT,_c=[];let fl=[],tA=0;function eA(n,t){switch(`${n.type}-${t.type}`){case`insert-update`:return{...n,type:`insert`,original:{},modified:t.modified,changes:{...n.changes,...t.changes},key:n.key,globalKey:n.globalKey,metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:n.original,changes:{...n.changes,...t.changes},metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${n.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Za(n){const t=new rA(n);return _c.push(t),t}function uc(){if(fl.length>0)return fl.slice(-1)[0]}function nA(n){xc.clear(n.id),fl.push(n)}function sA(n){try{xc.flush(n.id)}finally{fl=fl.filter(t=>t.id!==n.id)}}function iA(n){const t=_c.findIndex(i=>i.id===n.id);t!==-1&&_c.splice(t,1)}let rA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new FC;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=ZT(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=tA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&iA(this)}mutate(t){if(this.state!==`pending`)throw new XC;nA(this);try{t()}finally{sA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=eA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new JC;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of _c)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new ZC;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class aA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=uc();if(!u&&!this.config.onInsert)throw new $C;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(y=>{const m=this.validateData(y,`insert`),v=this.config.getKey(m);if(this.state.has(v)||g.has(v))throw new jC(v);g.add(v);const w=this.generateGlobalKey(v,y),b={mutationId:crypto.randomUUID(),original:{},modified:m,changes:Object.fromEntries(Object.keys(y).map(E=>[E,m[E]])),globalKey:w,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(b)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const y=Za({metadata:{[lc]:!0},mutationFn:async m=>await this.config.onInsert({transaction:m.transaction,collection:this.collection})});return y.applyMutations(p),this.markPendingLocalOrigins(p),y.commit().catch(()=>{}),o.transactions.set(y.id,y),o.scheduleTransactionCleanup(y),o.recomputeOptimisticState(!0),y}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=uc();if(!u&&!this.config.onDelete)throw new YC;if(Array.isArray(r)&&r.length===0)throw new KC;const d=Array.isArray(r)?r:[r],p=[];for(const y of d){if(!this.state.has(y))throw new VC(y);const m=this.generateGlobalKey(y,this.state.get(y)),v={mutationId:crypto.randomUUID(),original:this.state.get(y),modified:this.state.get(y),changes:this.state.get(y),globalKey:m,key:y,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(y)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Za({autoCommit:!0,metadata:{[lc]:!0},mutationFn:async y=>this.config.onDelete({transaction:y.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new RC}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new P0;if(`issues`in p&&p.issues){const v=p.issues.map(w=>({message:w.message,path:w.path?.map(b=>String(b))}));throw new W0(i,v)}const g=p.value,y=Object.keys(t);return Object.fromEntries(y.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new P0;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new W0(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new zC(i):new NC(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new LC;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=uc();if(!o&&!this.config.onUpdate)throw new GC;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new IC;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,y=d.map(b=>{const E=this.state.get(b);if(!E)throw new HC(b);return E});let m;u?m=JT(y,p):m=[XT(y[0],p)];const v=d.map((b,E)=>{const _=m[E];if(!_||Object.keys(_).length===0)return null;const j=y[E],O=this.validateData(_,`update`,b),A=Object.assign({},j,O),M=this.config.getKey(j),G=this.config.getKey(A);if(M!==G)throw new qC(M,G);const q=this.generateGlobalKey(G,A);return{mutationId:crypto.randomUUID(),original:j,modified:A,changes:Object.fromEntries(Object.keys(_).map(K=>[K,A[K]])),globalKey:q,key:b,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(b)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const b=Za({mutationFn:async()=>{}});return b.commit().catch(()=>{}),l.scheduleTransactionCleanup(b),b}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const w=Za({metadata:{[lc]:!0},mutationFn:async b=>this.config.onUpdate({transaction:b.transaction,collection:this.collection})});return w.applyMutations(v),this.markPendingLocalOrigins(v),w.commit().catch(()=>{}),l.transactions.set(w.id,w),l.scheduleTransactionCleanup(w),l.recomputeOptimisticState(!0),w}}class lA extends Zv{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function op(n){const t=new cp(n);return n.utils?t.utils=n.utils:t.utils={},t}class cp{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new AC;if(!t.sync)throw new OC;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Ai(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: + import { BasicIndex } from '@tanstack/db' + createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new OT,this._events=new lA,this._indexes=new LT,this._lifecycle=new kT(t,this.id),this._mutations=new aA(t,this.id),this._state=new bT(t),this._sync=new UT(t,this.id),this.comparisonOpts=oA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return mT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function oA(n){if(n.defaultStringCollation){const t=n.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function cA(n){return!!n&&(typeof n==`object`||typeof n==`function`)&&typeof n.then==`function`}function uA(n){const{mutationFn:t,onMutate:i,...r}=n;return l=>{const o=Za({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(cA(u))throw new QC}),o}}function fA(n){const t=hA(n);let i=n,r,l=0;const o=10;for(;leb(u)),l=nb(r),o=Pv(n);for(const[u,d]of l.singleSource)dA(n,u)&&!o.has(u)&&t.set(u,d);return t}function dA(n,t){if(n.from.alias===t)return n.from.type===`collectionRef`;if(n.join){for(const i of n.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function Pv(n){const t=new Set;if(n.join){const i=n.from.alias;for(const r of n.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function _d(n){const t={...n,from:n.from.type===`queryRef`?new Sn(_d(n.from.query),n.from.alias):n.from,join:n.join?.map(i=>({...i,from:i.from.type===`queryRef`?new Sn(_d(i.from.query),i.from.alias):i.from}))};return pA(t)}function pA(n){if(!n.where||n.where.length===0)return n;if(!n.join||n.join.length===0){if(n.where.length>1){const d=Ad(n.where),p=Tc(d);return{...n,where:[p]}}return n}const t=n.where.filter(d=>!Z0(d)),r=Ad(t).map(d=>eb(d)),l=nb(r),o=yA(n,l),u=n.where.filter(d=>Z0(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function tb(n){return{...n,from:Td(n.from),join:n.join?.map(t=>({...t,from:Td(t.from)}))}}function Td(n){if(n.type===`collectionRef`)return n;const t=tb(n.query);if(gA(t)){const i=Td(t.from);return i.type===`collectionRef`?new jr(i.collection,n.alias):new Sn(i.query,n.alias)}return new Sn(t,n.alias)}function gA(n){return(!n.where||n.where.length===0)&&!n.select&&(!n.groupBy||n.groupBy.length===0)&&(!n.having||n.having.length===0)&&(!n.orderBy||n.orderBy.length===0)&&(!n.join||n.join.length===0)&&n.limit===void 0&&n.offset===void 0&&!n.fnSelect&&(!n.fnWhere||n.fnWhere.length===0)&&(!n.fnHaving||n.fnHaving.length===0)}function Ad(n){const t=[];for(const i of n){const r=Wd(i);t.push(...up(r))}return t}function up(n){if(n.type===`func`&&n.name===`and`){const t=[];for(const i of n.args)t.push(...up(i));return t}else return[n]}function eb(n){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(n),{expression:n,touchedSources:t,hasNamespaceOnlyRef:i}}function nb(n){const t=new Map,i=[];for(const o of n)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,Tc(u));const l=i.length>0?Tc(i):void 0;return{singleSource:r,multiSource:l}}function yA(n,t){const i=new Set,r=Pv(n),l=new Map;for(const[m,v]of t.singleSource)r.has(m)||l.set(m,v);const o=xS(n.from,l,i),u=n.join?n.join.map(m=>({...m,from:xS(m.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[m,v]of t.singleSource)i.has(m)?p&&d.push(_C(v)):d.push(v);const g=d.length>1?[Tc(d.flatMap(m=>up(Wd(m))))]:d;return{select:n.select,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,distinct:n.distinct,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function Tr(n){return{from:n.from.type===`collectionRef`?new jr(n.from.collection,n.from.alias):new Sn(Tr(n.from.query),n.from.alias),select:n.select,join:n.join?n.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new jr(t.from.collection,t.from.alias):new Sn(Tr(t.from.query),t.from.alias)})):void 0,where:n.where?[...n.where]:void 0,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0}}function xS(n,t,i){const r=t.get(n.alias);if(!r)return n.type===`collectionRef`?new jr(n.collection,n.alias):new Sn(Tr(n.query),n.alias);if(n.type===`collectionRef`){const u={from:new jr(n.collection,n.alias),where:[r]};return i.add(n.alias),new Sn(u,n.alias)}if(!EA(n.query,r,n.alias))return new Sn(Tr(n.query),n.alias);if(xA(n.query,r,n.alias))return new Sn(Tr(n.query),n.alias);const l=n.query.where||[],o={...Tr(n.query),where:[...l,r]};return i.add(n.alias),new Sn(o,n.alias)}function mA(n,t,i){return n.select?sb(n.select)||CA(n.select,t,i):!1}function SA(n){return n.groupBy&&n.groupBy.length>0}function vA(n){return n.having&&n.having.length>0}function bA(n){return n.orderBy&&n.orderBy.length>0&&(n.limit!==void 0||n.offset!==void 0)}function wA(n){return n.fnSelect||n.fnWhere&&n.fnWhere.length>0||n.fnHaving&&n.fnHaving.length>0}function EA(n,t,i){return!(mA(n,t,i)||SA(n)||vA(n)||bA(n)||wA(n))}function sb(n){for(const t of Object.values(n))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&sb(i))return!0}return!1}function fp(n){const t=[];if(n==null||typeof n!=`object`)return t;switch(n.type){case`ref`:t.push(n);break;case`func`:case`agg`:for(const i of n.args??[])t.push(...fp(i));break}return t}function CA(n,t,i){const r=new Set;for(const[o,u]of Object.entries(n))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Oe||r.add(o);const l=fp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function xA(n,t,i){const r=fp(t);if(r.every(o=>o.path[0]!==i))return!1;if(n.fnSelect)return!0;const l=n.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Oe)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==n.from.alias||g!==u[1])return!0}return!1}function Tc(n){if(n.length===0)throw new Ax;return n.length===1?n[0]:new Ve(`and`,n)}function _A(n,t,i,r,l,o,u,d,p,g,y,m,v,w,b,E,_,j,O){let A=n;for(const M of t)A=TA(A,M,i,r,l,o,u,d,p,g,y,m,v,w,b,E,_,j,O);return A}function TA(n,t,i,r,l,o,u,d,p,g,y,m,v,w,b,E,_,j,O){const A=t.from.type===`collectionRef`,{alias:M,input:G,collectionId:q}=OA(t.from,o,p,g,y,m,v,w,u,d,E,_,j,O);i[M]=G,A&&(_[M]=q);const K=p[r],W=p[q];if(!K)throw new eS(r);if(!W)throw new eS(q);const{activeSource:et,lazySource:X}=DA(t.type,K,W),at=Object.keys(i),{mainExpr:nt,joinedExpr:bt}=AA(t.left,t.right,at,M),Lt=ue(nt),dt=ue(bt);let k=n.pipe(le(([Z,it])=>[xr(Lt(it)),[Z,it]])),I=G.pipe(le(([Z,it])=>{const ft={[M]:it};return[xr(dt(ft)),[Z,ft]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new gx(t.type);if(et){const Z=et===`main`?t.from:b.from,it=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ft=nt.type===`func`||bt.type===`func`;if(!it&&!ft){const T=et===`main`?M:l;m.add(T);const B=et===`main`?k:I,Q=ol(b,et===`main`?bt:nt,X),ot=Q.collection,st=Q.path[0];st&&$c(st,Q.path,ot);const mt=B.pipe(Z_(Ut=>{const wt=j[T]||T,an=g[wt];if(!an)throw new Ox(wt,T,X.id,Object.keys(g));if(an.hasLoadedInitialState())return;const $e=Ut.getInner().map(([[Te]])=>Te),Ps=new Oe(Q.path);an.requestSnapshot({where:CT(Ps,$e),optimizedOnly:!0})||an.requestSnapshot()}));et===`main`?k=mt:I=mt}}return k.pipe(Xv(I,t.type),RA(t.type))}function AA(n,t,i,r){const l=i.filter(d=>d!==r),o=Od(n),u=Od(t);if(o&&l.includes(o)&&u===r)return{mainExpr:n,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:n};throw!o||!u?new mx:o===u?new yx(o):l.includes(o)?u!==r?new vx(r):new bx:new Sx(o)}function Od(n){switch(n.type){case`ref`:return n.path[0]||null;case`func`:{const t=new Set;for(const i of n.args){const r=Od(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function OA(n,t,i,r,l,o,u,d,p,g,y,m,v,w){switch(n.type){case`collectionRef`:{const b=t[n.alias];if(!b)throw new Nv(n.alias,n.collection.id,Object.keys(t));return m[n.alias]=n.collection.id,{alias:n.alias,input:b,collectionId:n.collection.id}}case`queryRef`:{const b=g.get(n.query)||n.query,E=y(b,t,i,r,l,o,u,d,p,g);Object.assign(m,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const _=g.has(n.query),j=n.query.from.alias;if(!(!_&&n.alias===j))for(const[q,K]of E.sourceWhereClauses)w.set(q,K);const A=Object.keys(E.aliasToCollectionId).find(q=>E.aliasToCollectionId[q]===E.collectionId);A&&A!==n.alias&&(v[n.alias]=A);const G=E.pipeline.pipe(le(q=>{const[K,[W,et]]=q;return[K,W]}));return{alias:n.alias,input:G,collectionId:E.collectionId}}default:throw new wx(n.type)}}function RA(n){return function(t){return t.pipe(ps(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return n===`inner`?!!(u&&d):n===`left`?!!u:n===`right`?!!d:!0}),le(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],y={};return d&&Object.assign(y,d),g&&Object.assign(y,g),[`[${u},${p}]`,y]}))}}function DA(n,t,i){switch(n){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeUA(l,r)))}function NA(n){return n.type===`agg`}function jA(n){return n&&typeof n==`object`&&!Br(n)}function ib(n,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const y=[...n],m=g?l:new Oe(p.split(`.`)),v=ue(m);i.push({kind:`merge`,targetPath:y,source:v})}else{const y=p,m=[...n];i.push({kind:`merge`,targetPath:m,source:v=>v[y]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});continue}if(jA(o)){ib([...n,r],o,i);continue}if(NA(o)||Lr(o))i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Br(o)){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>o});continue}if(o instanceof Ue){const u=o.value;i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:ue(o)})}}}const Or=Symbol(`includesRouting`);function Ac(n,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,y,m){const v=p.get(n);if(v)return v;Dd(n);const{optimizedQuery:w,sourceWhereClauses:b}=fA(n);let E=w;g.set(E,n),kd(E,n,g);const _={...t},j={},O={},A={},{alias:M,input:G,collectionId:q}=LA(E.from,_,i,r,l,o,u,d,p,g,j,O,b);A[M]=G;let K=G;if(y&&m){const dt=m.path.slice(1);K=G.pipe(le(([Z,it])=>[KA(it,dt),[Z,it]])).pipe(Xv(y,`inner`)).pipe(ps(([Z,[it]])=>it!=null),le(([Z,[it,ft]])=>{const[T,B]=it,Y={...B,__correlationKey:Z};return ft!=null&&(Y.__parentContext=ft),[ft!=null?`${String(T)}::${JSON.stringify(ft)}`:T,Y]})),A[M]=K}let W=K.pipe(le(([dt,k])=>{const{__parentContext:I,...Z}=k,it={[M]:Z};return I&&(Object.assign(it,I),it.__parentContext=I),[dt,it]}));if(E.join&&E.join.length>0&&(W=_A(W,E.join,A,q,M,_,p,g,i,r,l,o,u,d,n,Ac,j,O,b)),E.where&&E.where.length>0)for(const dt of E.where){const k=Wd(dt),I=ue(k);W=W.pipe(ps(([Z,it])=>Ar(I(it))))}if(E.fnWhere&&E.fnWhere.length>0)for(const dt of E.fnWhere)W=W.pipe(ps(([k,I])=>Ar(dt(I))));const et=[],X=[];if(E.select){const dt=HA(E.select);dt.length>0&&(E={...E,select:{...E.select}});for(const{key:k,subquery:I}of dt){const Z=ue(I.correlationField);let it;if(I.parentProjection&&I.parentProjection.length>0){const B=I.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:ue(Y)}));it=W.pipe(le(([Y,Q])=>{const ot={};for(const st of B){ot[st.alias]||(ot[st.alias]={});const mt=st.compiled(Q);let Ut=ot[st.alias];for(let wt=0;wt[Z(Y),null]));it=it.pipe($v(B=>B.map(([Y,Q])=>[Y,Q>0?1:0])));const ft=I.parentFilters&&I.parentFilters.length>0?{...I.query,where:[...I.query.where||[],...I.parentFilters]}:I.query,T=Ac(ft,_,i,r,l,o,u,d,p,g,it,I.childCorrelationField);if(Object.assign(j,T.aliasToCollectionId),Object.assign(O,T.aliasRemapping),et.push({pipeline:T.pipeline,fieldName:I.fieldName,correlationField:I.correlationField,childCorrelationField:I.childCorrelationField,hasOrderBy:!!(I.query.orderBy&&I.query.orderBy.length>0),childCompilationResult:T,parentProjection:I.parentProjection,materialization:I.materialization,scalarField:I.scalarField}),I.parentProjection&&I.parentProjection.length>0){const B=I.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:ue(Q)})),Y=Z;X.push({fieldName:I.fieldName,getRouting:Q=>{const ot={};for(const st of B){ot[st.alias]||(ot[st.alias]={});const mt=st.compiled(Q);let Ut=ot[st.alias];for(let wt=0;wt({correlationKey:Z(B),parentContext:null})});qA(E.select,k)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new rx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new ax;E.fnSelect?W=W.pipe(le(([dt,k])=>{const I=E.fnSelect(k);return[dt,{...k,$selected:I}]})):E.select?W=zA(W,E.select):W=W.pipe(le(([dt,k])=>{const I=!E.join&&!E.groupBy?k[M]:k;return[dt,{...k,$selected:I}]})),X.length>0&&(W=W.pipe(le(([dt,k])=>{const I={};for(const{fieldName:Z,getRouting:it}of X)I[Z]=it(k);return k.$selected[Or]=I,[dt,k]})));const at=y?M:void 0;if(E.groupBy&&E.groupBy.length>0?W=yS(W,E.groupBy,E.having,E.select,E.fnHaving,q,at):E.select&&Object.values(E.select).some(k=>k.type===`agg`||Lr(k))&&(W=yS(W,[],E.having,E.select,E.fnHaving,q,at)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(k=>k.type===`agg`):!1))throw new ox;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const dt of E.fnHaving)W=W.pipe(ps(([k,I])=>dt(I)));if(E.distinct&&(W=W.pipe(H_(([dt,k])=>k.$selected))),E.orderBy&&E.orderBy.length>0){const dt=y&&(E.limit!==void 0||E.offset!==void 0)?(ft,T)=>{const B=T?.[M]?.__correlationKey,Y=T?.__parentContext;return Y!=null?JSON.stringify([B,Y]):B}:void 0,Z=yT(n,W,E.orderBy,E.select||{},i[q],u,d,E.limit,E.offset,dt).pipe(le(([ft,[T,B]])=>{const Y=T.$selected,Q=_S(Md(Y),T);if(y){const ot=T[M]?.__correlationKey,st=T.__parentContext??null;return delete Q.__correlationKey,delete Q.__parentContext,[ft,[Q,B,ot,st]]}return[ft,[Q,B]]})),it={collectionId:q,pipeline:Z,sourceWhereClauses:b,aliasToCollectionId:j,aliasRemapping:O,includes:et.length>0?et:void 0};return p.set(n,it),it}else if(E.limit!==void 0||E.offset!==void 0)throw new cx;const bt=W.pipe(le(([dt,k])=>{const I=k.$selected,Z=_S(Md(I),k);if(y){const it=k[M]?.__correlationKey,ft=k.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[dt,[Z,void 0,it,ft]]}return[dt,[Z,void 0]]})),Lt={collectionId:q,pipeline:bt,sourceWhereClauses:b,aliasToCollectionId:j,aliasRemapping:O,includes:et.length>0?et:void 0};return p.set(n,Lt),Lt}function BA(n){const t=new Set;if(n.from.type===`collectionRef`&&t.add(n.from.alias),n.join)for(const i of n.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Dd(n,t=new Set){const i=BA(n);for(const l of i)if(t.has(l))throw new ux(l,Array.from(t));const r=new Set([...t,...i]);if(n.from.type===`queryRef`&&Dd(n.from.query,r),n.join)for(const l of n.join)l.from.type===`queryRef`&&Dd(l.from.query,r)}function LA(n,t,i,r,l,o,u,d,p,g,y,m,v){switch(n.type){case`collectionRef`:{const w=t[n.alias];if(!w)throw new Nv(n.alias,n.collection.id,Object.keys(t));return y[n.alias]=n.collection.id,{alias:n.alias,input:w,collectionId:n.collection.id}}case`queryRef`:{const w=g.get(n.query)||n.query,b=Ac(w,t,i,r,l,o,u,d,p,g);Object.assign(y,b.aliasToCollectionId),Object.assign(m,b.aliasRemapping);const E=g.has(n.query),_=n.query.from.alias;if(!(!E&&n.alias===_))for(const[G,q]of b.sourceWhereClauses)v.set(G,q);const O=Object.keys(b.aliasToCollectionId).find(G=>b.aliasToCollectionId[G]===b.collectionId);O&&O!==n.alias&&(m[n.alias]=O);const M=b.pipeline.pipe(le(G=>{const[q,[K,W]]=G,et=Md(K);return[q,et]}));return{alias:n.alias,input:M,collectionId:b.collectionId}}default:throw new fx(n.type)}}function IA(n){return n instanceof Ue||n&&typeof n==`object`&&`type`in n&&n.type===`val`}function Md(n){return IA(n)?n.value:n}function _S(n,t){if(!n||typeof n!=`object`)return n;let i=!1;for(const r of pd)if(n[r]==null&&r in t){i=!0;break}if(!i)return n;for(const r of pd)n[r]==null&&r in t&&(n[r]=t[r]);return n}function kd(n,t,i){if(n.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(n.from.query,t.from.query),kd(n.from.query,t.from.query,i)),n.join&&t.join)for(let r=0;r1)return new Oe(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Oe([r[0]])}return new Oe(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of n.args){const o=hp(l,t);r.push(o)}return new Ve(n.name,r)}}function dp(n,t){return n.map(r=>{const l=hp(r.expression,t);return{...r,expression:l}})}const lb=new WeakMap;function VA(n){return n.utils?.[rp]?.getBuilder?.()}function $A(n,t){lb.set(n,t)}function GA(n){return lb.get(n)}class Zt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Qo(i,d)}if(Array.isArray(t))throw new Qo(i,`array`);if(r.length!==1)throw r.length===0?new Qo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Qo(i,`string`):new tx(i);const l=r[0],o=t[l];let u;if(o instanceof cp)u=new jr(o,l);else if(o instanceof Zt){const d=o._getQuery();if(!d.from)throw new ex(i);u=new Sn(d,l)}else throw new nx(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Zt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=vi(d),g=i(p);let y,m;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)y=g.args[0],m=g.args[1];else throw new sx;const v={from:o,type:r,left:y,right:m},w=this.query.join||[];return new Zt({...this.query,join:[...w,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=oc(l)?ne(l):l;if(!Br(o))throw new tS(TS(o));const u=this.query.where||[];return new Zt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?bS(i):vi(i),l=t(r),o=oc(l)?ne(l):l;if(!Br(o))throw new tS(TS(o));const u=this.query.having||[];return new Zt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=vi(i);let l=t(r);oc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=cb(l,i);return new Zt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?bS(r):vi(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=y=>({expression:ne(y),compareOptions:u}),p=Array.isArray(o)?o.map(y=>d(y)):[d(o)],g=this.query.orderBy||[];return new Zt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=vi(i),l=t(r),o=Array.isArray(l)?l.map(d=>ne(d)):[ne(l)],u=this.query.groupBy||[];return new Zt({...this.query,groupBy:[...u,...o]})}limit(t){return new Zt({...this.query,limit:t})}offset(t){return new Zt({...this.query,offset:t})}distinct(){return new Zt({...this.query,distinct:!0})}findOne(){return new Zt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Zt({...t.query,select:void 0,fnSelect:i})},where(i){return new Zt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Zt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new ix;return this.query}}function TS(n){return n===null?`null`:n===void 0?`undefined`:typeof n==`object`?`object`:typeof n}function YA(n){return n===void 0?ne(null):n instanceof zv||n instanceof Ve||n instanceof Oe||n instanceof Ue?n:ne(n)}function ob(n){return n!==null&&typeof n==`object`&&!Br(n)&&!n.__refProxy}function cb(n,t=[]){if(!ob(n))return YA(n);const i={};for(const[r,l]of Object.entries(n)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Zt){i[r]=qh(l,r,t,`collection`);continue}if(l instanceof xT){if(!(l.query instanceof Zt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=qh(l.query,r,t,`array`);continue}if(l instanceof _T){if(!(l.query instanceof Zt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=qh(l.query,r,t,`concat`);continue}i[r]=cb(l,t)}return i}function pp(n){const t=[];switch(n.type){case`ref`:t.push(n);break;case`func`:for(const i of n.args??[])t.push(...pp(i));break}return t}function FA(n,t){const i=typeof n==`object`&&`expression`in n?n.expression:n;return pp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function qh(n,t,i,r){const l=n._getQuery(),o=[l.from.alias];if(l.join)for(const A of l.join)o.push(A.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let A=0;A=2){for(let q=0;q eq(child.parentId, parent.id))`);const y=[...l.where];if(g>=0){const A=y[p],G=(typeof A==`object`&&`expression`in A?A.expression:A).args.filter((q,K)=>K!==g);if(G.length===1){const q=typeof A==`object`&&`expression`in A&&A.residual;y[p]=q?{expression:G[0],residual:!0}:G[0]}else{const q=new Ve(`and`,G),K=typeof A==`object`&&`expression`in A&&A.residual;y[p]=K?{expression:q,residual:!0}:q}}else y.splice(p,1);const m=[],v=[];for(const A of y)FA(A,i)?v.push(A):m.push(A);let w;if(v.length>0){const A=new Set;w=[];for(const M of v){const G=typeof M==`object`&&`expression`in M?M.expression:M;for(const q of pp(G))q.path[0]!=null&&i.includes(q.path[0])&&!A.has(q.path.join(`.`))&&(A.add(q.path.join(`.`)),w.push(q))}}const b={...l,where:m.length>0?m:void 0},E=b.select,_=E===void 0||ob(E);let j=b,O;if(r===`concat`&&(E===void 0||_))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!_){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);O=xC,j={...b,select:{[O]:E}}}return new Ti(j,u,d,t,v.length>0?v:void 0,w,r,O)}function AS(n,t,i,r){if(n.type===`ref`&&t.type===`ref`){const l=n.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:n,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:n}}}function QA(n){const t=n(new Zt);return ub(t)}function ub(n){return n._getQuery()}function XA(n){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?r(d.query):gp(d)&&l(d))}return r(n),t}function fb(n){const t=n.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return fb(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(n)}`)}function JA(n){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ti?l(d.query):gp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(n),t}function gp(n){return!(n===null||typeof n!=`object`||n instanceof Ti||`type`in n&&typeof n.type==`string`||n.__refProxy)}function ZA(n){const t=typeof n.query==`function`?QA(n.query):ub(n.query);if(t.select&&!gp(t.select))throw new lx;return t}function WA(n,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&n.sendData(new ee(r)),r.length}function*PA(n){for(const t of n)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function tO(n,t){const i=[];for(const r of n){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function eO(n,t,i,r){let l=t,o=!1;for(const u of n){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function nO(n,t){const{orderBy:i,limit:r,offset:l}=n,o=r!==void 0&&l!==void 0?r+l:r,u=i?dp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const y=g.path;return Array.isArray(y)&&y.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function sO(n,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=n,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const y=cl({minValues:g??null,offset:d,limit:l});if(i===y)return;const m=dp(o,r);return{minValues:g,normalizedOrderBy:m,loadRequestKey:y}}const OS=Symbol.for(`@tanstack/db.collection-config-builder`);class iO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=hp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=tO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=WA(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=nO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const y={},m=E=>{const _=Array.isArray(E)?E:[...E];this.trackSentValues(_,i.comparator);const j=PA(_);this.sendChangesToPipelineWithTracking(j,y.current)},v=this.collection.subscribeChanges(m,{whereExpression:t,onStatusChange:r});y.current=v;const w=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{w()});const b=dp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:b,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:b,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[OS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[OS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=sO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=eO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let rO=0;class aO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++rO}`,this.query=ZA({query:t.query}),this.collections=XA(this.query);const i=JA(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=hb(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??fb(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[rp]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new Dx;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??uc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const y of g)p.add(y)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;xc.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=xc.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new N_,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=Ac(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new Rx(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(md(y=>{const m=y.getInner();i.messagesCount+=m.length,m.reduce(dO,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const y=p.size>0,m=fO(g);if(!y&&!m)return;let v=p;if(this.config.getKey){const w=new Map;for(const[,b]of p){const E=this.config.getKey(b.value),_=w.get(E);_?(_.inserts+=b.inserts,_.deletes+=b.deletes,b.inserts>0&&(_.value=b.value,b.orderByIndex!==void 0&&(_.orderByIndex=b.orderByIndex))):w.set(E,{...b})}v=w}y&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Ud(g,t.collection,this.id,y?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(md(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,w]=p,b=Ir(v,w);let E=l.pendingChildChanges.get(b);E||(E=new Map,l.pendingChildChanges.set(b,E));const _=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?_.deletes+=Math.abs(g):g>0&&(_.inserts+=g,_.value=y),E.set(d,_)}})),r.childCompilationResult.includes&&(l.nestedSetups=db(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=GA(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const y=new iO(u,d,p,this),m=p.on(`status:change`,b=>{this.handleSourceStatusChange(t,d,b)});i.unsubscribeCallbacks.add(m);const v=y.subscribe();return this.subscriptions[u]=v,y.loadMoreIfNeeded.bind(y,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function hb(n){return(t,i)=>{const r=n.get(t),l=n.get(i);return r&&l?rl?1:0:0}}function RS(n){return n.materialization!==`collection`}function DS(n,t){if(!t)return n.materialization===`array`?[]:n.materialization===`concat`?``:void 0;if(n.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=n.scalarField?i.map(l=>l?.[n.scalarField]):i;return n.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function db(n,t){return n.map(i=>{const r=new Map;i.pipeline.pipe(md(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[y,m,v,w]=p,b=Ir(v,w);let E=r.get(b);E||(E=new Map,r.set(b,E));const _=E.get(d)||{deletes:0,inserts:0,value:y,orderByIndex:m};g<0?_.deletes+=Math.abs(g):g>0&&(_.inserts+=g,_.value=y),E.set(d,_)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=db(i.childCompilationResult.includes,t)),l})}function lO(n){return n.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function oO(n){const t=new Set;if(!n.nestedSetups)return t;for(let i=0;i0&&(w.value=m.value,m.orderByIndex!==void 0&&(w.orderByIndex=m.orderByIndex))):v.set(y,{...m})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function cO(n,t,i){if(n.nestedSetups){for(const r of n.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Or]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){n.nestedRoutingIndex.set(p,t);let g=n.nestedRoutingReverseIndex.get(t);g||(g=new Set,n.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Or]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Ir(u,d);if(u!=null){n.nestedRoutingIndex.delete(p);const g=n.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&n.nestedRoutingReverseIndex.delete(t))}}}}function uO(n,t){if(!n.nestedRoutingReverseIndex)return;const i=n.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)n.nestedRoutingIndex.delete(r);n.nestedRoutingReverseIndex.delete(t)}}function pb(n){for(const t of n)if(t.buffer.size>0||t.nestedSetups&&pb(t.nestedSetups))return!0;return!1}function Ir(n,t){return t==null?n:JSON.stringify([n,t])}function MS(n,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?hb(u):void 0,y={collection:op({id:`__child-collection:${n}-${t}-${cl(i)}`,getKey:m=>o.get(m),compare:p,sync:{rowUpdateMode:`full`,sync:m=>(d=m,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(y.includesStates=lO(l)),y}function Ud(n,t,i,r,l){for(const o of n){if(r){for(const[y,m]of r)if(m.inserts>0){const v=m.value,w=v[Or]?.[o.fieldName],b=w?.correlationKey,E=w?.parentContext??null,_=Ir(b,E);if(b!=null){if(!o.childRegistry.has(_)){const M=MS(i,o.fieldName,_,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(_,M)}let j=o.correlationToParentKeys.get(_);j||(j=new Set,o.correlationToParentKeys.set(_,j)),j.add(y);const O=DS(o,o.childRegistry.get(_));v[o.fieldName]=O;const A=t.get(y);A&&A!==v&&(A[o.fieldName]=O)}}}const u=RS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[y,m]of o.pendingChildChanges){let v=o.childRegistry.get(y);if(v||(v=MS(i,o.fieldName,y,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(y,v)),o.materialization===`collection`&&hO(t,o.fieldName,y,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[w,b]of m)v.resultKeys.set(b.value,w),v.orderByIndices&&b.orderByIndex!==void 0&&v.orderByIndices.set(b.value,b.orderByIndex),b.inserts>0&&b.deletes===0?v.syncMethods.write({value:b.value,type:`insert`}):b.inserts>b.deletes||b.inserts===b.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(b.value))?v.syncMethods.write({value:b.value,type:`update`}):b.deletes>0&&v.syncMethods.write({value:b.value,type:`delete`});v.syncMethods.commit()}cO(o,y,m),d.set(y,{entry:v,childChanges:m})}o.pendingChildChanges.clear()}const p=oO(o);for(const[,{entry:y,childChanges:m}]of d)y.includesStates&&Ud(y.includesStates,y.collection,y.collection.id,m,y.syncMethods);for(const y of p){if(d.has(y))continue;const m=o.childRegistry.get(y);m?.includesStates&&Ud(m.includesStates,m.collection,m.collection.id,null,m.syncMethods)}const g=RS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const y=[];for(const m of g){const v=o.correlationToParentKeys.get(m);if(!v)continue;const w=o.childRegistry.get(m);for(const b of v){const E=t.get(b);if(E){const _=l.collection.getKeyFromItem(E),j={...E};E[o.fieldName]=DS(o,w),y.push({type:`update`,key:_,value:E,previousValue:j})}}}y.length>0&&t._changes.emitEvents(y,!0)}if(r){for(const[y,m]of r)if(m.deletes>0&&m.inserts===0){const v=m.value[Or]?.[o.fieldName],w=v?.correlationKey,b=v?.parentContext??null,E=Ir(w,b);if(w!=null){const _=o.correlationToParentKeys.get(E);_&&(_.delete(y),_.size===0&&(uO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Or]}function fO(n){for(const t of n)if(t.pendingChildChanges.size>0||t.nestedSetups&&pb(t.nestedSetups))return!0;return!1}function hO(n,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=n.get(u);d&&(d[t]=l)}}function dO(n,[[t,i],r]){const[l,o]=i,u=n.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),n.set(t,u),n}function kS(n){return new aO(n).getConfig()}function Kh(n){if(typeof n==`function`){const i=kS({query:n});return US(i)}else{const t=n,i=kS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),US(i)}}function US(n){const t=op(n),i=VA(n);return i&&$A(t,i),t}var Zo={exports:{}},Vh,zS;function pO(){if(zS)return Vh;zS=1;function n(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Vh=n,Vh}var NS;function gO(){if(NS)return Zo.exports;NS=1;var n=pO();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=n(r),g=null,y=null,m=0,v=null,w={push:M,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(X){if(!(X>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=X,!w.paused)for(;g&&m=d||w.paused?y?(y.next=nt,y=nt):(g=nt,y=nt,w.saturated()):(m++,u.call(o,nt.value,nt.worked))}function G(X,at){var nt=p.get();nt.context=o,nt.release=q,nt.value=X,nt.callback=at||i,nt.errorHandler=v,m>=d||w.paused?g?(nt.next=g,g=nt):(g=nt,y=nt,w.saturated()):(m++,u.call(o,nt.value,nt.worked))}function q(X){X&&p.release(X);var at=g;at&&m<=d?w.paused?m--:(y===g&&(y=null),g=at.next,at.next=null,u.call(o,at.value,at.worked),y===null&&w.empty()):--m===0&&w.drain()}function K(){g=null,y=null,w.drain=i}function W(){g=null,y=null,w.drain(),w.drain=i}function et(X){v=X}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,y=o.errorHandler,m=o.value;o.value=null,o.callback=i,o.errorHandler&&y(d,m),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,_){u.call(this,E).then(function(j){_(null,j)},_)}var g=t(o,p,d),y=g.push,m=g.unshift;return g.push=v,g.unshift=w,g.drained=b,g;function v(E){var _=new Promise(function(j,O){y(E,function(A,M){if(A){O(A);return}j(M)})});return _.catch(i),_}function w(E){var _=new Promise(function(j,O){m(E,function(A,M){if(A){O(A);return}j(M)})});return _.catch(i),_}function b(){var E=new Promise(function(_){process.nextTick(function(){if(g.idle())_();else{var j=g.drain;g.drain=function(){typeof j==`function`&&j(),_(),g.drain=j}}})});return E}}return Zo.exports=t,Zo.exports.promise=l,Zo.exports}var yO=gO();const gb=fC(yO),Tn=`Stream-Next-Offset`,Gc=`Stream-Cursor`,Yc=`Stream-Up-To-Date`,Ln=`Stream-Closed`,$h=`Stream-Seq`,mO=`Stream-TTL`,SO=`Stream-Expires-At`,jS=`Producer-Id`,Wo=`Producer-Epoch`,BS=`Producer-Seq`,vO=`Producer-Expected-Seq`,bO=`Producer-Received-Seq`,Gh=`offset`,Po=`live`,wO=`stream-sse-data-encoding`;var Js=class yb extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new yb(r,o,u,l,i)}},yp=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Wt=class zd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=LS(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new zd(d,u,r,l)}static fromFetchError(t){const i=LS(t.status);return new zd(t.message,i,t.status,t.json??t.text)}};function LS(n){switch(n){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var EO=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},mb=class extends Wt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(n,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,n),this.name=`StreamClosedError`,this.finalOffset=t}},CO=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const xO=[429,503],mp={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function _O(n){if(!n)return 0;const t=Number(n);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(n);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function Sb(n,t=mp){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],y=p[1];let m=i,v=0;for(;;)try{const w=await n(...p);if(w.ok)return w;throw await Js.fromResponse(w,g.toString())}catch(w){if(u?.(),y?.signal?.aborted)throw new yp;if(w instanceof Js&&!xO.includes(w.status)&&w.status>=400&&w.status<500)throw w;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),w;const b=w instanceof Js?_O(w.headers[`retry-after`]):0,E=Math.random()*m,_=Math.min(E,r),j=Math.max(b,_);if(o){const O=b>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${j}ms (${O}, serverMin=${b}ms, clientBackoff=${_}ms)`)}await new Promise(O=>setTimeout(O,j)),m=Math.min(m*l,r)}}}}const TO=[201,204,205];function AO(n){return async(...t)=>{const i=t[0],r=await n(...t);try{if(r.status<200||TO.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new yp:new Js(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function OO(n){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof n[Symbol.asyncIterator]==`function`}function RO(n){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof n[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(n,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(n,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Yh(n){return OO(n)||RO(n),n}async function*IS(n,t){const i=n.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` +`).replace(/\r/g,` +`);const g=l.split(` +`);l=g.pop()??``;for(const y of g)if(y===``){if(o.type&&o.data.length>0){const m=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:m};else if(o.type===`control`)try{const v=JSON.parse(m);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const w=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${w}`,`PARSE_ERROR`)}}o={data:[]}}else if(y.startsWith(`event:`)){const m=y.slice(6);o.type=m.startsWith(` `)?m.slice(1):m}else if(y.startsWith(`data:`)){const m=y.slice(5);o.data.push(m.startsWith(` `)?m.slice(1):m)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` +`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Sp=class{shouldContinueLive(n,t){return!(n&&this.upToDate||t===!1||this.streamClosed)}},vb=class Nd extends Sp{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new Nd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Nd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new vp(this)}},Fh=class Er extends Sp{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new Er({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new Er({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new Er({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new vb({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new Er({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new Er({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new vp(this)}},vp=class jd extends Sp{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new jd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new jd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const HS=`PAUSE_STREAM`;var DO=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#w;#m;#S;#v;#E;#O;constructor(n){this.url=n.url,this.contentType=n.contentType,this.live=n.live,this.startOffset=n.startOffset;const t={offset:n.initialOffset,cursor:n.initialCursor,upToDate:n.initialUpToDate,streamClosed:n.initialStreamClosed};this.#i=n.startSSE?new Fh(t):new vb(t),this.#t=n.firstResponse.headers,this.#e=n.firstResponse.status,this.#n=n.firstResponse.statusText,this.#s=n.firstResponse.ok,this.#a=!1,this.#c=n.isJsonMode,this.#l=n.abortController,this.#p=n.fetchNext,this.#d=n.startSSE,this.#v={minConnectionDuration:n.sseResilience?.minConnectionDuration??1e3,maxShortConnections:n.sseResilience?.maxShortConnections??3,backoffBaseDelay:n.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:n.sseResilience?.backoffMaxDelay??5e3,logWarnings:n.sseResilience?.logWarnings??!0},this.#E=n.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(n.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const n=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,n),this.#w=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,n)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(n=>{this.#S=n}),this.#u?.abort(HS))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof vp&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Wt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#w?.(),this.#h()}#_(n){this.#w?.(),this.#f(n)}#b(n){if(this.#x!==null)throw new Wt(`Cannot call ${n}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=n}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#j(n){this.#i=this.#i.withResponseMetadata({offset:n.headers.get(Tn)||void 0,cursor:n.headers.get(Gc)||void 0,upToDate:n.headers.has(Yc),streamClosed:n.headers.get(Ln)?.toLowerCase()===`true`}),this.#t=n.headers,this.#e=n.status,this.#n=n.statusText,this.#s=n.ok}#U(n){this.#i=this.#i.withSSEControl(n)}#z(){this.#i instanceof Fh||(this.#i=new Fh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const n=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=n.state,n.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(n.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,n.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?IS(t.body,this.#u.signal):null}async#B(n){const{done:t,value:i}=await n.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,n):(this.#U(i),i.upToDate?{type:`response`,response:kO(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(n,t){const i=[n];for(;;){const{done:r,value:l}=await t.next();if(r){const o=Bd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:Bd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(n){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(n.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&n.body)this.#z(),this.#u=new AbortController,i=IS(n.body,this.#u.signal);else{if(r.enqueue(n),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#j(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===HS){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#w?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#b(`body`),this.#y=!0;const n=this.#C(),t=[];try{let r=await n.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await n.read()}}finally{n.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#b(`json`),this.#A(),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Wt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t}async text(){this.#b(`text`),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t.join(``)}#N(){const{readable:n,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),n}bodyStream(){return this.#b(`bodyStream`),Yh(this.#N())}jsonStream(){this.#b(`jsonStream`),this.#A();const n=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await n.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const y=d.length>100?d.slice(0,100)+`...`:d;throw new Wt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${y}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await n.read()}this.#r(),r.close()},cancel:()=>{n.releaseLock(),this.cancel()}});return Yh(i)}textStream(){this.#b(`textStream`);const n=new TextDecoder,t=this.#N().pipeThrough(new TransformStream({transform(i,r){r.enqueue(n.decode(i,{stream:!0}))},flush(i){const r=n.decode();r&&i.enqueue(r)}}));return Yh(t)}subscribeJson(n){this.#b(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Qh(o,this.offset,this.cursor,this.streamClosed),m=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(m)}catch(b){const E=m.length>100?m.slice(0,100)+`...`:m;throw new Wt(`Failed to parse JSON response: ${b instanceof Error?b.message:String(b)}. Data: ${E}`,`PARSE_ERROR`)}const w=Array.isArray(v)?v:[v];await n({items:w,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(n){this.#b(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Qh(o,this.offset,this.cursor,this.streamClosed),y=await o.arrayBuffer();await n({data:new Uint8Array(y),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(n){this.#b(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=Qh(o,this.offset,this.cursor,this.streamClosed),y=await o.text();await n({text:y,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(n){this.#l.abort(n),this.#w?.(),this.#r()}get closed(){return this.#g}};function Qh(n,t,i,r){const l=n.headers.get(Tn),o=n.headers.get(Gc),u=n.headers.has(Yc),d=n.headers.get(Ln)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function MO(n){const t=n.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Wt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;lm.length>0).map(m=>MO(m));if(y.length===0)g=new ArrayBuffer(0);else if(y.length===1){const m=y[0];g=m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}else{const m=y.reduce((b,E)=>b+E.length,0),v=new Uint8Array(m);let w=0;for(const b of y)v.set(b,w),w+=b.length;g=v.buffer}}else if(d){const y=[];for(const m of n){const v=m.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const w=v.slice(1,-1).trim();w.length>0&&y.push(w)}else y.push(v)}g=`[${y.join(`,`)}]`}else g=n.join(``);return new Response(g,{status:200,headers:p})}async function nl(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function hs(n,t,i){const r=n.status;if(r===404)throw new Wt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(n.headers.get(Ln)?.toLowerCase()===`true`){const d=n.headers.get(Tn)??void 0;throw new mb(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Wt(o,u,409)}throw r===400?new Wt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Wt.fromResponse(n,t)}async function fc(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const qS=new Set;function UO(){if(!(typeof process>`u`))return`production`}function zO(){return typeof globalThis.window<`u`}function NO(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function jO(n){try{return new URL(n)}catch{const t=NO();if(t)try{return new URL(n,t)}catch{return}return}}function bb(n,t){if(t===!1||UO()===`test`||!zO()||typeof console>`u`||typeof console.warn!=`function`)return;const r=n instanceof URL?n.toString():n,l=jO(r);l&&l.protocol===`http:`&&(qS.has(l.origin)||(qS.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function BO(n){if(!n.url)throw new Wt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=n.headers,i=n.params;for(;;)try{return await LO({...n,headers:t,params:i})}catch(r){if(n.onError){const l=await n.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function LO(n){const t=n.url instanceof URL?n.url.toString():n.url;bb(t,n.warnOnHttp);const i=new URL(t),r=n.offset??`-1`;i.searchParams.set(Gh,r);const l=n.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Po,l);const o=await fc(n.params);for(const[q,K]of Object.entries(o))i.searchParams.set(q,K);const u=await nl(n.headers),d=new AbortController;n.signal&&n.signal.addEventListener(`abort`,()=>d.abort(n.signal?.reason),{once:!0});const p=n.fetch??((...q)=>fetch(...q)),g=n.backoffOptions??mp,y=Sb(p,g);let m;try{m=await y(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(q){throw q instanceof yp?new Wt(`Stream request was aborted`,`UNKNOWN`):q}const v=m.headers.get(`content-type`)??void 0,w=m.headers.get(Tn)??r,b=m.headers.get(Gc)??void 0,E=m.headers.has(Yc),_=m.headers.get(Ln)?.toLowerCase()===`true`,j=n.json===!0||(v?.includes(`application/json`)??!1),A=m.headers.get(wO)===`base64`?`base64`:void 0,M=async(q,K,W,et)=>{const X=new URL(t);X.searchParams.set(Gh,q),et||(l===`sse`?X.searchParams.set(Po,`sse`):(l===!0||l===`long-poll`)&&X.searchParams.set(Po,`long-poll`)),K&&X.searchParams.set(`cursor`,K);const at=await fc(n.params);for(const[Lt,dt]of Object.entries(at))X.searchParams.set(Lt,dt);const nt=await nl(n.headers),bt=await y(X.toString(),{method:`GET`,headers:nt,signal:W});return bt.ok||await hs(bt,t),bt},G=l===`sse`?async(q,K,W)=>{const et=new URL(t);et.searchParams.set(Gh,q),et.searchParams.set(Po,`sse`),K&&et.searchParams.set(`cursor`,K);const X=await fc(n.params);for(const[bt,Lt]of Object.entries(X))et.searchParams.set(bt,Lt);const at=await nl(n.headers),nt=await y(et.toString(),{method:`GET`,headers:at,signal:W});return nt.ok||await hs(nt,t),nt}:void 0;return new DO({url:t,contentType:v,live:l,startOffset:r,isJsonMode:j,initialOffset:w,initialCursor:b,initialUpToDate:E,initialStreamClosed:_,firstResponse:m,abortController:d,fetchNext:M,startSSE:G,sseResilience:n.sseResilience,encoding:A})}var KS=class extends Error{currentEpoch;constructor(n){super(`Producer epoch is stale. Current server epoch: ${n}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=n}},IO=class extends Error{expectedSeq;receivedSeq;constructor(n,t){super(`Producer sequence gap: expected ${n}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=n,this.receivedSeq=t}};function VS(n){return n?n.split(`;`)[0].trim().toLowerCase():``}var wb=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#w;#m;#S=new Map;constructor(n,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=n,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=gb.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Wt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(n){if(this.#o)throw new Wt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof n==`string`)t=new TextEncoder().encode(n);else if(n instanceof Uint8Array)t=n;else throw new Wt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(n){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#w);return this.#u=i,i}this.#o=!0,this.#w=n,await this.flush();const t=await this.#v(n);return this.#u=t,t}async#v(n){const t=this.#t.contentType??`application/octet-stream`,i=VS(t)===`application/json`;let r;if(n!==void 0){const g=typeof n==`string`?new TextEncoder().encode(n):n;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[jS]:this.#e,[Wo]:this.#n.toString(),[BS]:l.toString(),[Ln]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(Tn)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(Tn)??``};if(d.status===403){const g=d.headers.get(Wo),y=g?parseInt(g,10):this.#n;if(this.#a){const m=y+1;return this.#n=m,this.#s=0,this.#v(n)}throw new KS(y)}throw await Js.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const n=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:n,seq:t}).catch(()=>{})}):this.#y.push({batch:n,seq:t}).catch(()=>{})}async#O(n){const{batch:t,seq:i}=n,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(n,t,i){let r=this.#S.get(n);r||(r=new Map,this.#S.set(n,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(n,t,i){const r=this.#t.contentType??`application/octet-stream`,l=VS(r)===`application/json`;let o;if(l)o=`[${n.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const m=n.reduce((b,E)=>b+E.body.length,0),v=new Uint8Array(m);let w=0;for(const b of n)v.set(b.body,w),w+=b.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[jS]:this.#e,[Wo]:i.toString(),[BS]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(Tn)??``,duplicate:!1};if(g.status===403){const m=g.headers.get(Wo),v=m?parseInt(m,10):i;if(this.#a){const w=v+1;return this.#n=w,this.#s=1,this.#T(n,0,w)}throw new KS(v)}if(g.status===409){const m=g.headers.get(vO),v=m?parseInt(m,10):0;if(v0&&this.#d(n),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Xh(n){return n?n.split(`;`)[0].trim().toLowerCase():``}function HO(n){return n!=null&&typeof n.then==`function`}var Ys=class Wa{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){VO(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=gb.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??mp},l=Sb(this.#n,r);this.#e=AO(l)}static async create(t){const i=new Wa(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Wa(t);return await i.head(),i}static async head(t){return new Wa(t).head()}static async delete(t){return new Wa(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await hs(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(Tn)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(Ln)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[mO]=String(t.ttlSeconds)),t?.expiresAt&&(i[SO]=t.expiresAt),t?.closed&&(i[Ln]=`true`);const o=qO(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await hs(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await hs(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[Ln]=`true`;let o;t?.body!==void 0&&(Xh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(Ln)?.toLowerCase()===`true`){const g=u.headers.get(Tn)??void 0;throw new mb(this.url,g)}return u.ok||await hs(u,this.url),{finalOffset:u.headers.get(Tn)??``}}async append(t,i){const r=HO(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[$h]=i.seq);const u=Xh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await hs(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let m=t.length-1;m>=0;m--)if(t[m].seq!==void 0){o=t[m].seq;break}o&&(i[$h]=o);const u=Xh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const m=t.some(w=>w.data instanceof Uint8Array),v=t.some(w=>typeof w.data==`string`);if(m&&!v){const w=t.map(j=>j.data),b=w.reduce((j,O)=>j+O.length,0),E=new Uint8Array(b);let _=0;for(const j of w)E.set(j,_),_+=j.length;d=E}else if(v&&!m)d=t.map(w=>w.data).join(``);else{const w=new TextEncoder,b=t.map(O=>typeof O.data==`string`?w.encode(O.data):O.data),E=b.reduce((O,A)=>O+A.length,0),_=new Uint8Array(E);let j=0;for(const O of b)_.set(O,j),j+=O.length;d=_}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const m of t)m.signal&&p.push(m.signal);const g=p.length>0?AbortSignal.any(p):void 0,y=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});y.ok||await hs(y,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[$h]=i.seq);const u=KO(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await hs(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new wb(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return BO({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return nl(this.#t.headers)}async#f(){const t=await nl(this.#t.headers),i=new URL(this.url),r=await fc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function qO(n){if(n!==void 0)return typeof n==`string`?new TextEncoder().encode(n):n instanceof Uint8Array||n instanceof Blob||n instanceof FormData||n instanceof ReadableStream||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?n:new TextEncoder().encode(JSON.stringify(n))}function KO(n){if(n instanceof ReadableStream)return n.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=n[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function VO(n){if(!n.url)throw new EO;if(n.signal&&!(n.signal instanceof AbortSignal))throw new CO;bb(n.url,n.warnOnHttp)}function Eb(n){return n!=null&&`operation`in n.headers}function Cb(n){return n!=null&&`control`in n.headers}var $O=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(n,t){this.handlers.set(n,t),this.existingKeys.has(n)||this.existingKeys.set(n,new Set)}dispatchChange(n){if(!Eb(n))return;n.headers.txid&&typeof n.headers.txid==`string`&&this.pendingTxids.add(n.headers.txid);const t=this.handlers.get(n.type);if(!t)return;let i=n.headers.operation;if(i!==`delete`&&(typeof n.value!=`object`||n.value===null))throw new Error(`StreamDB collections require object values; got ${typeof n.value} for type=${n.type}, key=${n.key}`);const l={...n.value??{}};l[t.primaryKey]=n.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(n.type)?.has(n.key)?`update`:`insert`);const o=this.existingKeys.get(n.type);i===`insert`||i===`update`?o?.add(n.key):o?.delete(n.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:n.type,key:n.key,operation:i}),u}}dispatchControl(n){if(Cb(n))switch(n.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const n of this.pendingHandlers)try{n.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const n of this.pendingTxids){this.seenTxids.add(n);const t=this.txidResolvers.get(n);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(n)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const n of this.handlers.values())n.markReady();for(const n of this.preloadResolvers)n();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((n,t)=>{this.preloadResolvers.push(n),this.preloadRejecters.push(t)})}rejectAll(n){for(const t of this.preloadRejecters)t(n);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(n);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(n,t=5e3){return this.seenTxids.has(n)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(n);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(n)}r(new Error(`Timeout waiting for txid: ${n}`))},t);this.txidResolvers.has(n)||this.txidResolvers.set(n,[]),this.txidResolvers.get(n).push({resolve:i,reject:r,timeoutId:l})})}};function GO(n,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(n,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const $S=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function YO(n,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} update: ${d.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const y=i[`~standard`].validate(o);if(`issues`in y)throw new Error(`Validation failed for ${n} update (oldValue): ${y.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${n} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${n} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:n,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function xb(n){for(const r of Object.keys(n))if($S.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from($S).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(n)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(n))i[r]={...l,...YO(l.type,l.primaryKey,l.schema)};return i}function FO(n){const{streamOptions:t,state:i,actions:r}=n,l=new Ys(t),o=new $O,u={};for(const[w,b]of Object.entries(i)){const E=op({id:`stream-db:${w}`,schema:b.schema,getKey:_=>String(_[b.primaryKey]),sync:GO(b.type,o,b.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${w}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[w]=E}let d=null;const p=new AbortController;let g=!1;const y=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let w=0,b=Date.now();d.subscribeJson(_=>{try{w++,b=Date.now(),_.items.length>0&&console.log(`[StreamDB] Processing batch #${w}: ${_.items.length} items, upToDate=${_.upToDate}`);for(const j of _.items)Eb(j)?o.dispatchChange(j):Cb(j)&&o.dispatchControl(j);_.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${w}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),_.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${w}`)}catch(j){console.error(`[StreamDB] Error processing batch:`,j),console.error(`[StreamDB] Failed batch:`,_),o.rejectAll(j),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const _=Date.now()-b;console.log(`[StreamDB] Health: ${w} batches processed, last batch ${(_/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},m={stream:l,preload:async()=>{await y(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(w,b)=>o.awaitTxId(w,b)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...m};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const w=r({db:v,stream:l}),b={};for(const[E,_]of Object.entries(w))b[E]=uA({onMutate:_.onMutate,mutationFn:_.mutationFn});return{...v,actions:b}}return v}const bp=600,QO=bp/2*1e3,XO=3600*24,JO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Jh=xb({rooms:{schema:JO,type:`stream`,primaryKey:`roomId`}}),ZO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},GS=xb({scores:{schema:ZO,type:`stream`,primaryKey:`playerName`}});function _b(n){const[t,i]=J.useState({db:null,isLoading:!0,error:null}),r=n.streamOptions.url;return J.useEffect(()=>{let l=null;const o=new AbortController,u=()=>o.signal.aborted;return(async()=>{i({db:null,isLoading:!0,error:null});try{const g=await new Ys({url:r,headers:n.streamOptions.headers,contentType:`application/json`}).head();if(u()||(g.exists||await Ys.create({url:r,headers:n.streamOptions.headers,contentType:`application/json`,ttlSeconds:n.ttlSeconds}),l=await FO(n),await l.preload(),u()))return;i({db:l,isLoading:!1,error:null})}catch(p){if(u())return;const g=p instanceof Error?p:new Error(String(p));console.error(`[useStreamDB] Failed to initialize ${r}:`,g),i({db:null,isLoading:!1,error:g})}})(),()=>{o.abort(),l&&l.close()}},[r]),t}function WO(n,t){return{streamOptions:{url:n,headers:t,contentType:`application/json`},state:Jh,ttlSeconds:XO,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Jh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Jh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})}}function PO(n,t){return _b(WO(n,t))}const Tb=J.createContext(null);function Ab(){const n=J.useContext(Tb);if(!n)throw new Error(`useRegistryContext must be used within RegistryProvider`);return n}function tR({children:n}){const{dsEndpoint:t,dsHeaders:i}=Zd(),{db:r,isLoading:l,error:o}=PO(`${t}/__snake_rooms`,i);return l?F.jsxs(`div`,{style:YS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`LOADING...`})]}):o||!r?F.jsxs(`div`,{style:YS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,o?.message||`Failed to load`]})]}):F.jsx(Tb.Provider,{value:{registryDB:r},children:n})}const YS={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`}},Zh=1;function eR(n,t=[]){const i=n&&typeof n==`object`&&typeof n.subscribeChanges==`function`&&typeof n.startSyncImmediate==`function`&&typeof n.id==`string`,r=J.useRef(null),l=J.useRef(null),o=J.useRef(null),u=J.useRef(0),d=J.useRef(null),p=!r.current||i&&o.current!==n||!i&&(l.current===null||l.current.length!==t.length||l.current.some((b,E)=>b!==t[E]));if(p)if(i)n.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. + +Instead, use a query builder function: + const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) + +Or switch to syncMode "eager" if you want all data to sync automatically.`),n.startSyncImmediate(),r.current=n,o.current=n;else if(typeof n==`function`){const b=new Zt,E=n(b);if(E==null)r.current=null;else if(E instanceof cp)E.startSyncImmediate(),r.current=E;else if(E instanceof Zt)r.current=Kh({query:n,startSync:!0,gcTime:Zh});else if(E&&typeof E==`object`)r.current=Kh({startSync:!0,gcTime:Zh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Kh({startSync:!0,gcTime:Zh,...n}),l.current=[...t];p&&(u.current=0,d.current=null);const g=J.useRef(null);(!g.current||p)&&(g.current=b=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,b()});return r.current.status===`ready`&&(u.current+=1,b()),()=>{E.unsubscribe()}});const y=J.useRef(null);(!y.current||p)&&(y.current=()=>{const b=u.current,E=r.current;return(!d.current||d.current.version!==b||d.current.collection!==E)&&(d.current={collection:E,version:b}),d.current});const m=J.useSyncExternalStore(g.current,y.current),v=J.useRef(null),w=J.useRef(null);if(!v.current||v.current.version!==m.version||v.current.collection!==m.collection){if(!m.collection)w.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const b=Array.from(m.collection.entries()),_=m.collection.config.singleResult;let j=null,O=null;w.current={get state(){return j||(j=new Map(b)),j},get data(){return O||(O=b.map(([,A])=>A)),_?O[0]:O},collection:m.collection,status:m.collection.status,isLoading:m.collection.status===`loading`,isReady:m.collection.status===`ready`,isIdle:m.collection.status===`idle`,isError:m.collection.status===`error`,isCleanedUp:m.collection.status===`cleaned-up`,isEnabled:!0}}v.current=m}return w.current}const Nt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},tc=[{label:`32x32`,cols:32,rows:32},{label:`64x64`,cols:64,rows:64},{label:`128x128`,cols:128,rows:128}];function Wh(n,t){return`${n}__${t.cols}x${t.rows}`}function nR(){const n=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=n[Math.floor(Math.random()*n.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function sR({playerName:n,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=Ab(),[l,o]=J.useState(nR),[u,d]=J.useState(1),[p,g]=J.useState(!1),[y,m]=J.useState(0),[v,w]=J.useState(``),[,b]=J.useState(0);J.useEffect(()=>{const O=setInterval(()=>b(A=>A+1),1e3);return()=>clearInterval(O)},[]);const E=Date.now(),{data:_=[]}=eR(O=>O.from({rooms:r.collections.rooms}).where(({rooms:A})=>wd(A.expiresAt,E)).orderBy(({rooms:A})=>A.createdAt,`desc`)),j=async()=>{if(!p){g(!0);try{const O=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,A=tc[u],M=Wh(O,A),G=Date.now(),q={roomId:M,name:O,boardSize:`${A.cols}x${A.rows}`,createdAt:G,expiresAt:G+bp*1e3};await r.actions.addRoom(q),o(``),i(M)}catch(O){console.error(`Failed to create room:`,O)}finally{g(!1)}}};return F.jsxs(`div`,{style:mn.container,children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + .lobby-btn:active { opacity: 0.7; } + `}),F.jsx(`div`,{style:mn.title,children:`TERRITORY WARS`}),F.jsx(`div`,{style:{fontSize:7,color:Nt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Claim 30% territory or lead when time runs out.`}),F.jsxs(`div`,{style:mn.card,children:[F.jsx(`div`,{style:mn.cardTitle,children:`NAME`}),F.jsx(`input`,{style:mn.input,value:n,onChange:O=>t(O.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:mn.card,children:[F.jsx(`div`,{style:mn.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:mn.input,value:l,onChange:O=>o(O.target.value),placeholder:`room name`,onKeyDown:O=>O.key===`Enter`&&j()}),F.jsx(`div`,{style:mn.cardTitle,children:`BOARD SIZE`}),F.jsx(`div`,{style:{display:`flex`,gap:6,marginBottom:10},children:tc.map((O,A)=>F.jsx(`button`,{className:`lobby-btn`,style:{flex:1,padding:`6px 0`,fontSize:7,fontFamily:`inherit`,background:A===u?Nt.accent:`transparent`,color:A===u?`#000`:Nt.accent,border:`1px solid ${Nt.accent}`,cursor:`pointer`,letterSpacing:1},onClick:()=>d(A),children:O.label},O.label))}),F.jsx(`button`,{className:`lobby-btn`,style:{...mn.createBtn,opacity:p?.6:1},onClick:j,disabled:p,children:p?`STARTING...`:`START`})]}),F.jsxs(`div`,{style:mn.card,children:[F.jsx(`div`,{style:mn.cardTitle,children:`ROOMS`}),F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[_.slice(y*3,y*3+3).map(O=>F.jsx(iR,{room:O,onJoin:()=>i(O.roomId)},O.roomId)),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Nt.bg,border:`1px solid ${Nt.border}`,padding:`8px 12px`},children:[F.jsx(`input`,{style:{fontSize:8,color:Nt.text,fontFamily:`inherit`,background:`transparent`,border:`none`,outline:`none`,flex:1,padding:0},value:v,onChange:O=>w(O.target.value),placeholder:`room-id`,onKeyDown:O=>{if(O.key===`Enter`&&v.trim()){const A=_.find(M=>M.name===v.trim());i(A?A.roomId:Wh(v.trim(),tc[u]))}}}),v.trim()&&F.jsx(`button`,{className:`lobby-btn`,style:{background:Nt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1,flexShrink:0},onClick:()=>{const O=_.find(A=>A.name===v.trim());i(O?O.roomId:Wh(v.trim(),tc[u]))},children:`JOIN`})]})]}),_.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Nt.bg,color:Nt.dim,border:`1px solid ${Nt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y===0?.3:1},disabled:y===0,onClick:()=>m(O=>O-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:Nt.dim,lineHeight:`24px`},children:[y+1,`/`,Math.ceil(_.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:Nt.bg,color:Nt.dim,border:`1px solid ${Nt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:y>=Math.ceil(_.length/3)-1?.3:1},disabled:y>=Math.ceil(_.length/3)-1,onClick:()=>m(O=>O+1),children:`>`})]})]})]})}function iR({room:n,onJoin:t}){const[i,r]=J.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(n.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:Nt.bg,border:`1px solid ${Nt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?Nt.accent:Nt.text,cursor:`pointer`},children:i?`COPIED`:n.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:Nt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const mn={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:Nt.bg,color:Nt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:Nt.accent,marginBottom:6},card:{background:Nt.card,border:`1px solid ${Nt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:Nt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:Nt.bg,border:`1px solid ${Nt.border}`,padding:`8px 10px`,color:Nt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:Nt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2}},An=()=>new Map,Ld=n=>{const t=An();return n.forEach((i,r)=>{t.set(r,i)}),t},Ws=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r},rR=(n,t)=>{const i=[];for(const[r,l]of n)i.push(t(l,r));return i},aR=(n,t)=>{for(const[i,r]of n)if(t(r,i))return!0;return!1},Hr=()=>new Set,Ph=n=>n[n.length-1],lR=(n,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(n);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ei((this._observers.get(t)||An()).values()).forEach(r=>r(...i))}destroy(){this._observers=An()}};const Hn=Math.floor,hc=Math.abs,Rb=(n,t)=>nn>t?n:t,Db=n=>n!==0?n<0:1/n<0,FS=1,QS=2,td=4,ed=8,hl=32,gs=64,rn=128,Qc=31,Id=63,wi=127,uR=2147483647,Oc=Number.MAX_SAFE_INTEGER,XS=Number.MIN_SAFE_INTEGER,fR=Number.isInteger||(n=>typeof n==`number`&&isFinite(n)&&Hn(n)===n),hR=String.fromCharCode,dR=n=>n.toLowerCase(),pR=/^\s*/g,gR=n=>n.replace(pR,``),yR=/([A-Z])/g,JS=(n,t)=>gR(n.replace(yR,i=>`${t}${dR(i)}`)),mR=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;ldl.encode(n),vR=dl?SR:mR;let sl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});sl&&sl.decode(new Uint8Array).length===1&&(sl=null);const bR=(n,t)=>oR(t,()=>n).join(``);let Tl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}};const Xc=()=>new Tl,wR=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(wR(n));let i=0;for(let r=0;r{const i=n.cbuf.length;i-n.cpos{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Hd=ye,Dt=(n,t)=>{for(;t>wi;)ye(n,rn|wi&t),t=Hn(t/128);ye(n,wi&t)},Ep=(n,t)=>{const i=Db(t);for(i&&(t=-t),ye(n,(t>Id?rn:0)|(i?gs:0)|Id&t),t=Hn(t/64);t>0;)ye(n,(t>wi?rn:0)|wi&t),t=Hn(t/128)},qd=new Uint8Array(3e4),CR=qd.length/3,xR=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Dt(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=Rb(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(Yr(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},nn=(n,t)=>{Dt(n,t.byteLength),Jc(n,t)},Cp=(n,t)=>{ER(n,t);const i=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,i},TR=(n,t)=>Cp(n,4).setFloat32(0,t,!1),AR=(n,t)=>Cp(n,8).setFloat64(0,t,!1),OR=(n,t)=>Cp(n,8).setBigInt64(0,t,!1),ZS=new DataView(new ArrayBuffer(4)),RR=n=>(ZS.setFloat32(0,n),ZS.getFloat32(0)===n),pl=(n,t)=>{switch(typeof t){case`string`:ye(n,119),Rr(n,t);break;case`number`:fR(t)&&hc(t)<=uR?(ye(n,125),Ep(n,t)):RR(t)?(ye(n,124),TR(n,t)):(ye(n,123),AR(n,t));break;case`bigint`:ye(n,122),OR(n,t);break;case`object`:if(t===null)ye(n,126);else if(Fc(t)){ye(n,117),Dt(n,t.length);for(let i=0;i0&&Dt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const PS=n=>{n.count>0&&(Ep(n.encoder,n.count===1?n.s:-n.s),n.count>1&&Dt(n.encoder,n.count-2))};class dc{constructor(){this.encoder=new Tl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(PS(this),this.count=1,this.s=t)}toUint8Array(){return PS(this),In(this.encoder)}}const tv=n=>{if(n.count>0){const t=n.diff*2+(n.count===1?0:1);Ep(n.encoder,t),n.count>1&&Dt(n.encoder,n.count-2)}};class nd{constructor(){this.encoder=new Tl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(tv(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return tv(this),In(this.encoder)}}class DR{constructor(){this.sarr=[],this.s=``,this.lensE=new dc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new Tl;return this.sarr.push(this.s),this.s=``,Rr(t,this.sarr.join(``)),Jc(t,this.lensE.toUint8Array()),In(t)}}const qn=n=>new Error(n),On=()=>{throw qn(`Method unimplemented`)},bn=()=>{throw qn(`Unexpected case`)},Mb=qn(`Unexpected end of array`),kb=qn(`Integer out of Range`);let Zc=class{constructor(t){this.arr=t,this.pos=0}};const xp=n=>new Zc(n),MR=n=>n.pos!==n.arr.length,kR=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},sn=n=>kR(n,Ot(n)),qr=n=>n.arr[n.pos++],Ot=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posOc)throw kb}throw Mb},_p=n=>{let t=n.arr[n.pos++],i=t&Id,r=64;const l=(t&gs)>0?-1:1;if((t&rn)===0)return l*i;const o=n.arr.length;for(;n.posOc)throw kb}throw Mb},UR=n=>{let t=Ot(n);if(t===0)return``;{let i=String.fromCodePoint(qr(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(qr(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},zR=n=>sl.decode(sn(n)),Dr=sl?zR:UR,Tp=(n,t)=>{const i=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,i},NR=n=>Tp(n,4).getFloat32(0,!1),jR=n=>Tp(n,8).getFloat64(0,!1),BR=n=>Tp(n,8).getBigInt64(0,!1),LR=[n=>{},n=>null,_p,NR,jR,BR,n=>!1,n=>!0,Dr,n=>{const t=Ot(n),i={};for(let r=0;r{const t=Ot(n),i=[];for(let r=0;rLR[127-qr(n)](n);class ev extends Zc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),MR(this)?this.count=Ot(this)+1:this.count=-1),this.count--,this.s}}class pc extends Zc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=_p(this);const t=Db(this.s);this.count=1,t&&(this.s=-this.s,this.count=Ot(this)+2)}return this.count--,this.s}}class sd extends Zc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=_p(this),i=t&1;this.diff=Hn(t/2),this.count=1,i&&(this.count=Ot(this)+2)}return this.s+=this.diff,this.count--,this.s}}class IR{constructor(t){this.decoder=new pc(t),this.str=Dr(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const HR=crypto.getRandomValues.bind(crypto),Ub=()=>HR(new Uint32Array(1))[0],qR=`10000000-1000-4000-8000`+-1e11,KR=()=>qR.replace(/[018]/g,n=>(n^Ub()&15>>n/4).toString(16)),nv=n=>new Promise(n);Promise.all.bind(Promise);const sv=n=>n===void 0?null:n;class VR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let zb=new VR,$R=!0;try{typeof localStorage<`u`&&localStorage&&(zb=localStorage,$R=!1)}catch{}const GR=zb,yl=Symbol(`Equality`),Nb=(n,t)=>n===t||!!n?.[yl]?.(t)||!1,YR=n=>typeof n==`object`,FR=Object.assign,QR=Object.keys,XR=(n,t)=>{for(const i in n)t(n[i],i)},Rc=n=>QR(n).length,JR=n=>{for(const t in n)return!1;return!0},Al=(n,t)=>{for(const i in n)if(!t(n[i],i))return!1;return!0},Ap=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),ZR=(n,t)=>n===t||Rc(n)===Rc(t)&&Al(n,(i,r)=>(i!==void 0||Ap(t,r))&&Nb(t[r],i)),WR=Object.freeze,jb=n=>{for(const t in n){const i=n[t];(typeof i==`object`||typeof i==`function`)&&jb(n[t])}return WR(n)},Op=(n,t,i=0)=>{try{for(;i{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[yl]!=null)return n[yl](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(n);var Bb={};const ml=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let Nn;const tD=()=>{if(Nn===void 0)if(ml){Nn=An();const n=process.argv;let t=null;for(let i=0;i{if(n.length!==0){const[t,i]=n.split(`=`);Nn.set(`--${JS(t,`-`)}`,i),Nn.set(`-${JS(t,`-`)}`,i)}})):Nn=An();return Nn},Kd=n=>tD().has(n),Dc=n=>sv(ml?Bb[n.toUpperCase().replaceAll(`-`,`_`)]:GR.getItem(n)),Lb=n=>Kd(`--`+n)||Dc(n)!==null,eD=Lb(`production`),nD=ml&&PR(Bb.FORCE_COLOR,[`true`,`1`,`2`]),sD=nD||!Kd(`--no-colors`)&&!Lb(`no-color`)&&(!ml||process.stdout.isTTY)&&(!ml||Kd(`--color`)||Dc(`COLORTERM`)!==null||(Dc(`TERM`)||``).includes(`color`)),iD=n=>new Uint8Array(n),rD=n=>{const t=iD(n.byteLength);return t.set(n),t};class aD{constructor(t,i){this.left=t,this.right=i}}const us=(n,t)=>new aD(n,t),iv=n=>n.next()>=.5,id=(n,t,i)=>Hn(n.next()*(i+1-t)+t),Ib=(n,t,i)=>Hn(n.next()*(i+1-t)+t),Rp=(n,t,i)=>Ib(n,t,i),lD=n=>hR(Rp(n,97,122)),oD=(n,t=0,i=20)=>{const r=Rp(n,t,i);let l=``;for(let o=0;ot[Rp(n,0,t.length-1)],cD=Symbol(`0schema`);class uD{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(bR(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` +`)}}const Vd=(n,t)=>n===t?!0:n==null||t==null||n.constructor!==t.constructor?!1:n[yl]?Nb(n,t):Fc(n)?wp(n,i=>Ob(t,r=>Vd(i,r))):YR(n)?Al(n,(i,r)=>Vd(i,t[r])):!1;class Ne{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Vd(i,r)}equals(t){return this.constructor===t.constructor&&gc(this.shape,t.shape)}[cD](){return!0}[yl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){On()}get nullable(){return Fr(this,nu)}get optional(){return new Kb(this)}cast(t){return rv(t,this),t}expect(t){return rv(t,this),t}}class Dp extends Ne{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const oe=(n,t=null)=>new Dp(n,t);oe(Dp);class Mp extends Ne{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const ve=n=>new Mp(n);oe(Mp);class Wc extends Ne{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Pc=(...n)=>new Wc(n),Hb=oe(Wc),fD=RegExp.escape||(n=>n.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),qb=n=>{if(Kr.check(n))return[fD(n)];if(Hb.check(n))return n.shape.map(t=>t+``);if(Zb.check(n))return[`[+-]?\\d+.?\\d*`];if(Wb.check(n))return[`.*`];if(Mc.check(n))return n.shape.map(qb).flat(1);bn()};class hD extends Ne{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(qb).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}oe(hD);const dD=Symbol(`optional`);class Kb extends Ne{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[dD](){return!0}}const pD=oe(Kb);class gD extends Ne{check(t,i){return i?.extend(null,`never`,typeof t),!1}}oe(gD);class tu extends Ne{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new tu(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):Al(this.shape,(r,l)=>{const o=this._isPartial&&!Ap(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const yD=n=>new tu(n),mD=oe(tu),SD=ve(n=>n!=null&&(n.constructor===Object||n.constructor==null));class Vb extends Ne{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&Al(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const $b=(n,t)=>new Vb(n,t),vD=oe(Vb);class Gb extends Ne{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&Al(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const bD=(...n)=>new Gb(n);oe(Gb);class Yb extends Ne{constructor(t){super(),this.shape=t.length===1?t[0]:new kp(t)}check(t,i){const r=Fc(t)&&wp(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const Fb=(...n)=>new Yb(n),wD=oe(Yb),ED=ve(n=>Fc(n));class Qb extends Ne{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const CD=(n,t=null)=>new Qb(n,t);oe(Qb);const xD=CD(Ne);class _D extends Ne{constructor(t){super(),this.len=t.length-1,this.args=bD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const TD=oe(_D),AD=ve(n=>typeof n==`function`);class OD extends Ne{constructor(t){super(),this.shape=t}check(t,i){const r=wp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}oe(OD,n=>n.shape.length>0);class kp extends Ne{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=Ob(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Fr=(...n)=>n.findIndex(t=>Mc.check(t))>=0?Fr(...n.map(t=>Sl(t)).map(t=>Mc.check(t)?t.shape:[t]).flat(1)):n.length===1?n[0]:new kp(n),Mc=oe(kp),Xb=()=>!0,kc=ve(Xb),RD=oe(Mp,n=>n.shape===Xb),Up=ve(n=>typeof n==`bigint`),DD=ve(n=>n===Up),Jb=ve(n=>typeof n==`symbol`);ve(n=>n===Jb);const Mr=ve(n=>typeof n==`number`),Zb=ve(n=>n===Mr),Kr=ve(n=>typeof n==`string`),Wb=ve(n=>n===Kr),eu=ve(n=>typeof n==`boolean`),MD=ve(n=>n===eu),Pb=Pc(void 0);oe(Wc,n=>n.shape.length===1&&n.shape[0]===void 0);Pc(void 0);const nu=Pc(null),kD=oe(Wc,n=>n.shape.length===1&&n.shape[0]===null);oe(Uint8Array);oe(Dp,n=>n.shape===Uint8Array);const UD=Fr(Mr,Kr,nu,Pb,Up,eu,Jb);(()=>{const n=Fb(kc),t=$b(Kr,kc),i=Fr(Mr,Kr,nu,eu,n,t);return n.shape=i,t.shape.values=i,i})();const Sl=n=>{if(xD.check(n))return n;if(SD.check(n)){const t={};for(const i in n)t[i]=Sl(n[i]);return yD(t)}else{if(ED.check(n))return Fr(...n.map(Sl));if(UD.check(n))return Pc(n);if(AD.check(n))return oe(n)}bn()},rv=eD?()=>{}:(n,t)=>{const i=new uD;if(!t.check(n,i))throw qn(`Expected value to be of type ${t.constructor.name}. +${i.toString()}`)};class zD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:Sl(t),h:i}),this}else(t){return this.if(kc,t)}done(){return(t,i)=>{for(let r=0;rnew zD(n),tw=ND(kc).if(Zb,(n,t)=>id(t,XS,Oc)).if(Wb,(n,t)=>oD(t)).if(MD,(n,t)=>iv(t)).if(DD,(n,t)=>BigInt(id(t,XS,Oc))).if(Mc,(n,t)=>vr(t,rd(t,n.shape))).if(mD,(n,t)=>{const i={};for(const r in n.shape){let l=n.shape[r];if(pD.check(l)){if(iv(t))continue;l=l.shape}i[r]=tw(l,t)}return i}).if(wD,(n,t)=>{const i=[],r=Ib(t,0,42);for(let l=0;lrd(t,n.shape)).if(kD,(n,t)=>null).if(TD,(n,t)=>{const i=vr(t,n.res);return()=>i}).if(RD,(n,t)=>vr(t,rd(t,[Mr,Kr,nu,Pb,Up,eu,Fb(Mr),$b(Fr(`a`,`b`,`c`),Mr)]))).if(vD,(n,t)=>{const i={},r=id(t,0,3);for(let l=0;ltw(Sl(t),n),su=typeof document<`u`?document:{};ve(n=>n.nodeType===HD);typeof DOMParser<`u`&&new DOMParser;ve(n=>n.nodeType===BD);ve(n=>n.nodeType===LD);const jD=n=>rR(n,(t,i)=>`${i}:${t};`).join(``),BD=su.ELEMENT_NODE,LD=su.TEXT_NODE,ID=su.DOCUMENT_NODE,HD=su.DOCUMENT_FRAGMENT_NODE;ve(n=>n.nodeType===ID);const ms=Symbol,ew=ms(),nw=ms(),qD=ms(),KD=ms(),VD=ms(),sw=ms(),$D=ms(),zp=ms(),GD=ms(),YD=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[],r=An();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...iw(n)),rw.forEach(t=>t.print(n))},JD=(...n)=>{console.warn(...iw(n)),n.unshift(zp),rw.forEach(t=>t.print(n))},rw=Hr(),aw=n=>({[Symbol.iterator](){return this},next:n}),ZD=(n,t)=>aw(()=>{let i;do i=n.next();while(!i.done&&!t(i.value));return i}),ad=(n,t)=>aw(()=>{const{done:i,value:r}=n.next();return{done:i,value:i?void 0:t(r)}});class Np{constructor(t,i){this.clock=t,this.len=i}}class iu{constructor(){this.clients=new Map}}const lw=(n,t,i)=>t.clients.forEach((r,l)=>{const o=n.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=n.length-1;for(;i<=r;){const l=Hn((i+r)/2),o=n[l],u=o.clock;if(u<=t){if(t{const i=n.clients.get(t.client);return i!==void 0&&WD(i,t.clock)!==null},jp=n=>{n.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new Np(l.clock,Yr(l.len,o.clock+o.len-l.clock)):(r{const t=new iu;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{Ws(n.clients,t,()=>[]).push(new Np(i,r))},Bp=(n,t)=>{Dt(n.restEncoder,t.clients.size),Ei(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{n.resetDsCurVal(),Dt(n.restEncoder,i);const l=r.length;Dt(n.restEncoder,l);for(let o=0;o{const t=new iu,i=Ot(n.restDecoder);for(let r=0;r0){const u=Ws(t.clients,l,()=>[]);for(let d=0;d{const r=new iu,l=Ot(n.restDecoder);for(let o=0;o0){const o=new ru;return Dt(o.restEncoder,0),Bp(o,r),o.toUint8Array()}return null},cw=Ub;class Qr extends cR{constructor({guid:t=KR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=cw(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new dw,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=nv(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>nv(g=>{const y=m=>{(m===void 0||m===!0)&&(this.off(`sync`,y),g())};this.on(`sync`,y)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ei(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=_e){const r=Ws(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==_e&&l!==i)if(l===_e){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,Ur)}getText(t=``){return this.get(t,$r)}getMap(t=``){return this.get(t,Vr)}getXmlElement(t=``){return this.get(t,Gr)}getXmlFragment(t=``){return this.get(t,Ci)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ei(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Qr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class eM{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Ot(this.restDecoder)}readDsLen(){return Ot(this.restDecoder)}}class nM extends eM{readLeftID(){return Rt(Ot(this.restDecoder),Ot(this.restDecoder))}readRightID(){return Rt(Ot(this.restDecoder),Ot(this.restDecoder))}readClient(){return Ot(this.restDecoder)}readInfo(){return qr(this.restDecoder)}readString(){return Dr(this.restDecoder)}readParentInfo(){return Ot(this.restDecoder)===1}readTypeRef(){return Ot(this.restDecoder)}readLen(){return Ot(this.restDecoder)}readAny(){return gl(this.restDecoder)}readBuf(){return rD(sn(this.restDecoder))}readJSON(){return JSON.parse(Dr(this.restDecoder))}readKey(){return Dr(this.restDecoder)}}class sM{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Ot(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Ot(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class zc extends sM{constructor(t){super(t),this.keys=[],Ot(t),this.keyClockDecoder=new sd(sn(t)),this.clientDecoder=new pc(sn(t)),this.leftClockDecoder=new sd(sn(t)),this.rightClockDecoder=new sd(sn(t)),this.infoDecoder=new ev(sn(t),qr),this.stringDecoder=new IR(sn(t)),this.parentInfoDecoder=new ev(sn(t),qr),this.typeRefDecoder=new pc(sn(t)),this.lenDecoder=new pc(sn(t))}readLeftID(){return new kr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new kr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return gl(this.restDecoder)}readBuf(){return sn(this.restDecoder)}readJSON(){return gl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Yr(r,t[0].id.clock);const l=Kn(t,r);Dt(n.restEncoder,t.length-l),n.writeClient(i),Dt(n.restEncoder,r);const o=t[l];o.write(n,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{me(t,o)>l&&r.set(o,l)}),Lp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Dt(n.restEncoder,r.size),Ei(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{lM(n,t.clients.get(l),l,o)})},oM=(n,t)=>{const i=An(),r=Ot(n.restDecoder);for(let l=0;l{const r=[];let l=Ei(i.keys()).sort((w,b)=>w-b);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let w=i.get(l[l.length-1]);for(;w.refs.length===w.i;)if(l.pop(),l.length>0)w=i.get(l[l.length-1]);else return null;return w};let u=o();if(u===null)return null;const d=new dw,p=new Map,g=(w,b)=>{const E=p.get(w);(E==null||E>b)&&p.set(w,b)};let y=u.refs[u.i++];const m=new Map,v=()=>{for(const w of r){const b=w.id.client,E=i.get(b);E?(E.i--,d.clients.set(b,E.refs.slice(E.i)),i.delete(b),E.i=0,E.refs=[]):d.clients.set(b,[w]),l=l.filter(_=>_!==b)}r.length=0};for(;;){if(y.constructor!==_n){const b=Ws(m,y.id.client,()=>me(t,y.id.client))-y.id.clock;if(b<0)r.push(y),g(y.id.client,y.id.clock-1),v();else{const E=y.getMissing(n,t);if(E!==null){r.push(y);const _=i.get(E)||{refs:[],i:0};if(_.refs.length===_.i)g(E,me(t,E)),v();else{y=_.refs[_.i++];continue}}else(b===0||b0)y=r.pop();else if(u!==null&&u.i0){const w=new ru;return uw(w,d,new Map),Dt(w.restEncoder,0),{missing:p,update:w.toUint8Array()}}return null},uM=(n,t)=>uw(n,t.doc.store,t.beforeState),fM=(n,t,i,r=new zc(n))=>$t(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=oM(r,u),g=cM(l,d,p),y=d.pendingStructs;if(y){for(const[v,w]of y.missing)if(ww)&&y.missing.set(v,w)}y.update=pv([y.update,g.update])}}else d.pendingStructs=g;const m=av(r,l,d);if(d.pendingDs){const v=new zc(xp(d.pendingDs));Ot(v.restDecoder);const w=av(v,l,d);m&&w?d.pendingDs=pv([m,w]):d.pendingDs=m||w}else d.pendingDs=m;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,fw(l.doc,v)}},i,!1),fw=(n,t,i,r=zc)=>{const l=xp(t);fM(l,n,i,new r(l))},lv=(n,t,i)=>fw(n,t,i,nM);class hM{constructor(){this.l=[]}}const ov=()=>new hM,cv=(n,t)=>n.l.push(t),uv=(n,t)=>{const i=n.l,r=i.length;n.l=i.filter(l=>t!==l),r===n.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},hw=(n,t,i)=>Op(n.l,[t,i]);class kr{constructor(t,i){this.client=t,this.clock=i}}const ec=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,Rt=(n,t)=>new kr(n,t),dM=n=>{for(const[t,i]of n.doc.share.entries())if(i===n)return t;throw bn()},Cr=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ow(t.ds,n.id),$d=(n,t)=>{const i=Ws(n.meta,$d,Hr),r=n.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class dw{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Lp=n=>{const t=new Map;return n.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},me=(n,t)=>{const i=n.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},pw=(n,t)=>{let i=n.clients.get(t.id.client);if(i===void 0)i=[],n.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw bn()}i.push(t)},Kn=(n,t)=>{let i=0,r=n.length-1,l=n[r],o=l.id.clock;if(o===t)return r;let u=Hn(t/(o+l.length-1)*r);for(;i<=r;){if(l=n[u],o=l.id.clock,o<=t){if(t{const i=n.clients.get(t.client);return i[Kn(i,t.clock)]},ld=pM,Gd=(n,t,i)=>{const r=Kn(t,i),l=t[r];return l.id.clock{const i=n.doc.store.clients.get(t.client);return i[Gd(n,i,t.clock)]},fv=(n,t,i)=>{const r=t.clients.get(i.client),l=Kn(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==vn&&r.splice(l+1,0,Hc(n,o,i.clock-o.id.clock+1)),o},gM=(n,t,i)=>{const r=n.clients.get(t.id.client);r[Kn(r,t.id.clock)]=i},gw=(n,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=Gd(n,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!aR(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(jp(t.deleteSet),uM(n,t),Bp(n,t.deleteSet),!0),dv=(n,t,i)=>{const r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ws(n.changed,t,Hr).add(i)},yc=(n,t)=>{let i=n[t],r=n[t-1],l=t;for(;l>0;i=r,r=n[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof fe&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&n.splice(t+1-o,o),o},mM=(n,t,i)=>{for(const[r,l]of n.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=Kn(o,d.clock),y=o[g];g{n.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=Rb(l.length-1,1+Kn(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+yc(l,p)}})},yw=(n,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(y=>y.target._item===null||!y.target._item.deleted),p.forEach(y=>{y.currentTarget=g,y._path=null}),p.sort((y,m)=>y.path.length-m.path.length),d.push(()=>{hw(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&BM(i)})}),Op(d,[])}finally{r.gc&&mM(o,l,r.gcFilter),SM(o,l),i.afterState.forEach((y,m)=>{const v=i.beforeState.get(m)||0;if(v!==y){const w=l.clients.get(m),b=Yr(Kn(w,v),1);for(let E=w.length-1;E>=b;)E-=1+yc(w,E)}});for(let y=u.length-1;y>=0;y--){const{client:m,clock:v}=u[y].id,w=l.clients.get(m),b=Kn(w,v);b+11||b>0&&yc(w,b)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(XD(zp,ew,`[yjs] `,nw,sw,`Changed the client-id because another client seems to be using it.`),r.clientID=cw()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const y=new rM;hv(y,i)&&r.emit(`update`,[y.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const y=new ru;hv(y,i)&&r.emit(`updateV2`,[y.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(y=>{y.clientID=r.clientID,y.collectionid==null&&(y.collectionid=r.collectionid),r.subdocs.add(y)}),g.forEach(y=>r.subdocs.delete(y)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(y=>y.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,n])):yw(n,t+1)}}},$t=(n,t,i=null,r=!0)=>{const l=n._transactionCleanups;let o=!1,u=null;n._transaction===null&&(o=!0,n._transaction=new yM(n,i,r),l.push(n._transaction),l.length===1&&n.emit(`beforeAllTransactions`,[n]),n.emit(`beforeTransaction`,[n._transaction,n]));try{u=t(n._transaction)}finally{if(o){const d=n._transaction===l[0];n._transaction=null,d&&yw(l,0)}}return u};function*vM(n){const t=Ot(n.restDecoder);for(let i=0;i{if(n.constructor===vn){const{client:i,clock:r}=n.id;return new vn(Rt(i,r+t),n.length-t)}else if(n.constructor===_n){const{client:i,clock:r}=n.id;return new _n(Rt(i,r+t),n.length-t)}else{const i=n,{client:r,clock:l}=i.id;return new fe(Rt(r,l+t),null,Rt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},pv=(n,t=zc,i=ru)=>{if(n.length===1)return n[0];const r=n.map(y=>new t(xp(y)));let l=r.map(y=>new bM(y,!0)),o=null;const u=new i,d=new wM(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,w)=>{if(v.curr.id.client===w.curr.id.client){const b=v.curr.id.clock-w.curr.id.clock;return b===0?v.curr.constructor===w.curr.constructor?0:v.curr.constructor===_n?1:-1:b}else return w.curr.id.client-v.curr.id.client}),l.length!==0;){const y=l[0],m=y.curr.id.client;if(o!==null){let v=y.curr,w=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=y.next(),w=!0;if(v===null||v.id.client!==m||w&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(m!==o.struct.id.client)Fa(d,o.struct,o.offset),o={struct:v,offset:0},y.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===_n?o.struct.length-=b:v=EM(v,b)),o.struct.mergeWith(v)||(Fa(d,o.struct,o.offset),o={struct:v,offset:0},y.next())}}else o={struct:y.curr,offset:0},y.next();for(let v=y.curr;v!==null&&v.id.client===m&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==_n;v=y.next())Fa(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Fa(d,o.struct,o.offset),o=null),CM(d);const p=r.map(y=>tM(y)),g=PD(p);return Bp(u,g),u.toUint8Array()},mw=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:In(n.encoder.restEncoder)}),n.encoder.restEncoder=Xc(),n.written=0)},Fa=(n,t,i)=>{n.written>0&&n.currClient!==t.id.client&&mw(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),Dt(n.encoder.restEncoder,t.id.clock+i)),t.write(n.encoder,i),n.written++},CM=n=>{mw(n);const t=n.encoder.restEncoder;Dt(t,n.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Ph(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Ph(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Ph(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw qn(gv);const i=this.target,r=Hr(),l=Hr(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const xM=(n,t)=>{const i=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},Re=()=>{JD(`Invalid access: Add Yjs type to a document before reading data.`)},Sw=80;let Ip=0;class _M{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Ip++}}const TM=n=>{n.timestamp=Ip++},vw=(n,t,i)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=i,n.timestamp=Ip++},AM=(n,t,i)=>{if(n.length>=Sw){const r=n.reduce((l,o)=>l.timestamp{if(n._start===null||t===0||n._searchMarker===null)return null;const i=n._searchMarker.length===0?null:n._searchMarker.reduce((o,u)=>hc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&hc(i.index-l){for(let r=n.length-1;r>=0;r--){const l=n[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Yr(t,l.index+i))}},ou=(n,t,i)=>{const r=n,l=t.changedParentTypes;for(;Ws(l,n,()=>[]).push(i),n._item!==null;)n=n._item.parent;hw(r._eH,i,t)};class _e{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=ov(),this._dEH=ov(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw On()}clone(){throw On()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){cv(this._eH,t)}observeDeep(t){cv(this._dEH,t)}unobserve(t){uv(this._eH,t)}unobserveDeep(t){uv(this._dEH,t)}toJSON(){}}const bw=(n,t,i)=>{n.doc??Re(),t<0&&(t=n._length+t),i<0&&(i=n._length+i);let r=i-t;const l=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},ww=n=>{n.doc??Re();const t=[];let i=n._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=n._start;for(n.doc??Re();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return bl(n,(r,l)=>{i.push(t(r,l,n))}),i},OM=n=>{let t=n._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Cw=(n,t)=>{n.doc??Re();const i=lu(n,t);let r=n._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=n.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const y=()=>{g.length>0&&(l=new fe(Rt(u,me(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new xi(g)),l.integrate(n,0),g=[])};r.forEach(m=>{if(m===null)g.push(m);else switch(m.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(m);break;default:switch(y(),m.constructor){case Uint8Array:case ArrayBuffer:l=new fe(Rt(u,me(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ol(new Uint8Array(m))),l.integrate(n,0);break;case Qr:l=new fe(Rt(u,me(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Rl(m)),l.integrate(n,0);break;default:if(m instanceof _e)l=new fe(Rt(u,me(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Ss(m)),l.integrate(n,0);else throw new Error(`Unexpected content type in insert operation`)}}}),y()},xw=()=>qn(`Length exceeded!`),_w=(n,t,i,r)=>{if(i>t._length)throw xw();if(i===0)return t._searchMarker&&vl(t._searchMarker,i,r.length),Nc(n,t,null,r);const l=i,o=lu(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Nc(n,t,l,i)},Tw=(n,t,i,r)=>{if(r===0)return;const l=i,o=r,u=lu(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw xw();t._searchMarker&&vl(t._searchMarker,l,-o+r)},jc=(n,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(n)},Hp=(n,t,i,r)=>{const l=t._map.get(i)||null,o=n.doc,u=o.clientID;let d;if(r==null)d=new xi([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new xi([r]);break;case Uint8Array:d=new Ol(r);break;case Qr:d=new Rl(r);break;default:if(r instanceof _e)d=new Ss(r);else throw new Error(`Unexpected content type`)}new fe(Rt(u,me(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(n,0)},qp=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},Aw=n=>{const t={};return n.doc??Re(),n._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},Ow=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted},DM=(n,t)=>{const i={};return n._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Cr(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},nc=n=>(n.doc??Re(),ZD(n._map.entries(),t=>!t[1].deleted));class MM extends au{}class Ur extends _e{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new Ur;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ur}clone(){const t=new Ur;return t.insert(0,this.toArray().map(i=>i instanceof _e?i.clone():i)),t}get length(){return this.doc??Re(),this._length}_callObserver(t,i){super._callObserver(t,i),ou(this,t,new MM(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{_w(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{RM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tw(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Cw(this,t)}toArray(){return ww(this)}slice(t=0,i=this.length){return bw(this,t,i)}toJSON(){return this.map(t=>t instanceof _e?t.toJSON():t)}map(t){return Ew(this,t)}forEach(t){bl(this,t)}[Symbol.iterator](){return OM(this)}_write(t){t.writeTypeRef(n2)}}const kM=n=>new Ur;class UM extends au{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Vr extends _e{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Vr}clone(){const t=new Vr;return this.forEach((i,r)=>{t.set(r,i instanceof _e?i.clone():i)}),t}_callObserver(t,i){ou(this,t,new UM(this,t,i))}toJSON(){this.doc??Re();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof _e?l.toJSON():l}}),t}get size(){return[...nc(this)].length}keys(){return ad(nc(this),t=>t[0])}values(){return ad(nc(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return ad(nc(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??Re(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{jc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{Hp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return qp(this,t)}has(t){return Ow(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,l){jc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(s2)}}const zM=n=>new Vr,Qs=(n,t)=>n===t||typeof n==`object`&&typeof t==`object`&&n&&t&&ZR(n,t);class Yd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&bn(),this.right.content.constructor){case he:this.right.deleted||Xr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const yv=(n,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case he:t.right.deleted||Xr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?lu(t,i):null;if(o){const u=new Yd(o.p.left,o.p,o.index,l);return yv(n,u,i-o.index)}else{const u=new Yd(null,t._start,0,l);return yv(n,u,i)}},Rw=(n,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===he&&Qs(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=n.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,y=new fe(Rt(o,me(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new he(d,u));y.integrate(n,0),i.right=y,i.forward()})},Xr=(n,t)=>{const{key:i,value:r}=t;r===null?n.delete(i):n.set(i,r)},Dw=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===he&&Qs(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Mw=(n,t,i,r)=>{const l=n.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Qs(g,p)){u.set(d,g);const{left:y,right:m}=i;i.right=new fe(Rt(o,me(l.store,o)),y,y&&y.lastId,m,m&&m.id,t,null,new he(d,p)),i.right.integrate(n,0),i.forward()}}return u},od=(n,t,i,r,l)=>{i.currentAttributes.forEach((v,w)=>{l[w]===void 0&&(l[w]=null)});const o=n.doc,u=o.clientID;Dw(i,l);const d=Mw(n,t,i,l),p=r.constructor===String?new Vn(r):r instanceof _e?new Ss(r):new Mi(r);let{left:g,right:y,index:m}=i;t._searchMarker&&vl(t._searchMarker,i.index,p.getLength()),y=new fe(Rt(u,me(o.store,u)),g,g&&g.lastId,y,y&&y.id,t,null,p),y.integrate(n,0),i.right=y,i.index=m,i.forward(),Rw(n,t,i,d)},mv=(n,t,i,r,l)=>{const o=n.doc,u=o.clientID;Dw(i,l);const d=Mw(n,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===he));){if(!i.right.deleted)switch(i.right.content.constructor){case he:{const{key:p,value:g}=i.right.content,y=l[p];if(y!==void 0){if(Qs(y,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(n)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` +`;i.right=new fe(Rt(u,me(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Vn(p)),i.right.integrate(n,0),i.forward()}Rw(n,t,i,d)},kw=(n,t,i,r,l)=>{let o=t;const u=An();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===he){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case he:{const{key:y,value:m}=g,v=r.get(y)??null;(u.get(y)!==g||v===m)&&(t.delete(n),d++,!p&&(l.get(y)??null)===m&&v!==m&&(v===null?l.delete(y):l.set(y,v))),!p&&!t.deleted&&Xr(l,g);break}}}t=t.right}return d},NM=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===he){const r=t.content.key;i.has(r)?t.delete(n):i.add(r)}t=t.left}},jM=n=>{let t=0;return $t(n.doc,i=>{let r=n._start,l=n._start,o=An();const u=Ld(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case he:Xr(u,l.content);break;default:t+=kw(i,r,l,o,u),o=Ld(u),r=l;break}l=l.right}}),t},BM=n=>{const t=new Set,i=n.doc;for(const[r,l]of n.afterState.entries()){const o=n.beforeState.get(r)||0;l!==o&&gw(n,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===he&&u.constructor!==vn&&t.add(u.parent)})}$t(i,r=>{lw(n,n.deleteSet,l=>{if(l instanceof vn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===he?t.add(o):NM(r,l)});for(const l of t)jM(l)})},Sv=(n,t,i)=>{const r=i,l=Ld(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Ss:case Mi:case Vn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,y=0,m=0;const v=()=>{if(d!==null){let w=null;switch(d){case`delete`:m>0&&(w={delete:m}),m=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(w={insert:g},l.size>0&&(w.attributes={},l.forEach((b,E)=>{b!==null&&(w.attributes[E]=b)}))),g=``;break;case`retain`:y>0&&(w={retain:y},JR(p)||(w.attributes=FR({},p))),y=0;break}w&&i.push(w),d=null}};for(;u!==null;){switch(u.content.constructor){case Ss:case Mi:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=1);break;case Vn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),m+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),y+=u.length);break;case he:{const{key:w,value:b}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(w)??null;Qs(E,b)?b!==null&&u.delete(r):(d===`retain`&&v(),Qs(b,o.get(w)??null)?delete p[w]:p[w]=b)}}else if(this.deletes(u)){o.set(w,b);const E=l.get(w)??null;Qs(E,b)||(d===`retain`&&v(),p[w]=E)}else if(!u.deleted){o.set(w,b);const E=p[w];E!==void 0&&(Qs(E,b)?E!==null&&u.delete(r):(d===`retain`&&v(),b===null?delete p[w]:p[w]=b))}u.deleted||(d===`insert`&&v(),Xr(l,u.content));break}}u=u.right}for(v();i.length>0;){const w=i[i.length-1];if(w.retain!==void 0&&w.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class $r extends _e{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Re(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new $r}clone(){const t=new $r;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new LM(this,t,i);ou(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??Re();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Vn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const l=new Yd(null,this._start,0,new Map);for(let o=0;o0)&&od(r,this,l,d,u.attributes||{})}else u.retain!==void 0?mv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&Sv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??Re();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const m={};let v=!1;o.forEach((b,E)=>{v=!0,m[E]=b});const w={insert:d};v&&(w.attributes=m),l.push(w),d=``}}const y=()=>{for(;p!==null;){if(Cr(p,t)||i!==void 0&&Cr(p,i))switch(p.content.constructor){case Vn:{const m=o.get(`ychange`);t!==void 0&&!Cr(p,t)?(m===void 0||m.user!==p.id.client||m.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Cr(p,i)?(m===void 0||m.user!==p.id.client||m.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):m!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case Ss:case Mi:{g();const m={insert:p.content.getContent()[0]};if(o.size>0){const v={};m.attributes=v,o.forEach((w,b)=>{v[b]=w})}l.push(m);break}case he:Cr(p,t)&&(g(),Xr(o,p.content));break}p=p.right}g()};return t||i?$t(u,m=>{t&&$d(m,t),i&&$d(m,i),y()},`cleanup`):y(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?$t(l,o=>{const u=sc(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),od(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?$t(l,o=>{const u=sc(o,this,t,!r);od(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,l=>{Sv(l,sc(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?$t(l,o=>{const u=sc(o,this,t,!1);u.right!==null&&mv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{jc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Hp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return qp(this,t)}getAttributes(){return Aw(this)}_write(t){t.writeTypeRef(i2)}}const IM=n=>new $r;class cd{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??Re()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===Gr||i.constructor===Ci)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Ci extends _e{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ci}clone(){const t=new Ci;return t.insert(0,this.toArray().map(i=>i instanceof _e?i.clone():i)),t}get length(){return this.doc??Re(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new cd(this,t)}querySelector(t){t=t.toUpperCase();const r=new cd(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ei(new cd(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){ou(this,t,new KM(this,i,t))}toString(){return Ew(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),bl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?$t(this.doc,r=>{_w(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const l=t&&t instanceof _e?t._item:t;Nc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw qn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tw(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return ww(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Cw(this,t)}slice(t=0,i=this.length){return bw(this,t,i)}forEach(t){bl(this,t)}_write(t){t.writeTypeRef(a2)}}const HM=n=>new Ci;class Gr extends Ci{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new Gr(this.nodeName)}clone(){const t=new Gr(this.nodeName),i=this.getAttributes();return XR(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof _e?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{jc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Hp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return qp(this,t)}hasAttribute(t){return Ow(this,t)}getAttributes(t){return t?DM(this,t):Aw(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return bl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(r2),t.writeKey(this.nodeName)}}const qM=n=>new Gr(n.readKey());class KM extends au{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class Bc extends Vr{constructor(t){super(),this.hookName=t}_copy(){return new Bc(this.hookName)}clone(){const t=new Bc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(l2),t.writeKey(this.hookName)}}const VM=n=>new Bc(n.readKey());class Lc extends $r{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Lc}clone(){const t=new Lc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(o2)}}const $M=n=>new Lc;class Kp{constructor(t,i){this.id=t,this.length=i}get deleted(){throw On()}mergeWith(t){return!1}write(t,i,r){throw On()}integrate(t,i){throw On()}}const GM=0;class vn extends Kp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),pw(t.doc.store,this)}write(t,i){t.writeInfo(GM),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Ol{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Ol(this.content)}splice(t){throw On()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const YM=n=>new Ol(n.readBuf());class wl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new wl(this.len)}splice(t){const i=new wl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Uc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const FM=n=>new wl(n.readLen()),Uw=(n,t)=>new Qr({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Rl{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Rl(Uw(this.doc.guid,this.opts))}splice(t){throw On()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const QM=n=>new Rl(Uw(n.readString(),n.readAny()));class Mi{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Mi(this.embed)}splice(t){throw On()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const XM=n=>new Mi(n.readJSON());class he{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new he(this.key,this.value)}splice(t){throw On()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const JM=n=>new he(n.readKey(),n.readJSON());class Ic{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Ic(this.arr)}splice(t){const i=new Ic(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=n.readLen(),i=[];for(let r=0;r{const t=n.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const t2=n=>new Vn(n.readString()),e2=[kM,zM,IM,qM,HM,VM,$M],n2=0,s2=1,i2=2,r2=3,a2=4,l2=5,o2=6;class Ss{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Ss(this.type._copy())}splice(t){throw On()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const c2=n=>new Ss(e2[n.readTypeRef()](n)),Hc=(n,t,i)=>{const{client:r,clock:l}=t.id,o=new fe(Rt(r,l+i),t,Rt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Rt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class fe extends Kp{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?QS:0}set marker(t){(this.info&ed)>0!==t&&(this.info^=ed)}get marker(){return(this.info&ed)>0}get keep(){return(this.info&FS)>0}set keep(t){this.keep!==t&&(this.info^=FS)}get countable(){return(this.info&QS)>0}get deleted(){return(this.info&td)>0}set deleted(t){this.deleted!==t&&(this.info^=td)}markDeleted(){this.info|=td}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=me(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=me(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===kr&&this.id.client!==this.parent.client&&this.parent.clock>=me(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=fv(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Zs(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===vn||this.right&&this.right.constructor===vn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===fe?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===fe&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===kr){const r=ld(i,this.parent);r.constructor===vn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=fv(t,t.doc.store,Rt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),ec(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Uc(t.deleteSet,this.id.client,this.id.clock,this.length),dv(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw bn();this.content.gc(t),i?gM(t,this,new vn(this.id,this.length)):this.content=new wl(this.length)}write(t,i){const r=i>0?Rt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Qc|(r===null?0:rn)|(l===null?0:gs)|(o===null?0:hl);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=dM(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===kr?(t.writeParentInfo(!1),t.writeLeftID(d)):bn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const zw=(n,t)=>u2[t&Qc](n),u2=[()=>{bn()},FM,ZM,YM,t2,XM,JM,c2,PM,QM,()=>{bn()}],f2=10;class _n extends Kp{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){bn()}write(t,i){t.writeInfo(f2),Dt(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const Nw=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},jw=`__ $YJS$ __`;Nw[jw]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);Nw[jw]=!0;const Bw=Math.floor,h2=(n,t)=>nn>t?n:t,Lw=128,mc=127,p2=Number.MAX_SAFE_INTEGER,Iw=()=>new Set,Hw=Array.from,g2=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lEl.encode(n),m2=El?y2:g2;let il=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});il&&il.decode(new Uint8Array).length===1&&(il=null);class S2{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const qw=()=>new S2,v2=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(v2(n));let i=0;for(let r=0;r{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},zr=(n,t)=>{for(;t>mc;)qc(n,Lw|mc&t),t=Bw(t/128);qc(n,mc&t)},Fd=new Uint8Array(3e4),b2=Fd.length/3,w2=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;zr(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=h2(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(d2(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},Vw=(n,t)=>{zr(n,t.byteLength),x2(n,t)},$w=n=>new Error(n),_2=$w(`Unexpected end of array`),T2=$w(`Integer out of Range`);class A2{constructor(t){this.arr=t,this.pos=0}}const Qd=n=>new A2(n),vv=n=>n.pos!==n.arr.length,O2=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},Xd=n=>O2(n,rl(n)),bv=n=>n.arr[n.pos++],rl=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posp2)throw T2}throw _2},R2=n=>{let t=rl(n);if(t===0)return``;{let i=String.fromCodePoint(bv(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(bv(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},D2=n=>il.decode(Xd(n)),M2=il?D2:R2,Kc=Date.now,Nr=()=>new Map,Gw=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r};class k2{constructor(){this._observers=Nr()}on(t,i){return Gw(this._observers,t,Iw).add(i),i}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hw((this._observers.get(t)||Nr()).values()).forEach(r=>r(...i))}destroy(){this._observers=Nr()}}class U2{constructor(){this._observers=Nr()}on(t,i){Gw(this._observers,t,Iw).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hw((this._observers.get(t)||Nr()).values()).forEach(r=>r(...i))}destroy(){this._observers=Nr()}}const wv=Symbol(`Equality`),z2=Object.keys,Ev=n=>z2(n).length,N2=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),al=(n,t)=>{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[wv]!=null)return n[wv](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;i{const i=Kc();this.getLocalState()!==null&&ud/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&ud<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&B2(this,r,`timeout`)},Bw(ud/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:Kc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),al(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const B2=(n,t,i)=>{const r=[];for(let l=0;l0&&(n.emit(`change`,[{added:[],updated:[],removed:r},i]),n.emit(`update`,[{added:[],updated:[],removed:r},i]))},Cv=(n,t,i=n.states)=>{const r=t.length,l=qw();zr(l,r);for(let o=0;o{const r=Qd(t),l=Kc(),o=[],u=[],d=[],p=[],g=rl(r);for(let y=0;y0||d.length>0||p.length>0)&&n.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&n.emit(`update`,[{added:o,updated:u,removed:p},i])},I2={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},H2=15e3;var q2=class Sc extends k2{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return I2[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&lv(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ys({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new wb(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=y=>{l||(l=!0,g(y))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const y=new Ys({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const m=await y.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=m.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await m.closed,p();continue}catch(m){if(g()){p();return}if(this.isNotFoundError(m)){if(d){o(m instanceof Error?m:new Error(String(m)));return}this.emit(`error`,[m instanceof Error?m:new Error(String(m))]),this.disconnect();return}if(d){o(m instanceof Error?m:new Error(String(m)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=qw();return Vw(i,t),Kw(i)}applyUpdates(t){if(t.length===0)return;const i=Qd(t);for(;vv(i);){const r=Xd(i);lv(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=Qd(t);for(;vv(i);){const r=Xd(i);try{L2(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(Sc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},H2),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=Cv(this.awareness,[this.awareness.clientID]);new Ys({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(Sc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=Cv(this.awareness,o);await new Ys({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(Sc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ys({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Wt&&t.code===`NOT_FOUND`||t instanceof Js&&t.status===404}isAuthError(t){return t instanceof Wt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof Js&&(t.status===401||t.status===403)}};const K2=64,V2=64,xv=200,$2=1500,vc=.3,_v=12e4,G2=`#d0bcff`,ic=[`#FF0055`,`#00FF88`,`#FFEE00`,`#00CCFF`,`#FF6600`,`#00FFCC`,`#FF2299`,`#33FF00`,`#FF00AA`,`#00AAFF`,`#FFAA00`,`#CC00FF`,`#00FF55`,`#FF4400`,`#0066FF`];function Y2(n){const t=n.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:K2,rows:V2}}function ll(n){return n.getMap(`territoryCell`)}function jn(n){return n.getMap(`players`)}function cu(n){return n.getMap(`gameState`)}function Yw(n,t){const i=jn(n),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function fd(n){const t=ll(n),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function F2(n,t){let i=0;return n.forEach(r=>{r.owner===t&&i++}),i}function Q2(n,t,i,r){const l=new Set;t.forEach((p,g)=>{p.owner===n&&l.add(g)});const o=new Set,u=[];for(let p=0;p0;){const{x:p,y:g}=u.pop();for(const[y,m]of[[0,-1],[0,1],[-1,0],[1,0]]){const v=p+y,w=g+m;if(v<0||v>=i||w<0||w>=r)continue;const b=`${v},${w}`;l.has(b)||o.has(b)||(o.add(b),u.push({x:v,y:w}))}}const d=[];for(let p=0;pA.x===m&&A.y===v);if(b){const[A,M]=b,G=p+$2,q=jn(n);return q.set(A,{...M,stunnedUntil:G}),q.set(t,{x:r.x,y:r.y,name:i,stunnedUntil:G}),{moved:!1,stunned:!0,x:r.x,y:r.y,stunnedUntil:G}}jn(n).set(t,{x:m,y:v,name:i});const _=ll(n),j=Date.now();n.transact(()=>{_.set(`${m},${v}`,{owner:t,claimedAt:j})});const O=Q2(t,_,o,u);return O.length>0&&n.transact(()=>{for(const A of O)_.set(`${A.x},${A.y}`,{owner:t,claimedAt:j})}),{moved:!0,stunned:!1,x:m,y:v,stunnedUntil:0}}function Tv(n){const t=cu(n);t.has(`gameStartedAt`)||n.transact(()=>{t.has(`gameStartedAt`)||t.set(`gameStartedAt`,Date.now())})}function Z2(n){const i=cu(n).get(`gameStartedAt`);return i!==void 0?i:null}function hd(n){const i=cu(n).get(`gameEndedAt`);return i!==void 0?i:null}function Av(n){const t=cu(n);(!t.has(`gameEndedAt`)||t.get(`gameEndedAt`)===null)&&n.transact(()=>{t.set(`gameEndedAt`,Date.now())})}function Vp(n){const t=new Map;return n.forEach(i=>{t.set(i.owner,(t.get(i.owner)||0)+1)}),t}function Ov(n,t,i){const r=Vp(n),l=vc*t;for(const[o,u]of r)if(u>=l){const d=i.get(o);if(d)return{name:d.name,pct:Math.round(u/t*100)}}return null}function Rv(n,t,i){const r=Vp(n);let l=0,o=``;if(r.forEach((d,p)=>{d>l&&(l=d,o=p)}),!o||l===0)return null;const u=i.get(o);return u?{name:u.name,pct:Math.round(l/t*100)}:null}const Fw=J.createContext(null);function W2(){const n=J.useContext(Fw);if(!n)throw new Error(`useGameRoom must be used within GameRoom`);return n}function P2(n,t){return{streamOptions:{url:n,headers:t,contentType:`application/json`},state:GS,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(GS.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})}}function tk(n,t){return _b(P2(n,t))}const ek=J.createContext(null);function nk({roomId:n,children:t}){const{dsEndpoint:i,dsHeaders:r}=Zd(),{db:l,error:o}=tk(`${i}/__snake_scores_${encodeURIComponent(n)}`,r);return o&&console.warn(`[Scores] Error loading scores:`,o.message),F.jsx(ek.Provider,{value:l?{scoresDB:l}:null,children:t})}const sk=1,br=8,Dv=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function ik(n,t){return n>256||t>256?2:n>64||t>64?4:14}function rk({onLeave:n}){const{doc:t,awareness:i,roomId:r,playerId:l,playerName:o,playerColor:u}=W2(),{cols:d,rows:p}=J.useMemo(()=>Y2(r),[r]),g=d*p,y=J.useMemo(()=>ik(d,p),[d,p]),m=d<=100&&p<=100,[v,w]=J.useState(new Map),[b,E]=J.useState(new Map),[_,j]=J.useState({x:0,y:0}),[O,A]=J.useState(1),[M,G]=J.useState(!1),[q,K]=J.useState(!1),[W,et]=J.useState(null),[X,at]=J.useState(_v/1e3),nt=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),bt=J.useRef(void 0),Lt=J.useRef(null),dt=J.useRef({x:0,y:0,stunnedUntil:0}),k=J.useMemo(()=>F2(v,l)*sk,[v,l]),I=J.useMemo(()=>Math.round(k/g*100),[k,g]),Z=J.useMemo(()=>Vp(v),[v]),it=J.useRef(null),[ft,T]=J.useState(!1),B=J.useMemo(()=>{let tt=0,P=``;if(Z.forEach((ht,Qt)=>{ht>tt&&(tt=ht,P=Qt)}),!P||tt===0)return null;const gt=Math.round(tt/g*100);if(P===l)return{name:o,pct:gt};const pt=b.get(P);return pt?{name:pt.name,pct:gt}:null},[Z,g,l,o,b]);J.useEffect(()=>{if(B){if(it.current!==null&&it.current!==B.name){T(!0);const tt=setTimeout(()=>T(!1),900);return()=>clearTimeout(tt)}it.current=B.name}},[B]),J.useEffect(()=>{const tt=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);dt.current={x:tt,y:P,stunnedUntil:0},j({x:tt,y:P});const gt=jn(t);gt.set(l,{x:tt,y:P,name:o});const pt=ll(t);return t.transact(()=>{pt.set(`${tt},${P}`,{owner:l,claimedAt:Date.now()})}),Tv(t),()=>{gt.delete(l)}},[t,l,o,u,d,p]),J.useEffect(()=>{const tt=ll(t),P=()=>{const gt=fd(t);if(w(gt),hd(t)!==null)return;const pt=Ov(gt,g,jn(t));pt&&(et(pt),Av(t))};return tt.observe(P),P(),()=>tt.unobserve(P)},[t,g]),J.useEffect(()=>{const tt=()=>{const gt=Z2(t);if(!gt)return;const pt=Date.now()-gt,ht=Math.max(0,_v-pt);at(Math.ceil(ht/1e3));const Qt=hd(t)!==null;if(ht<=0&&!Qt){const De=fd(t),Ge=Rv(De,g,jn(t));et(Ge||{name:`Nobody`,pct:0}),Av(t)}else Qt&&et(De=>{if(De)return De;const Ge=fd(t),Ye=Ov(Ge,g,jn(t));return Ye||(Rv(Ge,g,jn(t))??{name:`Nobody`,pct:0})})},P=setInterval(tt,1e3);return tt(),()=>clearInterval(P)},[t,g]),J.useEffect(()=>{const tt=jn(t),P=()=>{E(Yw(t,l))};return tt.observe(P),P(),()=>tt.unobserve(P)},[t,l]),J.useEffect(()=>{const tt=()=>{const P=new Set,gt=new Set([o]);i.getStates().forEach((ht,Qt)=>{if(Qt!==i.clientID){ht.playerId&&P.add(ht.playerId);const De=ht.user?.name;De&>.add(De)}}),A(ht=>{const Qt=gt.size;return ht===Qt?ht:Qt});const pt=jn(t);pt.forEach((ht,Qt)=>{Qt!==l&&!P.has(Qt)&&pt.delete(Qt)})};return i.on(`change`,tt),tt(),()=>i.off(`change`,tt)},[i,t,l,o]),J.useEffect(()=>{const tt=new Set,P=pt=>{if(pt.key in wr){pt.preventDefault();const ht=!Lt.current;tt.add(pt.key),Lt.current=wr[pt.key],ht&&$e.current?.(wr[pt.key])}},gt=pt=>{if(tt.delete(pt.key),pt.key in wr){let ht=!1;for(const Qt of tt)if(Qt in wr){Lt.current=wr[Qt],ht=!0;break}ht||(Lt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,gt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,gt)}},[]);const Y=J.useRef(null),Q=J.useRef(null),ot=J.useRef(0),st=10,mt=J.useCallback((tt,P)=>{const gt=Date.now();if(gt-ot.currentMath.abs(Wr)?$e.current?.({dx:zi>0?1:-1,dy:0}):$e.current?.({dx:0,dy:Wr>0?1:-1}),ot.current=gt)},[y]),Ut=J.useCallback(tt=>{tt.preventDefault();const P=tt.touches[0];Q.current={x:P.clientX,y:P.clientY},mt(P.clientX,P.clientY)},[mt]),wt=J.useCallback(tt=>{if(tt.preventDefault(),!Q.current)return;const P=tt.touches[0],gt=P.clientX-Q.current.x,pt=P.clientY-Q.current.y;Math.abs(gt){Q.current=null},[]),$e=J.useRef(void 0),Ps=J.useCallback(tt=>{const P=Y.current;if(!P)return;const gt=P.createSVGPoint();gt.x=tt.clientX,gt.y=tt.clientY;const pt=P.getScreenCTM();if(!pt)return;const ht=gt.matrixTransform(pt.inverse()),Qt=ht.x/y-.5,De=ht.y/y-.5,Ge=dt.current,Ye=Qt-Ge.x,Gn=De-Ge.y;Ye===0&&Gn===0||(Math.abs(Ye)>Math.abs(Gn)?$e.current?.({dx:Ye>0?1:-1,dy:0}):$e.current?.({dx:0,dy:Gn>0?1:-1}))},[y]),ki=J.useCallback(()=>{n()},[n]);J.useEffect(()=>{const tt=gt=>{if(hd(t)!==null)return;const pt=dt.current,ht=J2(t,l,o,{x:pt.x,y:pt.y},gt,d,p,pt.stunnedUntil);pt.stunnedUntil=ht.stunnedUntil,ht.moved&&(pt.x=ht.x,pt.y=ht.y,j({x:ht.x,y:ht.y}),i.setLocalState({...i.getLocalState(),x:ht.x,y:ht.y}))};$e.current=tt;const P=setInterval(()=>{const gt=Lt.current;gt&&tt(gt)},xv);return()=>clearInterval(P)},[t,l,o,u,d,p,i]);const Te=d*y,ti=p*y,Jr=J.useCallback(()=>{navigator.clipboard.writeText(nt).catch(()=>{}),G(!0),clearTimeout(bt.current),bt.current=setTimeout(()=>G(!1),1200)},[nt]);J.useEffect(()=>()=>clearTimeout(bt.current),[]);const uu=J.useMemo(()=>m?F.jsxs(F.Fragment,{children:[Array.from({length:d},(tt,P)=>F.jsx(`line`,{x1:P*y,y1:0,x2:P*y,y2:ti,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(tt,P)=>F.jsx(`line`,{x1:0,y1:P*y,x2:Te,y2:P*y,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}):null,[d,p,Te,ti,y,m]),Ui=J.useMemo(()=>{const tt=new Map;tt.set(l,u);const P=[...b.keys()].sort();for(let gt=0;gt{const P=Math.floor(tt/60),gt=tt%60;return`${P}:${gt.toString().padStart(2,`0`)}`};return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` + @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); + @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } + .live-dot { animation: blink 1.5s ease-in-out infinite; } + @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } + .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } + @keyframes leader-blink { 0%,100% { opacity:1 } 50% { opacity:0 } } + .leader-blink { animation: leader-blink 0.3s ease-in-out 3; } + `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:Te,marginBottom:8,fontSize:br},children:[F.jsx(`button`,{onClick:ki,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:br,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:Jr,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Vt.accent},children:o}),F.jsx(`span`,{style:{color:Vt.dim},children:`@`}),F.jsx(`span`,{style:{color:M?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:M?`COPIED`:nt})]}),F.jsx(`span`,{style:{color:X<=30?`#FF3D71`:Vt.accent,fontVariantNumeric:`tabular-nums`},children:Zr(X)}),F.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),onClick:()=>K(tt=>!tt),children:[O,` PLAYERS`,q&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o},...Array.from(b.entries()).map(([tt,P])=>({id:tt,name:P.name}))].map(tt=>{const P=Ui.get(tt.id)??ic[0],gt=Z.get(tt.id)||0,pt=Math.round(gt/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:P,display:`inline-block`}}),tt.name]}),F.jsxs(`span`,{style:{color:Vt.accent},children:[pt,`%`]})]},tt.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:Te,marginBottom:8,fontSize:br},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[I,`%`]}),` `,F.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:B?4:0,color:B&&B.pct>=Math.round(vc*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(vc*100),`%`]}),B&&F.jsxs(`div`,{children:[F.jsx(`span`,{className:ft?`leader-blink`:void 0,style:{color:Vt.dim},children:B.name}),` `,F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[B.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:Y,viewBox:`0 0 ${Te} ${ti}`,onTouchStart:Ut,onTouchMove:wt,onTouchEnd:an,onClick:Ps,style:{width:`min(100%, calc(100dvh - 140px))`,maxWidth:Te,height:`auto`,aspectRatio:`${d} / ${p}`,background:Vt.grid,border:`1px solid ${Vt.border}`,flexShrink:0,userSelect:`none`,WebkitUserSelect:`none`},children:[uu,Array.from(v.entries()).map(([tt,P])=>{const[gt,pt]=tt.split(`,`).map(Number),ht=Ui.get(P.owner)||Vt.accent;return F.jsx(`rect`,{x:gt*y,y:pt*y,width:y,height:y,fill:ht,opacity:.5},tt)}),Array.from(b.entries()).map(([tt,P])=>{const gt=P.stunnedUntil!=null&&Date.now(){const tt=dt.current.stunnedUntil>0&&Date.now(){const tt=ll(t),P=t.getMap(`gameState`);t.transact(()=>{Array.from(tt.keys()).forEach(pt=>tt.delete(pt)),P.delete(`gameStartedAt`),P.delete(`gameEndedAt`)}),et(null),Tv(t)},style:{fontFamily:`inherit`,fontSize:br,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),F.jsx(`button`,{onClick:ki,style:{fontFamily:`inherit`,fontSize:br,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}function ak({roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:l}){const{registryDB:o}=Ab(),[{playerId:u,doc:d,awareness:p}]=J.useState(()=>{const O=`player-${Math.random().toString(36).slice(2,10)}`,A=new Qr,M=new j2(A);return M.setLocalState({user:{name:r},playerId:O,type:`human`}),{playerId:O,doc:A,awareness:M}}),g=G2,[y,m]=J.useState(!0),[v,w]=J.useState(!1),[b,E]=J.useState(null),_=J.useRef(null);J.useEffect(()=>{const O=new q2({doc:d,baseUrl:t,docId:n,awareness:p,headers:i,connect:!1});return O.on(`synced`,A=>{w(A),A&&m(!1)}),O.on(`status`,A=>{A===`connected`&&m(!1)}),O.on(`error`,A=>{E(A),m(!1)}),p.getLocalState()===null&&p.setLocalState({user:{name:r},playerId:u,type:`human`}),_.current=O,O.connect(),()=>{O.destroy(),_.current=null}},[n,d,p,t,i,r,u]),J.useEffect(()=>{const A=setInterval(()=>{const M=new Set([u]);if(p.getStates().forEach(K=>{K.playerId&&M.add(K.playerId)}),[...M].sort()[0]!==u)return;const q=o.collections.rooms.toArray.find(K=>K.roomId===n);if(q)try{o.actions.addRoom({...q,expiresAt:Date.now()+bp*1e3})}catch{}},QO);return()=>clearInterval(A)},[p,o,n,u]),J.useEffect(()=>()=>{d.destroy()},[d]);const j=J.useMemo(()=>({doc:d,awareness:p,roomId:n,playerId:u,playerName:r,playerColor:g,isSynced:v,isLoading:y}),[d,p,n,u,r,g,v,y]);return b?F.jsxs(`div`,{style:dd.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,b.message]}),F.jsx(`button`,{onClick:l,style:dd.btn,children:`BACK`})]}):y?F.jsxs(`div`,{style:dd.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(Fw.Provider,{value:j,children:F.jsx(nk,{roomId:n,children:F.jsx(rk,{onLeave:l})})})}const dd={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},Mv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],kv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function lk(){const n=Mv[Math.floor(Math.random()*Mv.length)],t=kv[Math.floor(Math.random()*kv.length)];return`${n} ${t}`}function ok(){return localStorage.getItem(`territory-player-name`)||lk()}function ck(){const[n,t]=J.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return J.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),n}function uk(){const n=ck(),{yjsEndpoint:t,yjsHeaders:i}=Zd(),[r,l]=J.useState(ok),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return n?F.jsx(ak,{roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(sR,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function fk(){return F.jsx(CC,{children:F.jsx(tR,{children:F.jsx(uk,{})})})}wC.createRoot(document.getElementById(`root`)).render(F.jsx(fk,{})); diff --git a/website/public/demos/territory-wars/assets/index-CYvUTm66.js b/website/public/demos/territory-wars/assets/index-CYvUTm66.js deleted file mode 100644 index 7c68f0abe2..0000000000 --- a/website/public/demos/territory-wars/assets/index-CYvUTm66.js +++ /dev/null @@ -1,42 +0,0 @@ -(function(){const t=document.createElement(`link`).relList;if(t&&t.supports&&t.supports(`modulepreload`))return;for(const l of document.querySelectorAll(`link[rel="modulepreload"]`))r(l);new MutationObserver(l=>{for(const o of l)if(o.type===`childList`)for(const u of o.addedNodes)u.tagName===`LINK`&&u.rel===`modulepreload`&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin===`use-credentials`?o.credentials=`include`:l.crossOrigin===`anonymous`?o.credentials=`omit`:o.credentials=`same-origin`,o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function hC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,`default`)?n.default:n}var bh={exports:{}},Va={};var L0;function dC(){if(L0)return Va;L0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function i(r,l,o){var u=null;if(o!==void 0&&(u=``+o),l.key!==void 0&&(u=``+l.key),`key`in l){o={};for(var d in l)d!==`key`&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Va.Fragment=t,Va.jsx=i,Va.jsxs=i,Va}var I0;function pC(){return I0||(I0=1,bh.exports=dC()),bh.exports}var F=pC(),Eh={exports:{}},$a={},Ch={exports:{}},xh={};var H0;function gC(){return H0||(H0=1,(function(n){function t(k,q){var Z=k.length;k.push(q);t:for(;0>>1,ut=k[st];if(0>>1;st<_;){var L=2*(st+1)-1,Y=k[L],Q=L+1,ot=k[Q];if(0>l(Y,Z))Ql(ot,Y)?(k[st]=ot,k[Q]=Z,st=Q):(k[st]=Y,k[L]=Z,st=L);else if(Ql(ot,Z))k[st]=ot,k[Q]=Z,st=Q;else break t}}return q}function l(k,q){var Z=k.sortIndex-q.sortIndex;return Z!==0?Z:k.id-q.id}if(n.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var p=[],g=[],m=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,N=typeof setTimeout==`function`?setTimeout:null,M=typeof clearTimeout==`function`?clearTimeout:null,R=typeof setImmediate<`u`?setImmediate:null;function A(k){for(var q=i(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=k)r(g),q.sortIndex=q.expirationTime,t(p,q);else break;q=i(g)}}function V(k){if(E=!1,A(k),!w)if(i(p)!==null)w=!0,I||(I=!0,nt());else{var q=i(g);q!==null&&dt(V,q.startTime-k)}}var I=!1,H=-1,W=5,tt=-1;function X(){return T?!0:!(n.unstable_now()-ttk&&X());){var st=y.callback;if(typeof st==`function`){y.callback=null,v=y.priorityLevel;var ut=st(y.expirationTime<=k);if(k=n.unstable_now(),typeof ut==`function`){y.callback=ut,A(k),q=!0;break e}y===i(p)&&r(p),A(k)}else r(p);y=i(p)}if(y!==null)q=!0;else{var _=i(g);_!==null&&dt(V,_.startTime-k),q=!1}}break t}finally{y=null,v=Z,b=!1}q=void 0}}finally{q?nt():I=!1}}}var nt;if(typeof R==`function`)nt=function(){R(at)};else if(typeof MessageChannel<`u`){var wt=new MessageChannel,Lt=wt.port2;wt.port1.onmessage=at,nt=function(){Lt.postMessage(null)}}else nt=function(){N(at,0)};function dt(k,q){H=N(function(){k(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125st?(k.sortIndex=Z,t(g,k),i(p)===null&&k===i(g)&&(E?(M(H),H=-1):E=!0,dt(V,Z-st))):(k.sortIndex=ut,t(p,k),w||b||(w=!0,I||(I=!0,nt()))),k},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(k){var q=v;return function(){var Z=v;v=q;try{return k.apply(this,arguments)}finally{v=Z}}}})(xh)),xh}var q0;function yC(){return q0||(q0=1,Ch.exports=gC()),Ch.exports}var _h={exports:{}},gt={};var K0;function mC(){if(K0)return gt;K0=1;var n=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),g=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`),y=Symbol.for(`react.activity`),v=Symbol.iterator;function b(_){return _===null||typeof _!=`object`?null:(_=v&&_[v]||_[`@@iterator`],typeof _==`function`?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function N(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}N.prototype.isReactComponent={},N.prototype.setState=function(_,L){if(typeof _!=`object`&&typeof _!=`function`&&_!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,_,L,`setState`)},N.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,`forceUpdate`)};function M(){}M.prototype=N.prototype;function R(_,L,Y){this.props=_,this.context=L,this.refs=T,this.updater=Y||w}var A=R.prototype=new M;A.constructor=R,E(A,N.prototype),A.isPureReactComponent=!0;var V=Array.isArray;function I(){}var H={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function tt(_,L,Y){var Q=Y.ref;return{$$typeof:n,type:_,key:L,ref:Q!==void 0?Q:null,props:Y}}function X(_,L){return tt(_.type,L,_.props)}function at(_){return typeof _==`object`&&_!==null&&_.$$typeof===n}function nt(_){var L={"=":`=0`,":":`=2`};return`$`+_.replace(/[=:]/g,function(Y){return L[Y]})}var wt=/\/+/g;function Lt(_,L){return typeof _==`object`&&_!==null&&_.key!=null?nt(``+_.key):L.toString(36)}function dt(_){switch(_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason;default:switch(typeof _.status==`string`?_.then(I,I):(_.status=`pending`,_.then(function(L){_.status===`pending`&&(_.status=`fulfilled`,_.value=L)},function(L){_.status===`pending`&&(_.status=`rejected`,_.reason=L)})),_.status){case`fulfilled`:return _.value;case`rejected`:throw _.reason}}throw _}function k(_,L,Y,Q,ot){var it=typeof _;(it===`undefined`||it===`boolean`)&&(_=null);var vt=!1;if(_===null)vt=!0;else switch(it){case`bigint`:case`string`:case`number`:vt=!0;break;case`object`:switch(_.$$typeof){case n:case t:vt=!0;break;case m:return vt=_._init,k(vt(_._payload),L,Y,Q,ot)}}if(vt)return ot=ot(_),vt=Q===``?`.`+Lt(_,0):Q,V(ot)?(Y=``,vt!=null&&(Y=vt.replace(wt,`$&/`)+`/`),k(ot,L,Y,``,function($e){return $e})):ot!=null&&(at(ot)&&(ot=X(ot,Y+(ot.key==null||_&&_.key===ot.key?``:(``+ot.key).replace(wt,`$&/`)+`/`)+vt)),L.push(ot)),1;vt=0;var xt=Q===``?`.`:Q+`:`;if(V(_))for(var bt=0;bt<_.length;bt++)Q=_[bt],it=xt+Lt(Q,bt),vt+=k(Q,L,Y,it,ot);else if(bt=b(_),typeof bt==`function`)for(_=bt.call(_),bt=0;!(Q=_.next()).done;)Q=Q.value,it=xt+Lt(Q,bt++),vt+=k(Q,L,Y,it,ot);else if(it===`object`){if(typeof _.then==`function`)return k(dt(_),L,Y,Q,ot);throw L=String(_),Error(`Objects are not valid as a React child (found: `+(L===`[object Object]`?`object with keys {`+Object.keys(_).join(`, `)+`}`:L)+`). If you meant to render a collection of children, use an array instead.`)}return vt}function q(_,L,Y){if(_==null)return _;var Q=[],ot=0;return k(_,Q,``,``,function(it){return L.call(Y,it,ot++)}),Q}function Z(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var st=typeof reportError==`function`?reportError:function(_){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var L=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof _==`object`&&_!==null&&typeof _.message==`string`?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,_);return}console.error(_)},ut={map:q,forEach:function(_,L,Y){q(_,function(){L.apply(this,arguments)},Y)},count:function(_){var L=0;return q(_,function(){L++}),L},toArray:function(_){return q(_,function(L){return L})||[]},only:function(_){if(!at(_))throw Error(`React.Children.only expected to receive a single React element child.`);return _}};return gt.Activity=y,gt.Children=ut,gt.Component=N,gt.Fragment=i,gt.Profiler=l,gt.PureComponent=R,gt.StrictMode=r,gt.Suspense=p,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,gt.__COMPILER_RUNTIME={__proto__:null,c:function(_){return H.H.useMemoCache(_)}},gt.cache=function(_){return function(){return _.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(_,L,Y){if(_==null)throw Error(`The argument must be a React element, but you passed `+_+`.`);var Q=E({},_.props),ot=_.key;if(L!=null)for(it in L.key!==void 0&&(ot=``+L.key),L)!W.call(L,it)||it===`key`||it===`__self`||it===`__source`||it===`ref`&&L.ref===void 0||(Q[it]=L[it]);var it=arguments.length-2;if(it===1)Q.children=Y;else if(1`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Th.exports=SC(),Th.exports}var Y0;function wC(){if(Y0)return $a;Y0=1;var n=yC(),t=Fd(),i=vC();function r(e){var s=`https://react.dev/errors/`+e;if(1ut||(e.current=st[ut],st[ut]=null,ut--)}function Y(e,s){ut++,st[ut]=e.current,e.current=s}var Q=_(null),ot=_(null),it=_(null),vt=_(null);function xt(e,s){switch(Y(it,s),Y(ot,e),Y(Q,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&&(e=e.namespaceURI)?l0(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=l0(s),e=o0(s,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(Q),Y(Q,e)}function bt(){L(Q),L(ot),L(it)}function $e(e){e.memoizedState!==null&&Y(vt,e);var s=Q.current,a=o0(s,e.type);s!==a&&(Y(ot,e),Y(Q,a))}function Ge(e){ot.current===e&&(L(Q),L(ot)),vt.current===e&&(L(vt),Ia._currentValue=Z)}var Fn,Xr;function wn(e){if(Fn===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Fn=s&&s[1]||``,Xr=-1)`:-1f||x[c]!==z[f]){var K=` -`+x[c].replace(` at new `,` at `);return e.displayName&&K.includes(``)&&(K=K.replace(``,e.displayName)),K}while(1<=c&&0<=f);break}}}finally{ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:``)?wn(a):``}function et(e,s){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn(`Lazy`);case 13:return e.child!==s&&s!==null?wn(`Suspense Fallback`):wn(`Suspense`);case 19:return wn(`SuspenseList`);case 0:case 15:return Jr(e.type,!1);case 11:return Jr(e.type.render,!1);case 1:return Jr(e.type,!0);case 31:return wn(`Activity`);default:return``}}function P(e){try{var s=``,a=null;do s+=et(e,a),a=e,e=e.return;while(e);return s}catch(c){return` -Error generating stack: `+c.message+` -`+c.stack}}var pt=Object.prototype.hasOwnProperty,ft=n.unstable_scheduleCallback,St=n.unstable_cancelCallback,Xt=n.unstable_shouldYield,je=n.unstable_requestPaint,Ft=n.unstable_now,Dn=n.unstable_getCurrentPriorityLevel,Mn=n.unstable_ImmediatePriority,Ui=n.unstable_UserBlockingPriority,bs=n.unstable_NormalPriority,Fb=n.unstable_LowPriority,qp=n.unstable_IdlePriority,Qb=n.log,Xb=n.unstable_setDisableYieldValue,Zr=null,Ye=null;function Es(e){if(typeof Qb==`function`&&Xb(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Zr,e)}catch{}}var Fe=Math.clz32?Math.clz32:Wb,Jb=Math.log,Zb=Math.LN2;function Wb(e){return e>>>=0,e===0?32:31-(Jb(e)/Zb|0)|0}var Ol=256,Rl=262144,Dl=4194304;function ni(e){var s=e&42;if(s!==0)return s;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ml(e,s,a){var c=e.pendingLanes;if(c===0)return 0;var f=0,h=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var C=c&134217727;return C!==0?(c=C&~h,c!==0?f=ni(c):(S&=C,S!==0?f=ni(S):a||(a=C&~e,a!==0&&(f=ni(a))))):(C=c&~h,C!==0?f=ni(C):S!==0?f=ni(S):a||(a=c&~e,a!==0&&(f=ni(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function Wr(e,s){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&s)===0}function Pb(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kp(){var e=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function ou(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function Pr(e,s){e.pendingLanes|=s,s!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tE(e,s,a,c,f,h){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,z=e.hiddenUpdates;for(a=S&~a;0`u`)return null;try{return e.activeElement||e.body}catch{return e.body}}var aE=/[\n"\\]/g;function an(e){return e.replace(aE,function(s){return`\\`+s.charCodeAt(0).toString(16)+` `})}function pu(e,s,a,c,f,h,S,C){e.name=``,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`?e.type=S:e.removeAttribute(`type`),s!=null?S===`number`?(s===0&&e.value===``||e.value!=s)&&(e.value=``+rn(s)):e.value!==``+rn(s)&&(e.value=``+rn(s)):S!==`submit`&&S!==`reset`||e.removeAttribute(`value`),s!=null?gu(e,S,rn(s)):a!=null?gu(e,S,rn(a)):c!=null&&e.removeAttribute(`value`),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!=`function`&&typeof f!=`symbol`),C!=null&&typeof C!=`function`&&typeof C!=`symbol`&&typeof C!=`boolean`?e.name=``+rn(C):e.removeAttribute(`name`)}function eg(e,s,a,c,f,h,S,C){if(h!=null&&typeof h!=`function`&&typeof h!=`symbol`&&typeof h!=`boolean`&&(e.type=h),s!=null||a!=null){if(!(h!==`submit`&&h!==`reset`||s!=null)){du(e);return}a=a!=null?``+rn(a):``,s=s!=null?``+rn(s):a,C||s===e.value||(e.value=s),e.defaultValue=s}c=c??f,c=typeof c!=`function`&&typeof c!=`symbol`&&!!c,e.checked=C?e.checked:!!c,e.defaultChecked=!!c,S!=null&&typeof S!=`function`&&typeof S!=`symbol`&&typeof S!=`boolean`&&(e.name=S),du(e)}function gu(e,s,a){s===`number`&&zl(e.ownerDocument)===e||e.defaultValue===``+a||(e.defaultValue=``+a)}function Ii(e,s,a,c){if(e=e.options,s){s={};for(var f=0;f`u`||typeof window.document>`u`||typeof window.document.createElement>`u`),wu=!1;if(Jn)try{var sa={};Object.defineProperty(sa,`passive`,{get:function(){wu=!0}}),window.addEventListener(`test`,sa,sa),window.removeEventListener(`test`,sa,sa)}catch{wu=!1}var xs=null,bu=null,Nl=null;function og(){if(Nl)return Nl;var e,s=bu,a=s.length,c,f=`value`in xs?xs.value:xs.textContent,h=f.length;for(e=0;e=aa),pg=` `,gg=!1;function yg(e,s){switch(e){case`keyup`:return zE.indexOf(s.keyCode)!==-1;case`keydown`:return s.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mg(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Vi=!1;function NE(e,s){switch(e){case`compositionend`:return mg(s);case`keypress`:return s.which!==32?null:(gg=!0,pg);case`textInput`:return e=s.data,e===pg&&gg?null:e;default:return null}}function BE(e,s){if(Vi)return e===`compositionend`||!Tu&&yg(e,s)?(e=og(),Nl=bu=xs=null,Vi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-e};e=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=_g(a)}}function Ag(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?Ag(e,s.parentNode):`contains`in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Og(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=zl(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==`string`}catch{a=!1}if(a)e=s.contentWindow;else break;s=zl(e.document)}return s}function Ru(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||s===`textarea`||e.contentEditable===`true`)}var GE=Jn&&`documentMode`in document&&11>=document.documentMode,$i=null,Du=null,ua=null,Mu=!1;function Rg(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Mu||$i==null||$i!==zl(c)||(c=$i,`selectionStart`in c&&Ru(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ua&&ca(ua,c)||(ua=c,c=Do(Du,`onSelect`),0>=S,f-=S,kn=1<<32-Fe(s)+f|a<mt?(Tt=lt,lt=null):Tt=lt.sibling;var Ut=j(D,lt,U[mt],$);if(Ut===null){lt===null&&(lt=Tt);break}e&<&&Ut.alternate===null&&s(D,lt),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut,lt=Tt}if(mt===U.length)return a(D,lt),Ot&&Wn(D,mt),ct;if(lt===null){for(;mtmt?(Tt=lt,lt=null):Tt=lt.sibling;var Ys=j(D,lt,Ut.value,$);if(Ys===null){lt===null&&(lt=Tt);break}e&<&&Ys.alternate===null&&s(D,lt),O=h(Ys,O,mt),kt===null?ct=Ys:kt.sibling=Ys,kt=Ys,lt=Tt}if(Ut.done)return a(D,lt),Ot&&Wn(D,mt),ct;if(lt===null){for(;!Ut.done;mt++,Ut=U.next())Ut=G(D,Ut.value,$),Ut!==null&&(O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return Ot&&Wn(D,mt),ct}for(lt=c(lt);!Ut.done;mt++,Ut=U.next())Ut=B(lt,D,mt,Ut.value,$),Ut!==null&&(e&&Ut.alternate!==null&<.delete(Ut.key===null?mt:Ut.key),O=h(Ut,O,mt),kt===null?ct=Ut:kt.sibling=Ut,kt=Ut);return e&<.forEach(function(fC){return s(D,fC)}),Ot&&Wn(D,mt),ct}function qt(D,O,U,$){if(typeof U==`object`&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U==`object`&&U!==null){switch(U.$$typeof){case b:t:{for(var ct=U.key;O!==null;){if(O.key===ct){if(ct=U.type,ct===E){if(O.tag===7){a(D,O.sibling),$=f(O,U.props.children),$.return=D,D=$;break t}}else if(O.elementType===ct||typeof ct==`object`&&ct!==null&&ct.$$typeof===W&&di(ct)===O.type){a(D,O.sibling),$=f(O,U.props),ya($,U),$.return=D,D=$;break t}a(D,O);break}else s(D,O);O=O.sibling}U.type===E?($=oi(U.props.children,D.mode,$,U.key),$.return=D,D=$):($=Yl(U.type,U.key,U.props,null,D.mode,$),ya($,U),$.return=D,D=$)}return S(D);case w:t:{for(ct=U.key;O!==null;){if(O.key===ct)if(O.tag===4&&O.stateNode.containerInfo===U.containerInfo&&O.stateNode.implementation===U.implementation){a(D,O.sibling),$=f(O,U.children||[]),$.return=D,D=$;break t}else{a(D,O);break}else s(D,O);O=O.sibling}$=Lu(U,D.mode,$),$.return=D,D=$}return S(D);case W:return U=di(U),qt(D,O,U,$)}if(dt(U))return rt(D,O,U,$);if(nt(U)){if(ct=nt(U),typeof ct!=`function`)throw Error(r(150));return U=ct.call(U),ht(D,O,U,$)}if(typeof U.then==`function`)return qt(D,O,Pl(U),$);if(U.$$typeof===R)return qt(D,O,Xl(D,U),$);to(D,U)}return typeof U==`string`&&U!==``||typeof U==`number`||typeof U==`bigint`?(U=``+U,O!==null&&O.tag===6?(a(D,O.sibling),$=f(O,U),$.return=D,D=$):(a(D,O),$=Bu(U,D.mode,$),$.return=D,D=$),S(D)):a(D,O)}return function(D,O,U,$){try{ga=0;var ct=qt(D,O,U,$);return er=null,ct}catch(lt){if(lt===tr||lt===Zl)throw lt;var kt=Xe(29,lt,null,D.mode);return kt.lanes=$,kt.return=D,kt}}}var gi=Wg(!0),Pg=Wg(!1),Rs=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ds(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ms(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(zt&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=Gl(e),Ng(e,null,a),s}return $l(e,c,s,a),Gl(e)}function ma(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,$p(e,a)}}function Wu(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:c.shared,callbacks:c.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var Pu=!1;function Sa(){if(Pu){var e=Pi;if(e!==null)throw e}}function va(e,s,a,c){Pu=!1;var f=e.updateQueue;Rs=!1;var h=f.firstBaseUpdate,S=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var x=C,z=x.next;x.next=null,S===null?h=z:S.next=z,S=x;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==S&&(C===null?K.firstBaseUpdate=z:C.next=z,K.lastBaseUpdate=x))}if(h!==null){var G=f.baseState;S=0,K=z=x=null,C=h;do{var j=C.lane&-536870913,B=j!==C.lane;if(B?(_t&j)===j:(c&j)===j){j!==0&&j===Wi&&(Pu=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});t:{var rt=e,ht=C;j=s;var qt=a;switch(ht.tag){case 1:if(rt=ht.payload,typeof rt==`function`){G=rt.call(qt,G,j);break t}G=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ht.payload,j=typeof rt==`function`?rt.call(qt,G,j):rt,j==null)break t;G=y({},G,j);break t;case 2:Rs=!0}}j=C.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=f.callbacks,B===null?f.callbacks=[j]:B.push(j))}else B={lane:j,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(z=K=B,x=G):K=K.next=B,S|=j;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;B=C,C=B.next,B.next=null,f.lastBaseUpdate=B,f.shared.pending=null}}while(!0);K===null&&(x=G),f.baseState=x,f.firstBaseUpdate=z,f.lastBaseUpdate=K,h===null&&(f.shared.lanes=0),Ns|=S,e.lanes=S,e.memoizedState=G}}function ty(e,s){if(typeof e!=`function`)throw Error(r(191,e));e.call(s)}function ey(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eh?h:8;var S=k.T,C={};k.T=C,vf(e,!1,s,a);try{var x=f(),z=k.S;if(z!==null&&z(C,x),x!==null&&typeof x==`object`&&typeof x.then==`function`){var K=t1(x,c);Ea(e,s,K,tn(e))}else Ea(e,s,c,tn(e))}catch(G){Ea(e,s,{then:function(){},status:`rejected`,reason:G},tn())}finally{q.p=h,S!==null&&C.types!==null&&(S.types=C.types),k.T=S}}function a1(){}function mf(e,s,a,c){if(e.tag!==5)throw Error(r(476));var f=Uy(e).queue;ky(e,f,s,Z,a===null?a1:function(){return zy(e),a(c)})}function Uy(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:Z},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&&(e.memoizedState=s),s}function zy(e){var s=Uy(e);s.next===null&&(s=e.alternate.memoizedState),Ea(e,s.next.queue,{},tn())}function Sf(){return Ce(Ia)}function jy(){return ee().memoizedState}function Ny(){return ee().memoizedState}function l1(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=tn();e=Ds(a);var c=Ms(s,e,a);c!==null&&(Ke(c,s,a),ma(c,s,a)),s={cache:Yu()},e.payload=s;return}s=s.return}}function o1(e,s,a){var c=tn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},uo(e)?Ly(s,a):(a=ju(e,s,a,c),a!==null&&(Ke(a,e,c),Iy(a,s,c)))}function By(e,s,a){var c=tn();Ea(e,s,a,c)}function Ea(e,s,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(uo(e))Ly(s,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var S=s.lastRenderedState,C=h(S,a);if(f.hasEagerState=!0,f.eagerState=C,Qe(C,S))return $l(e,s,f,0),Kt===null&&Vl(),!1}catch{}if(a=ju(e,s,f,c),a!==null)return Ke(a,e,c),Iy(a,s,c),!0}return!1}function vf(e,s,a,c){if(c={lane:2,revertLane:Zf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},uo(e)){if(s)throw Error(r(479))}else s=ju(e,a,c,2),s!==null&&Ke(s,e,2)}function uo(e){var s=e.alternate;return e===yt||s!==null&&s===yt}function Ly(e,s){sr=so=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function Iy(e,s,a){if((a&4194048)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,$p(e,a)}}var Ca={readContext:Ce,use:ao,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Ca.useEffectEvent=Jt;var Hy={readContext:Ce,use:ao,useCallback:function(e,s){return De().memoizedState=[e,s===void 0?null:s],e},useContext:Ce,useEffect:Cy,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,oo(4194308,4,Ay.bind(null,s,e),a)},useLayoutEffect:function(e,s){return oo(4194308,4,e,s)},useInsertionEffect:function(e,s){oo(4,2,e,s)},useMemo:function(e,s){var a=De();s=s===void 0?null:s;var c=e();if(yi){Es(!0);try{e()}finally{Es(!1)}}return a.memoizedState=[c,s],c},useReducer:function(e,s,a){var c=De();if(a!==void 0){var f=a(s);if(yi){Es(!0);try{a(s)}finally{Es(!1)}}}else f=s;return c.memoizedState=c.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},c.queue=e,e=e.dispatch=o1.bind(null,yt,e),[c.memoizedState,e]},useRef:function(e){var s=De();return e={current:e},s.memoizedState=e},useState:function(e){e=hf(e);var s=e.queue,a=By.bind(null,yt,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:gf,useDeferredValue:function(e,s){var a=De();return yf(a,e,s)},useTransition:function(){var e=hf(!1);return e=ky.bind(null,yt,e.queue,!0,!1),De().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var c=yt,f=De();if(Ot){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),Kt===null)throw Error(r(349));(_t&127)!==0||ly(c,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,Cy(cy.bind(null,c,h,e),[e]),c.flags|=2048,rr(9,{destroy:void 0},oy.bind(null,c,h,a,s),null),a},useId:function(){var e=De(),s=Kt.identifierPrefix;if(Ot){var a=Un,c=kn;a=(c&~(1<<32-Fe(c)-1)).toString(32)+a,s=`_`+s+`R_`+a,a=io++,0<\/script>`,h=h.removeChild(h.firstChild);break;case`select`:h=typeof c.is==`string`?S.createElement(`select`,{is:c.is}):S.createElement(`select`),c.multiple?h.multiple=!0:c.size&&(h.size=c.size);break;default:h=typeof c.is==`string`?S.createElement(f,{is:c.is}):S.createElement(f)}}h[be]=s,h[Ne]=c;t:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break t;for(;S.sibling===null;){if(S.return===null||S.return===s)break t;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=h;t:switch(_e(h,f,c),f){case`button`:case`input`:case`select`:case`textarea`:c=!!c.autoFocus;break t;case`img`:c=!0;break t;default:c=!1}c&&is(s)}}return Yt(s),Uf(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&&s.stateNode!=null)e.memoizedProps!==c&&is(s);else{if(typeof c!=`string`&&s.stateNode===null)throw Error(r(166));if(e=it.current,Ji(s)){if(e=s.stateNode,a=s.memoizedProps,c=null,f=Ee,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}e[be]=s,e=!!(e.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||r0(e.nodeValue,a)),e||As(s,!0)}else e=Mo(e).createTextNode(c),e[be]=s,s.stateNode=e}return Yt(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(c=Ji(s),a!==null){if(e===null){if(!c)throw Error(r(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[be]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),e=!1}else a=Ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&256?(Ze(s),s):(Ze(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ji(s),c!==null&&c.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[be]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),f=!1}else f=Ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(Ze(s),s):(Ze(s),null)}return Ze(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,e=e!==null&&e.memoizedState!==null,a&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),h=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(h=c.memoizedState.cachePool.pool),h!==f&&(c.flags|=2048)),a!==e&&a&&(s.child.flags|=8192),yo(s,s.updateQueue),Yt(s),null);case 4:return bt(),e===null&&eh(s.stateNode.containerInfo),Yt(s),null;case 10:return ts(s.type),Yt(s),null;case 19:if(L(te),c=s.memoizedState,c===null)return Yt(s),null;if(f=(s.flags&128)!==0,h=c.rendering,h===null)if(f)_a(c,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(h=no(e),h!==null){for(s.flags|=128,_a(c,!1),e=h.updateQueue,s.updateQueue=e,yo(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)Bg(a,e),a=a.sibling;return Y(te,te.current&1|2),Ot&&Wn(s,c.treeForkCount),s.child}e=e.sibling}c.tail!==null&&Ft()>bo&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304)}else{if(!f)if(e=no(h),e!==null){if(s.flags|=128,f=!0,e=e.updateQueue,s.updateQueue=e,yo(s,e),_a(c,!0),c.tail===null&&c.tailMode===`hidden`&&!h.alternate&&!Ot)return Yt(s),null}else 2*Ft()-c.renderingStartTime>bo&&a!==536870912&&(s.flags|=128,f=!0,_a(c,!1),s.lanes=4194304);c.isBackwards?(h.sibling=s.child,s.child=h):(e=c.last,e!==null?e.sibling=h:s.child=h,c.last=h)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Ft(),e.sibling=null,a=te.current,Y(te,f?a&1|2:a&1),Ot&&Wn(s,c.treeForkCount),e):(Yt(s),null);case 22:case 23:return Ze(s),ef(),c=s.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),a=s.updateQueue,a!==null&&yo(s,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),e!==null&&L(hi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),ts(ie),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function d1(e,s){switch(Hu(s),s.tag){case 1:return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return ts(ie),bt(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 26:case 27:case 5:return Ge(s),null;case 31:if(s.memoizedState!==null){if(Ze(s),s.alternate===null)throw Error(r(340));ci()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 13:if(Ze(s),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ci()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return L(te),null;case 4:return bt(),null;case 10:return ts(s.type),null;case 22:case 23:return Ze(s),ef(),e!==null&&L(hi),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 24:return ts(ie),null;case 25:return null;default:return null}}function um(e,s){switch(Hu(s),s.tag){case 3:ts(ie),bt();break;case 26:case 27:case 5:Ge(s);break;case 4:bt();break;case 31:s.memoizedState!==null&&Ze(s);break;case 13:Ze(s);break;case 19:L(te);break;case 10:ts(s.type);break;case 22:case 23:Ze(s),ef(),e!==null&&L(hi);break;case 24:ts(ie)}}function Ta(e,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&e)===e){c=void 0;var h=a.create,S=a.inst;c=h(),S.destroy=c}a=a.next}while(a!==f)}}catch(C){Bt(s,s.return,C)}}function zs(e,s,a){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var h=f.next;c=h;do{if((c.tag&e)===e){var S=c.inst,C=S.destroy;if(C!==void 0){S.destroy=void 0,f=s;var x=a,z=C;try{z()}catch(K){Bt(f,x,K)}}}c=c.next}while(c!==h)}}catch(K){Bt(s,s.return,K)}}function fm(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{ey(s,a)}catch(c){Bt(e,e.return,c)}}}function hm(e,s,a){a.props=mi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(c){Bt(e,s,c)}}function Aa(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof a==`function`?e.refCleanup=a(c):a.current=c}}catch(f){Bt(e,s,f)}}function zn(e,s){var a=e.ref,c=e.refCleanup;if(a!==null)if(typeof c==`function`)try{c()}catch(f){Bt(e,s,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a==`function`)try{a(null)}catch(f){Bt(e,s,f)}else a.current=null}function dm(e){var s=e.type,a=e.memoizedProps,c=e.stateNode;try{t:switch(s){case`button`:case`input`:case`select`:case`textarea`:a.autoFocus&&c.focus();break t;case`img`:a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Bt(e,e.return,f)}}function zf(e,s,a){try{var c=e.stateNode;j1(c,e.type,a,s),c[Ne]=s}catch(f){Bt(e,e.return,f)}}function pm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qs(e.type)||e.tag===4}function jf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||pm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qs(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nf(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===`HTML`?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Xn));else if(c!==4&&(c===27&&qs(e.type)&&(a=e.stateNode,s=null),e=e.child,e!==null))for(Nf(e,s,a),e=e.sibling;e!==null;)Nf(e,s,a),e=e.sibling}function mo(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(c===27&&qs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,s,a),e=e.sibling;e!==null;)mo(e,s,a),e=e.sibling}function gm(e){var s=e.stateNode,a=e.memoizedProps;try{for(var c=e.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);_e(s,c,a),s[be]=e,s[Ne]=a}catch(h){Bt(e,e.return,h)}}var rs=!1,le=!1,Bf=!1,ym=typeof WeakSet==`function`?WeakSet:Set,ge=null;function p1(e,s){if(e=e.containerInfo,ih=Lo,e=Og(e),Ru(e)){if(`selectionStart`in e)var a={start:e.selectionStart,end:e.selectionEnd};else t:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break t}var S=0,C=-1,x=-1,z=0,K=0,G=e,j=null;e:for(;;){for(var B;G!==a||f!==0&&G.nodeType!==3||(C=S+f),G!==h||c!==0&&G.nodeType!==3||(x=S+c),G.nodeType===3&&(S+=G.nodeValue.length),(B=G.firstChild)!==null;)j=G,G=B;for(;;){if(G===e)break e;if(j===a&&++z===f&&(C=S),j===h&&++K===c&&(x=S),(B=G.nextSibling)!==null)break;G=j,j=G.parentNode}G=B}a=C===-1||x===-1?null:{start:C,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(rh={focusedElem:e,selectionRange:a},Lo=!1,ge=s;ge!==null;)if(s=ge,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,ge=e;else for(;ge!==null;){switch(s=ge,h=s.alternate,e=s.flags,s.tag){case 0:if((e&4)!==0&&(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title`))),_e(h,c,a),h[be]=e,pe(h),c=h;break t;case`link`:var S=E0(`link`,`href`,f).get(c+(a.href||``));if(S){for(var C=0;Cqt&&(S=qt,qt=ht,ht=S);var D=Tg(C,ht),O=Tg(C,qt);if(D&&O&&(B.rangeCount!==1||B.anchorNode!==D.node||B.anchorOffset!==D.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var U=G.createRange();U.setStart(D.node,D.offset),B.removeAllRanges(),ht>qt?(B.addRange(U),B.extend(O.node,O.offset)):(U.setEnd(O.node,O.offset),B.addRange(U))}}}}for(G=[],B=C;B=B.parentNode;)B.nodeType===1&&G.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof C.focus==`function`&&C.focus(),C=0;Ca?32:a,k.T=null,a=$f,$f=null;var h=Ls,S=us;if(ue=0,ur=Ls=null,us=0,(zt&6)!==0)throw Error(r(331));var C=zt;if(zt|=4,Am(h.current),xm(h,h.current,S,a),zt=C,Ua(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Zr,h)}catch{}return!0}finally{q.p=f,k.T=c,Gm(e,s)}}function Fm(e,s,a){s=on(a,s),s=Cf(e.stateNode,s,2),e=Ms(e,s,2),e!==null&&(Pr(e,2),jn(e))}function Bt(e,s,a){if(e.tag===3)Fm(e,e,a);else for(;s!==null;){if(s.tag===3){Fm(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError==`function`||typeof c.componentDidCatch==`function`&&(Bs===null||!Bs.has(c))){e=on(a,e),a=Qy(2),c=Ms(s,a,2),c!==null&&(Xy(a,c,s,e),Pr(c,2),jn(c));break}}s=s.return}}function Qf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new m1;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(a)||(Hf=!0,f.add(a),e=E1.bind(null,e,s,a),s.then(e,e))}function E1(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Kt===e&&(_t&a)===a&&(Zt===4||Zt===3&&(_t&62914560)===_t&&300>Ft()-wo?(zt&2)===0&&fr(e,0):qf|=a,cr===_t&&(cr=0)),jn(e)}function Qm(e,s){s===0&&(s=Kp()),e=li(e,s),e!==null&&(Pr(e,s),jn(e))}function C1(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Qm(e,a)}function x1(e,s){var a=0;switch(e.tag){case 31:case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Qm(e,a)}function _1(e,s){return ft(e,s)}var Ao=null,dr=null,Xf=!1,Oo=!1,Jf=!1,Hs=0;function jn(e){e!==dr&&e.next===null&&(dr===null?Ao=dr=e:dr=dr.next=e),Oo=!0,Xf||(Xf=!0,A1())}function Ua(e,s){if(!Jf&&Oo){Jf=!0;do for(var a=!1,c=Ao;c!==null;){if(e!==0){var f=c.pendingLanes;if(f===0)var h=0;else{var S=c.suspendedLanes,C=c.pingedLanes;h=(1<<31-Fe(42|e)+1)-1,h&=f&~(S&~C),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Wm(c,h))}else h=_t,h=Ml(c,c===Kt?h:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(h&3)===0||Wr(c,h)||(a=!0,Wm(c,h));c=c.next}while(a);Jf=!1}}function T1(){Xm()}function Xm(){Oo=Xf=!1;var e=0;Hs!==0&&B1()&&(e=Hs);for(var s=Ft(),a=null,c=Ao;c!==null;){var f=c.next,h=Jm(c,s);h===0?(c.next=null,a===null?Ao=f:a.next=f,f===null&&(dr=a)):(a=c,(e!==0||(h&3)!==0)&&(Oo=!0)),c=f}ue!==0&&ue!==5||Ua(e),Hs!==0&&(Hs=0)}function Jm(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0C)break;var K=x.transferSize,G=x.initiatorType;K&&a0(G)&&(x=x.responseEnd,S+=K*(x`u`?null:document;function S0(e,s,a){var c=pr;if(c&&typeof s==`string`&&s){var f=an(s);f=`link[rel="`+e+`"][href="`+f+`"]`,typeof a==`string`&&(f+=`[crossorigin="`+a+`"]`),m0.has(f)||(m0.add(f),e={rel:e,crossOrigin:a,href:s},c.querySelector(f)===null&&(s=c.createElement(`link`),_e(s,`link`,e),pe(s),c.head.appendChild(s)))}}function Y1(e){fs.D(e),S0(`dns-prefetch`,e,null)}function F1(e,s){fs.C(e,s),S0(`preconnect`,e,s)}function Q1(e,s,a){fs.L(e,s,a);var c=pr;if(c&&e&&s){var f=`link[rel="preload"][as="`+an(s)+`"]`;s===`image`&&a&&a.imageSrcSet?(f+=`[imagesrcset="`+an(a.imageSrcSet)+`"]`,typeof a.imageSizes==`string`&&(f+=`[imagesizes="`+an(a.imageSizes)+`"]`)):f+=`[href="`+an(e)+`"]`;var h=f;switch(s){case`style`:h=gr(e);break;case`script`:h=yr(e)}pn.has(h)||(e=y({rel:`preload`,href:s===`image`&&a&&a.imageSrcSet?void 0:e,as:s},a),pn.set(h,e),c.querySelector(f)!==null||s===`style`&&c.querySelector(Ba(h))||s===`script`&&c.querySelector(La(h))||(s=c.createElement(`link`),_e(s,`link`,e),pe(s),c.head.appendChild(s)))}}function X1(e,s){fs.m(e,s);var a=pr;if(a&&e){var c=s&&typeof s.as==`string`?s.as:`script`,f=`link[rel="modulepreload"][as="`+an(c)+`"][href="`+an(e)+`"]`,h=f;switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:h=yr(e)}if(!pn.has(h)&&(e=y({rel:`modulepreload`,href:e},s),pn.set(h,e),a.querySelector(f)===null)){switch(c){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(a.querySelector(La(h)))return}c=a.createElement(`link`),_e(c,`link`,e),pe(c),a.head.appendChild(c)}}}function J1(e,s,a){fs.S(e,s,a);var c=pr;if(c&&e){var f=Bi(c).hoistableStyles,h=gr(e);s=s||`default`;var S=f.get(h);if(!S){var C={loading:0,preload:null};if(S=c.querySelector(Ba(h)))C.loading=5;else{e=y({rel:`stylesheet`,href:e,"data-precedence":s},a),(a=pn.get(h))&&hh(e,a);var x=S=c.createElement(`link`);pe(x),_e(x,`link`,e),x._p=new Promise(function(z,K){x.onload=z,x.onerror=K}),x.addEventListener(`load`,function(){C.loading|=1}),x.addEventListener(`error`,function(){C.loading|=2}),C.loading|=4,Uo(S,s,c)}S={type:`stylesheet`,instance:S,count:1,state:C},f.set(h,S)}}}function Z1(e,s){fs.X(e,s);var a=pr;if(a&&e){var c=Bi(a).hoistableScripts,f=yr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0},s),(s=pn.get(f))&&dh(e,s),h=a.createElement(`script`),pe(h),_e(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function W1(e,s){fs.M(e,s);var a=pr;if(a&&e){var c=Bi(a).hoistableScripts,f=yr(e),h=c.get(f);h||(h=a.querySelector(La(f)),h||(e=y({src:e,async:!0,type:`module`},s),(s=pn.get(f))&&dh(e,s),h=a.createElement(`script`),pe(h),_e(h,`link`,e),a.head.appendChild(h)),h={type:`script`,instance:h,count:1,state:null},c.set(f,h))}}function v0(e,s,a,c){var f=(f=it.current)?ko(f):null;if(!f)throw Error(r(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof a.precedence==`string`&&typeof a.href==`string`?(s=gr(a.href),a=Bi(f).hoistableStyles,c=a.get(s),c||(c={type:`style`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};case`link`:if(a.rel===`stylesheet`&&typeof a.href==`string`&&typeof a.precedence==`string`){e=gr(a.href);var h=Bi(f).hoistableStyles,S=h.get(e);if(S||(f=f.ownerDocument||f,S={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},h.set(e,S),(h=f.querySelector(Ba(e)))&&!h._p&&(S.instance=h,S.state.loading=5),pn.has(e)||(a={rel:`preload`,as:`style`,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},pn.set(e,a),h||P1(f,e,a,S.state))),s&&c===null)throw Error(r(528,``));return S}if(s&&c!==null)throw Error(r(529,``));return null;case`script`:return s=a.async,a=a.src,typeof a==`string`&&s&&typeof s!=`function`&&typeof s!=`symbol`?(s=yr(a),a=Bi(f).hoistableScripts,c=a.get(s),c||(c={type:`script`,instance:null,count:0,state:null},a.set(s,c)),c):{type:`void`,instance:null,count:0,state:null};default:throw Error(r(444,e))}}function gr(e){return`href="`+an(e)+`"`}function Ba(e){return`link[rel="stylesheet"][`+e+`]`}function w0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function P1(e,s,a,c){e.querySelector(`link[rel="preload"][as="style"][`+s+`]`)?c.loading=1:(s=e.createElement(`link`),c.preload=s,s.addEventListener(`load`,function(){return c.loading|=1}),s.addEventListener(`error`,function(){return c.loading|=2}),_e(s,`link`,a),pe(s),e.head.appendChild(s))}function yr(e){return`[src="`+an(e)+`"]`}function La(e){return`script[async]`+e}function b0(e,s,a){if(s.count++,s.instance===null)switch(s.type){case`style`:var c=e.querySelector(`style[data-href~="`+an(a.href)+`"]`);if(c)return s.instance=c,pe(c),c;var f=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement(`style`),pe(c),_e(c,`style`,f),Uo(c,a.precedence,e),s.instance=c;case`stylesheet`:f=gr(a.href);var h=e.querySelector(Ba(f));if(h)return s.state.loading|=4,s.instance=h,pe(h),h;c=w0(a),(f=pn.get(f))&&hh(c,f),h=(e.ownerDocument||e).createElement(`link`),pe(h);var S=h;return S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),_e(h,`link`,c),s.state.loading|=4,Uo(h,a.precedence,e),s.instance=h;case`script`:return h=yr(a.src),(f=e.querySelector(La(h)))?(s.instance=f,pe(f),f):(c=a,(f=pn.get(h))&&(c=y({},a),dh(c,f)),e=e.ownerDocument||e,f=e.createElement(`script`),pe(f),_e(f,`link`,c),e.head.appendChild(f),s.instance=f);case`void`:return null;default:throw Error(r(443,s.type))}else s.type===`stylesheet`&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,Uo(c,a.precedence,e));return s.instance}function Uo(e,s,a){for(var c=a.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),f=c.length?c[c.length-1]:null,h=f,S=0;S title`):null)}function tC(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof s.precedence!=`string`||typeof s.href!=`string`||s.href===``)break;return!0;case`link`:if(typeof s.rel!=`string`||typeof s.href!=`string`||s.href===``||s.onLoad||s.onError)break;switch(s.rel){case`stylesheet`:return e=s.disabled,typeof s.precedence==`string`&&e==null;default:return!0}case`script`:if(s.async&&typeof s.async!=`function`&&typeof s.async!=`symbol`&&!s.onLoad&&!s.onError&&s.src&&typeof s.src==`string`)return!0}return!1}function x0(e){return!(e.type===`stylesheet`&&(e.state.loading&3)===0)}function eC(e,s,a,c){if(a.type===`stylesheet`&&(typeof c.media!=`string`||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=gr(c.href),h=s.querySelector(Ba(f));if(h){s=h._p,s!==null&&typeof s==`object`&&typeof s.then==`function`&&(e.count++,e=jo.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=h,pe(h);return}h=s.ownerDocument||s,c=w0(c),(f=pn.get(f))&&hh(c,f),h=h.createElement(`link`),pe(h);var S=h;S._p=new Promise(function(C,x){S.onload=C,S.onerror=x}),_e(h,`link`,c),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=jo.bind(e),s.addEventListener(`load`,a),s.addEventListener(`error`,a))}}var ph=0;function nC(e,s){return e.stylesheets&&e.count===0&&Bo(e,e.stylesheets),0ph?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function Bo(e,s){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,s.forEach(sC,e),No=null,jo.call(e))}function sC(e,s){if(!(s.state.loading&4)){var a=No.get(e);if(a)var c=a.get(null);else{a=new Map,No.set(e,a);for(var f=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),h=0;h`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Eh.exports=wC(),Eh.exports}var EC=bC(),J=Fd();const CC={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_DS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLWlycmVsZXZhbnQtYWFyZHdvbGYtb3B0dDA3c2lpdyIsImlhdCI6MTc3NDk3NjY0NH0.F67aNfIfZTYJHWg1hI8aFjlXlWqRRv1R9XdnRpRPCLg`,VITE_DS_URL:`https://api.electric-sql.cloud/v1/stream/svc-irrelevant-aardwolf-optt07siiw`,VITE_YJS_TOKEN:`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlX2lkIjoic3ZjLXlqcy1kZWFmLXRvdWNhbi1vNnZzbjA4ZTV0IiwiaWF0IjoxNzc0OTc2NjU4fQ.hP1i-w7N4NIYQUXGSMJDh8kL6JJaTTmh84Ha2e7qVbk`,VITE_YJS_URL:`https://api.electric-sql.cloud/v1/yjs/svc-yjs-deaf-toucan-o6vsn08e5t`},Uv=J.createContext(null);function Qd(){const n=J.useContext(Uv);if(!n)throw new Error(`useServerEndpoint must be used within ServerEndpointProvider`);return n}function Go(n){const t=CC[n];if(!t)throw new Error(`Missing environment variable: ${n}`);return t}function xC({children:n}){const t=Go(`VITE_YJS_URL`),i=Go(`VITE_DS_URL`),r=J.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_YJS_TOKEN`)}`}),[]),l=J.useMemo(()=>({Authorization:`Bearer ${Go(`VITE_DS_TOKEN`)}`}),[]),o=J.useMemo(()=>({yjsEndpoint:t,dsEndpoint:i,yjsHeaders:r,dsHeaders:l}),[t,i,r,l]);return F.jsx(Uv.Provider,{value:o,children:n})}var Yo={exports:{}},Ah,Q0;function _C(){if(Q0)return Ah;Q0=1;function n(t){var i=new t,r=i;function l(){var u=i;return u.next?i=u.next:(i=new t,r=i),u.next=null,u}function o(u){r.next=u,r=u}return{get:l,release:o}}return Ah=n,Ah}var X0;function TC(){if(X0)return Yo.exports;X0=1;var n=_C();function t(o,u,d){if(typeof o==`function`&&(d=u,u=o,o=null),!(d>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);var p=n(r),g=null,m=null,y=0,v=null,b={push:A,drain:i,saturated:i,pause:E,paused:!1,get concurrency(){return d},set concurrency(X){if(!(X>=1))throw new Error(`fastqueue concurrency must be equal to or greater than 1`);if(d=X,!b.paused)for(;g&&y=d||b.paused?m?(m.next=nt,m=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function V(X,at){var nt=p.get();nt.context=o,nt.release=I,nt.value=X,nt.callback=at||i,nt.errorHandler=v,y>=d||b.paused?g?(nt.next=g,g=nt):(g=nt,m=nt,b.saturated()):(y++,u.call(o,nt.value,nt.worked))}function I(X){X&&p.release(X);var at=g;at&&y<=d?b.paused?y--:(m===g&&(m=null),g=at.next,at.next=null,u.call(o,at.value,at.worked),m===null&&b.empty()):--y===0&&b.drain()}function H(){g=null,m=null,b.drain=i}function W(){g=null,m=null,b.drain(),b.drain=i}function tt(X){v=X}}function i(){}function r(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var o=this;this.worked=function(d,p){var g=o.callback,m=o.errorHandler,y=o.value;o.value=null,o.callback=i,o.errorHandler&&m(d,y),g.call(o.context,d,p),o.release(o)}}function l(o,u,d){typeof o==`function`&&(d=u,u=o,o=null);function p(E,T){u.call(this,E).then(function(N){T(null,N)},T)}var g=t(o,p,d),m=g.push,y=g.unshift;return g.push=v,g.unshift=b,g.drained=w,g;function v(E){var T=new Promise(function(N,M){m(E,function(R,A){if(R){M(R);return}N(A)})});return T.catch(i),T}function b(E){var T=new Promise(function(N,M){y(E,function(R,A){if(R){M(R);return}N(A)})});return T.catch(i),T}function w(){var E=new Promise(function(T){process.nextTick(function(){if(g.idle())T();else{var N=g.drain;g.drain=function(){typeof N==`function`&&N(),T(),g.drain=N}}})});return E}}return Yo.exports=t,Yo.exports.promise=l,Yo.exports}var AC=TC();const zv=hC(AC),_n=`Stream-Next-Offset`,qc=`Stream-Cursor`,Kc=`Stream-Up-To-Date`,In=`Stream-Closed`,Oh=`Stream-Seq`,OC=`Stream-TTL`,RC=`Stream-Expires-At`,J0=`Producer-Id`,Fo=`Producer-Epoch`,Z0=`Producer-Seq`,DC=`Producer-Expected-Seq`,MC=`Producer-Received-Seq`,Rh=`offset`,Qo=`live`,kC=`stream-sse-data-encoding`;var Zs=class jv extends Error{status;text;json;headers;constructor(t,i,r,l,o,u){super(u||`HTTP Error ${t} at ${o}: ${i??JSON.stringify(r)}`),this.url=o,this.name=`FetchError`,this.status=t,this.text=i,this.json=r,this.headers=l}static async fromResponse(t,i){const r=t.status,l=Object.fromEntries([...t.headers.entries()]);let o,u;const d=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(d&&d.includes(`application/json`))try{u=await t.json()}catch{o=await t.text()}else o=await t.text();return new jv(r,o,u,l,i)}},Xd=class extends Error{constructor(){super(`Fetch with backoff aborted`),this.name=`FetchBackoffAbortError`}},Pt=class fd extends Error{status;code;details;constructor(t,i,r,l){super(t),this.name=`DurableStreamError`,this.code=i,this.status=r,this.details=l}static async fromResponse(t,i){const r=t.status;let l;const o=t.headers.get(`content-type`);if(!t.bodyUsed&&t.body!==null)if(o&&o.includes(`application/json`))try{l=await t.json()}catch{l=await t.text()}else l=await t.text();const u=W0(r),d=`Durable stream error at ${i}: ${t.statusText||r}`;return new fd(d,u,r,l)}static fromFetchError(t){const i=W0(t.status);return new fd(t.message,i,t.status,t.json??t.text)}};function W0(n){switch(n){case 400:return`BAD_REQUEST`;case 401:return`UNAUTHORIZED`;case 403:return`FORBIDDEN`;case 404:return`NOT_FOUND`;case 409:return`CONFLICT_SEQ`;case 429:return`RATE_LIMITED`;case 503:return`BUSY`;default:return`UNKNOWN`}}var UC=class extends Error{constructor(){super(`Invalid stream options: missing required url parameter`),this.name=`MissingStreamUrlError`}},Nv=class extends Pt{code=`STREAM_CLOSED`;status=409;streamClosed=!0;finalOffset;constructor(n,t){super(`Cannot append to closed stream`,`STREAM_CLOSED`,409,n),this.name=`StreamClosedError`,this.finalOffset=t}},zC=class extends Error{constructor(){super(`Invalid signal option. It must be an instance of AbortSignal.`),this.name=`InvalidSignalError`}};const jC=[429,503],Jd={initialDelay:100,maxDelay:6e4,multiplier:1.3,maxRetries:1/0};function NC(n){if(!n)return 0;const t=Number(n);if(Number.isFinite(t)&&t>0)return t*1e3;const i=Date.parse(n);if(!isNaN(i)){const r=i-Date.now();return Math.max(0,Math.min(r,36e5))}return 0}function Bv(n,t=Jd){const{initialDelay:i,maxDelay:r,multiplier:l,debug:o=!1,onFailedAttempt:u,maxRetries:d=1/0}=t;return async(...p)=>{const g=p[0],m=p[1];let y=i,v=0;for(;;)try{const b=await n(...p);if(b.ok)return b;throw await Zs.fromResponse(b,g.toString())}catch(b){if(u?.(),m?.signal?.aborted)throw new Xd;if(b instanceof Zs&&!jC.includes(b.status)&&b.status>=400&&b.status<500)throw b;{if(v++,v>d)throw o&&console.log(`Max retries reached (${v}/${d}), giving up`),b;const w=b instanceof Zs?NC(b.headers[`retry-after`]):0,E=Math.random()*y,T=Math.min(E,r),N=Math.max(w,T);if(o){const M=w>0?`server+client`:`client`;console.log(`Retry attempt #${v} after ${N}ms (${M}, serverMin=${w}ms, clientBackoff=${T}ms)`)}await new Promise(M=>setTimeout(M,N)),y=Math.min(y*l,r)}}}}const BC=[201,204,205];function LC(n){return async(...t)=>{const i=t[0],r=await n(...t);try{if(r.status<200||BC.includes(r.status))return r;const l=await r.arrayBuffer();return new Response(l,{status:r.status,statusText:r.statusText,headers:r.headers})}catch(l){throw t[1]?.signal?.aborted?new Xd:new Zs(r.status,void 0,void 0,Object.fromEntries([...r.headers.entries()]),i.toString(),l instanceof Error?l.message:typeof l==`string`?l:`failed to read body`)}}}function IC(n){return typeof Symbol<`u`&&typeof Symbol.asyncIterator==`symbol`&&typeof n[Symbol.asyncIterator]==`function`}function HC(n){if(typeof Symbol>`u`||typeof Symbol.asyncIterator!=`symbol`||typeof n[Symbol.asyncIterator]==`function`)return;const t=function(){const i=this.getReader();let r=!1,l=0;return{async next(){if(r)return{done:!0,value:void 0};l++;try{const{value:u,done:d}=await i.read();return d?(r=!0,i.releaseLock(),{done:!0,value:void 0}):{done:!1,value:u}}catch(u){r=!0;try{i.releaseLock()}catch{}throw u}finally{l--}},async return(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);return i.releaseLock(),await d,{done:!0,value:void 0}},async throw(u){if(l>0)throw new TypeError(`Cannot close a readable stream reader when it has pending read requests`);r=!0;const d=i.cancel(u);throw i.releaseLock(),await d,u},[Symbol.asyncIterator](){return this}}};try{Object.defineProperty(n,Symbol.asyncIterator,{configurable:!0,writable:!0,value:t})}catch{return}try{Object.defineProperty(n,`values`,{configurable:!0,writable:!0,value:t})}catch{}}function Dh(n){return IC(n)||HC(n),n}async function*P0(n,t){const i=n.getReader(),r=new TextDecoder;let l=``,o={data:[]};try{for(;!t?.aborted;){const{done:d,value:p}=await i.read();if(d)break;l+=r.decode(p,{stream:!0}),l=l.replace(/\r\n/g,` -`).replace(/\r/g,` -`);const g=l.split(` -`);l=g.pop()??``;for(const m of g)if(m===``){if(o.type&&o.data.length>0){const y=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:y};else if(o.type===`control`)try{const v=JSON.parse(y);yield{type:`control`,streamNextOffset:v.streamNextOffset,streamCursor:v.streamCursor,upToDate:v.upToDate,streamClosed:v.streamClosed}}catch(v){const b=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse SSE control event: ${v instanceof Error?v.message:String(v)}. Data: ${b}`,`PARSE_ERROR`)}}o={data:[]}}else if(m.startsWith(`event:`)){const y=m.slice(6);o.type=y.startsWith(` `)?y.slice(1):y}else if(m.startsWith(`data:`)){const y=m.slice(5);o.data.push(y.startsWith(` `)?y.slice(1):y)}}const u=r.decode();if(u&&(l+=u),l&&o.type&&o.data.length>0){const d=o.data.join(` -`);if(o.type===`data`)yield{type:`data`,data:d};else if(o.type===`control`)try{const p=JSON.parse(d);yield{type:`control`,streamNextOffset:p.streamNextOffset,streamCursor:p.streamCursor,upToDate:p.upToDate,streamClosed:p.streamClosed}}catch(p){const g=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse SSE control event: ${p instanceof Error?p.message:String(p)}. Data: ${g}`,`PARSE_ERROR`)}}}finally{i.releaseLock()}}var Zd=class{shouldContinueLive(n,t){return!(n&&this.upToDate||t===!1||this.streamClosed)}},Lv=class hd extends Zd{offset;cursor;upToDate;streamClosed;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed}shouldUseSse(){return!1}withResponseMetadata(t){return new hd({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new hd({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i})}pause(){return new Wd(this)}},Mh=class br extends Zd{offset;cursor;upToDate;streamClosed;consecutiveShortConnections;connectionStartTime;constructor(t){super(),this.offset=t.offset,this.cursor=t.cursor,this.upToDate=t.upToDate,this.streamClosed=t.streamClosed,this.consecutiveShortConnections=t.consecutiveShortConnections??0,this.connectionStartTime=t.connectionStartTime}shouldUseSse(){return!0}withResponseMetadata(t){return new br({offset:t.offset??this.offset,cursor:t.cursor??this.cursor,upToDate:t.upToDate,streamClosed:this.streamClosed||t.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}withSSEControl(t){const i=this.streamClosed||(t.streamClosed??!1);return new br({offset:t.streamNextOffset,cursor:t.streamCursor||this.cursor,upToDate:t.streamClosed??!1?!0:t.upToDate??this.upToDate,streamClosed:i,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:this.connectionStartTime})}startConnection(t){return new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:this.consecutiveShortConnections,connectionStartTime:t})}handleConnectionEnd(t,i,r){if(this.connectionStartTime===void 0)return{action:`healthy`,state:this};const l=t-this.connectionStartTime;if(l=r.maxShortConnections?{action:`fallback`,state:new Lv({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed})}:{action:`reconnect`,state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:o,connectionStartTime:this.connectionStartTime}),backoffAttempt:o}}return l>=r.minConnectionDuration?{action:`healthy`,state:new br({offset:this.offset,cursor:this.cursor,upToDate:this.upToDate,streamClosed:this.streamClosed,consecutiveShortConnections:0,connectionStartTime:this.connectionStartTime})}:{action:`healthy`,state:this}}pause(){return new Wd(this)}},Wd=class dd extends Zd{#t;constructor(t){super(),this.#t=t}get offset(){return this.#t.offset}get cursor(){return this.#t.cursor}get upToDate(){return this.#t.upToDate}get streamClosed(){return this.#t.streamClosed}shouldUseSse(){return this.#t.shouldUseSse()}withResponseMetadata(t){const i=this.#t.withResponseMetadata(t);return new dd(i)}withSSEControl(t){const i=this.#t.withSSEControl(t);return new dd(i)}pause(){return this}resume(){return{state:this.#t,justResumed:!0}}};const tS=`PAUSE_STREAM`;var qC=class{url;contentType;live;startOffset;#t;#e;#n;#s;#a;#i;#c;#l;#p;#d;#h;#f;#g;#y=!1;#x=null;#o=`active`;#u;#b;#m;#S;#v;#E;#O;constructor(n){this.url=n.url,this.contentType=n.contentType,this.live=n.live,this.startOffset=n.startOffset;const t={offset:n.initialOffset,cursor:n.initialCursor,upToDate:n.initialUpToDate,streamClosed:n.initialStreamClosed};this.#i=n.startSSE?new Mh(t):new Lv(t),this.#t=n.firstResponse.headers,this.#e=n.firstResponse.status,this.#n=n.firstResponse.statusText,this.#s=n.firstResponse.ok,this.#a=!1,this.#c=n.isJsonMode,this.#l=n.abortController,this.#p=n.fetchNext,this.#d=n.startSSE,this.#v={minConnectionDuration:n.sseResilience?.minConnectionDuration??1e3,maxShortConnections:n.sseResilience?.maxShortConnections??3,backoffBaseDelay:n.sseResilience?.backoffBaseDelay??100,backoffMaxDelay:n.sseResilience?.backoffMaxDelay??5e3,logWarnings:n.sseResilience?.logWarnings??!0},this.#E=n.encoding,this.#g=new Promise((i,r)=>{this.#h=i,this.#f=r}),this.#O=this.#I(n.firstResponse),this.#l.signal.addEventListener(`abort`,()=>{this.#u?.abort(this.#l.signal.reason),this.#S?.(),this.#m=void 0,this.#S=void 0},{once:!0}),this.#R()}#R(){if(typeof document==`object`&&typeof document.hidden==`boolean`&&typeof document.addEventListener==`function`){const n=()=>{document.hidden?this.#D():this.#T()};document.addEventListener(`visibilitychange`,n),this.#b=()=>{typeof document==`object`&&document.removeEventListener(`visibilitychange`,n)},document.hidden&&this.#D()}}#D(){this.#o===`active`&&(this.#o=`pause-requested`,this.#i=this.#i.pause(),this.#m=new Promise(n=>{this.#S=n}),this.#u?.abort(tS))}#T(){if(this.#o===`paused`||this.#o===`pause-requested`){if(this.#l.signal.aborted)return;this.#i instanceof Wd&&(this.#i=this.#i.resume().state),this.#o=`active`,this.#S?.(),this.#m=void 0,this.#S=void 0}}get headers(){return this.#t}get status(){return this.#e}get statusText(){return this.#n}get ok(){return this.#s}get isLoading(){return this.#a}get offset(){return this.#i.offset}get cursor(){return this.#i.cursor}get upToDate(){return this.#i.upToDate}get streamClosed(){return this.#i.streamClosed}#A(){if(!this.#c)throw new Pt(`JSON methods are only valid for JSON-mode streams. Content-Type is "${this.contentType}" and json hint was not set.`,`BAD_REQUEST`)}#r(){this.#b?.(),this.#h()}#_(n){this.#b?.(),this.#f(n)}#w(n){if(this.#x!==null)throw new Pt(`Cannot call ${n}() - this StreamResponse is already being consumed via ${this.#x}()`,`ALREADY_CONSUMED`);this.#x=n}#M(){return this.#i.shouldContinueLive(this.#y,this.live)}#N(n){this.#i=this.#i.withResponseMetadata({offset:n.headers.get(_n)||void 0,cursor:n.headers.get(qc)||void 0,upToDate:n.headers.has(Kc),streamClosed:n.headers.get(In)?.toLowerCase()===`true`}),this.#t=n.headers,this.#e=n.status,this.#n=n.statusText,this.#s=n.ok}#U(n){this.#i=this.#i.withSSEControl(n)}#z(){this.#i instanceof Mh||(this.#i=new Mh({offset:this.#i.offset,cursor:this.#i.cursor,upToDate:this.#i.upToDate,streamClosed:this.#i.streamClosed})),this.#i=this.#i.startConnection(Date.now())}async#k(){if(!this.#i.shouldUseSse()||!this.#M()||!this.#d)return null;const n=this.#i.handleConnectionEnd(Date.now(),this.#l.signal.aborted,this.#v);if(this.#i=n.state,n.action===`fallback`)return this.#v.logWarnings&&console.warn(`[Durable Streams] SSE connections are closing immediately (possibly due to proxy buffering or misconfiguration). Falling back to long polling. Your proxy must support streaming SSE responses (not buffer the complete response). Configuration: Nginx add 'X-Accel-Buffering: no', Caddy add 'flush_interval -1' to reverse_proxy.`),null;if(n.action===`reconnect`){const i=Math.min(this.#v.backoffMaxDelay,this.#v.backoffBaseDelay*Math.pow(2,n.backoffAttempt)),r=Math.floor(Math.random()*i);await new Promise(l=>setTimeout(l,r))}this.#z(),this.#u=new AbortController;const t=await this.#d(this.offset,this.cursor,this.#u.signal);return t.body?P0(t.body,this.#u.signal):null}async#B(n){const{done:t,value:i}=await n.next();if(t){try{const r=await this.#k();if(r)return{type:`continue`,newIterator:r}}catch(r){return{type:`error`,error:r instanceof Error?r:new Error(`SSE reconnection failed`)}}return{type:`closed`}}return i.type===`data`?this.#L(i.data,n):(this.#U(i),i.upToDate?{type:`response`,response:VC(``,i.streamNextOffset,i.streamCursor,!0,i.streamClosed??!1,this.contentType,this.#E)}:{type:`continue`})}async#L(n,t){const i=[n];for(;;){const{done:r,value:l}=await t.next();if(r){const o=pd(i,this.offset,this.cursor,this.upToDate,this.streamClosed,this.contentType,this.#E,this.#c);try{const u=await this.#k();return{type:`response`,response:o,newIterator:u??void 0}}catch(u){return{type:`error`,error:u instanceof Error?u:new Error(`SSE reconnection failed`)}}}if(l.type===`control`)return this.#U(l),{type:`response`,response:pd(i,l.streamNextOffset,l.streamCursor,l.upToDate??!1,l.streamClosed??!1,this.contentType,this.#E,this.#c)};i.push(l.data)}}#I(n){let t=!1,i=null;return new ReadableStream({pull:async r=>{try{if(!t)if(t=!0,(n.headers.get(`content-type`)?.includes(`text/event-stream`)??!1)&&n.body)this.#z(),this.#u=new AbortController,i=P0(n.body,this.#u.signal);else{if(r.enqueue(n),this.upToDate&&!this.#M()){this.#r(),r.close();return}return}if(i){if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}const l=await this.#k();if(l)i=l;else{this.#r(),r.close();return}}for(;;){const l=await this.#B(i);switch(l.type){case`response`:l.newIterator&&(i=l.newIterator),r.enqueue(l.response);return;case`closed`:this.#r(),r.close();return;case`error`:this.#_(l.error),r.error(l.error);return;case`continue`:l.newIterator&&(i=l.newIterator);continue}}}if(this.#M()){let l=!1;if(this.#o===`pause-requested`||this.#o===`paused`){if(this.#o=`paused`,this.#m&&await this.#m,this.#l.signal.aborted){this.#r(),r.close();return}l=!0}if(this.#l.signal.aborted){this.#r(),r.close();return}this.#u=new AbortController;const o=await this.#p(this.offset,this.cursor,this.#u.signal,l);this.#N(o),r.enqueue(o);return}this.#r(),r.close()}catch(l){if(this.#u?.signal.aborted&&this.#u.signal.reason===tS){this.#o===`pause-requested`&&(this.#o=`paused`);return}this.#l.signal.aborted?(this.#r(),r.close()):(this.#_(l instanceof Error?l:new Error(String(l))),r.error(l))}},cancel:()=>{this.#l.abort(),this.#b?.(),this.#r()}})}#C(){return this.#O.getReader()}async body(){this.#w(`body`),this.#y=!0;const n=this.#C(),t=[];try{let r=await n.read();for(;!r.done;){const l=this.upToDate,o=await r.value.blob();if(o.size>0&&t.push(o),l)break;r=await n.read()}}finally{n.releaseLock()}if(this.#r(),t.length===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(await t[0].arrayBuffer());const i=new Blob(t);return new Uint8Array(await i.arrayBuffer())}async json(){this.#w(`json`),this.#A(),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,o=(await i.value.text()).trim()||`[]`;let u;try{u=JSON.parse(o)}catch(d){const p=o.length>100?o.slice(0,100)+`...`:o;throw new Pt(`Failed to parse JSON response: ${d instanceof Error?d.message:String(d)}. Data: ${p}`,`PARSE_ERROR`)}if(Array.isArray(u)?t.push(...u):t.push(u),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t}async text(){this.#w(`text`),this.#y=!0;const n=this.#C(),t=[];try{let i=await n.read();for(;!i.done;){const r=this.upToDate,l=await i.value.text();if(l&&t.push(l),r)break;i=await n.read()}}finally{n.releaseLock()}return this.#r(),t.join(``)}#j(){const{readable:n,writable:t}=new TransformStream,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done;){const o=this.upToDate,u=l.value.body;if(u&&await u.pipeTo(t,{preventClose:!0,preventAbort:!0,preventCancel:!0}),o&&!this.#M())break;l=await i.read()}await t.close(),this.#r()}catch(l){if(this.#l.signal.aborted){try{await t.close()}catch{}this.#r()}else{try{await t.abort(l)}catch{}this.#_(l instanceof Error?l:new Error(String(l)))}}finally{i.releaseLock()}})(),n}bodyStream(){return this.#w(`bodyStream`),Dh(this.#j())}jsonStream(){this.#w(`jsonStream`),this.#A();const n=this.#C();let t=[];const i=new ReadableStream({pull:async r=>{if(t.length>0){r.enqueue(t.shift());return}let l=await n.read();for(;!l.done;){const d=(await l.value.text()).trim()||`[]`;let p;try{p=JSON.parse(d)}catch(g){const m=d.length>100?d.slice(0,100)+`...`:d;throw new Pt(`Failed to parse JSON response: ${g instanceof Error?g.message:String(g)}. Data: ${m}`,`PARSE_ERROR`)}if(t=Array.isArray(p)?p:[p],t.length>0){r.enqueue(t.shift());return}l=await n.read()}this.#r(),r.close()},cancel:()=>{n.releaseLock(),this.cancel()}});return Dh(i)}textStream(){this.#w(`textStream`);const n=new TextDecoder,t=this.#j().pipeThrough(new TransformStream({transform(i,r){r.enqueue(n.decode(i,{stream:!0}))},flush(i){const r=n.decode();r&&i.enqueue(r)}}));return Dh(t)}subscribeJson(n){this.#w(`subscribeJson`),this.#A();const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),y=(await o.text()).trim()||`[]`;let v;try{v=JSON.parse(y)}catch(w){const E=y.length>100?y.slice(0,100)+`...`:y;throw new Pt(`Failed to parse JSON response: ${w instanceof Error?w.message:String(w)}. Data: ${E}`,`PARSE_ERROR`)}const b=Array.isArray(v)?v:[v];await n({items:b,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeBytes(n){this.#w(`subscribeBytes`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),m=await o.arrayBuffer();await n({data:new Uint8Array(m),offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}subscribeText(n){this.#w(`subscribeText`);const t=new AbortController,i=this.#C();return(async()=>{try{let l=await i.read();for(;!l.done&&!t.signal.aborted;){const o=l.value,{offset:u,cursor:d,upToDate:p,streamClosed:g}=kh(o,this.offset,this.cursor,this.streamClosed),m=await o.text();await n({text:m,offset:u,cursor:d,upToDate:p,streamClosed:g}),l=await i.read()}this.#r()}catch(l){const o=t.signal.aborted,u=l instanceof TypeError&&String(l).includes(`Body`);!o&&!u?this.#_(l instanceof Error?l:new Error(String(l))):this.#r()}finally{i.releaseLock()}})(),()=>{t.abort(),this.cancel()}}cancel(n){this.#l.abort(n),this.#b?.(),this.#r()}get closed(){return this.#g}};function kh(n,t,i,r){const l=n.headers.get(_n),o=n.headers.get(qc),u=n.headers.has(Kc),d=n.headers.get(In)?.toLowerCase()===`true`;return{offset:l??t,cursor:o??i,upToDate:u,streamClosed:d||r}}function KC(n){const t=n.replace(/[\n\r]/g,``);if(t.length===0)return new Uint8Array(0);if(t.length%4!==0)throw new Pt(`Invalid base64 data: length ${t.length} is not a multiple of 4`,`PARSE_ERROR`);try{if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(t,`base64`));{const i=atob(t),r=new Uint8Array(i.length);for(let l=0;ly.length>0).map(y=>KC(y));if(m.length===0)g=new ArrayBuffer(0);else if(m.length===1){const y=m[0];g=y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}else{const y=m.reduce((w,E)=>w+E.length,0),v=new Uint8Array(y);let b=0;for(const w of m)v.set(w,b),b+=w.length;g=v.buffer}}else if(d){const m=[];for(const y of n){const v=y.trim();if(v.length!==0)if(v.startsWith(`[`)&&v.endsWith(`]`)){const b=v.slice(1,-1).trim();b.length>0&&m.push(b)}else m.push(v)}g=`[${m.join(`,`)}]`}else g=n.join(``);return new Response(g,{status:200,headers:p})}async function Za(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))typeof r==`function`?t[i]=await r():t[i]=r;return t}async function ps(n,t,i){const r=n.status;if(r===404)throw new Pt(`Stream not found: ${t}`,`NOT_FOUND`,404);if(r===409){if(n.headers.get(In)?.toLowerCase()===`true`){const d=n.headers.get(_n)??void 0;throw new Nv(t,d)}const o=i?.operation===`create`?`Stream already exists: ${t}`:`Sequence conflict: seq is lower than last appended`,u=i?.operation===`create`?`CONFLICT_EXISTS`:`CONFLICT_SEQ`;throw new Pt(o,u,409)}throw r===400?new Pt(`Bad request (possibly content-type mismatch)`,`BAD_REQUEST`,400):await Pt.fromResponse(n,t)}async function sc(n){const t={};if(!n)return t;for(const[i,r]of Object.entries(n))r!==void 0&&(typeof r==`function`?t[i]=await r():t[i]=r);return t}const eS=new Set;function $C(){if(!(typeof process>`u`))return`production`}function GC(){return typeof globalThis.window<`u`}function YC(){if(typeof globalThis.window<`u`&&typeof globalThis.window.location<`u`)return globalThis.window.location.href}function FC(n){try{return new URL(n)}catch{const t=YC();if(t)try{return new URL(n,t)}catch{return}return}}function Iv(n,t){if(t===!1||$C()===`test`||!GC()||typeof console>`u`||typeof console.warn!=`function`)return;const r=n instanceof URL?n.toString():n,l=FC(r);l&&l.protocol===`http:`&&(eS.has(l.origin)||(eS.add(l.origin),console.warn(`[DurableStream] Using HTTP (not HTTPS) typically limits browsers to ~6 concurrent connections per origin under HTTP/1.1. This can cause slow streams and app freezes with multiple active streams. Use HTTPS for HTTP/2 support. See https://electric-sql.com/r/electric-http2 for more information.`)))}async function QC(n){if(!n.url)throw new Pt(`Invalid stream options: missing required url parameter`,`BAD_REQUEST`);let t=n.headers,i=n.params;for(;;)try{return await XC({...n,headers:t,params:i})}catch(r){if(n.onError){const l=await n.onError(r instanceof Error?r:new Error(String(r)));if(l===void 0)throw r;l.params&&(i={...i,...l.params}),l.headers&&(t={...t,...l.headers});continue}throw r}}async function XC(n){const t=n.url instanceof URL?n.url.toString():n.url;Iv(t,n.warnOnHttp);const i=new URL(t),r=n.offset??`-1`;i.searchParams.set(Rh,r);const l=n.live??!0;(l===`long-poll`||l===`sse`)&&i.searchParams.set(Qo,l);const o=await sc(n.params);for(const[I,H]of Object.entries(o))i.searchParams.set(I,H);const u=await Za(n.headers),d=new AbortController;n.signal&&n.signal.addEventListener(`abort`,()=>d.abort(n.signal?.reason),{once:!0});const p=n.fetch??((...I)=>fetch(...I)),g=n.backoffOptions??Jd,m=Bv(p,g);let y;try{y=await m(i.toString(),{method:`GET`,headers:u,signal:d.signal})}catch(I){throw I instanceof Xd?new Pt(`Stream request was aborted`,`UNKNOWN`):I}const v=y.headers.get(`content-type`)??void 0,b=y.headers.get(_n)??r,w=y.headers.get(qc)??void 0,E=y.headers.has(Kc),T=y.headers.get(In)?.toLowerCase()===`true`,N=n.json===!0||(v?.includes(`application/json`)??!1),R=y.headers.get(kC)===`base64`?`base64`:void 0,A=async(I,H,W,tt)=>{const X=new URL(t);X.searchParams.set(Rh,I),tt||(l===`sse`?X.searchParams.set(Qo,`sse`):(l===!0||l===`long-poll`)&&X.searchParams.set(Qo,`long-poll`)),H&&X.searchParams.set(`cursor`,H);const at=await sc(n.params);for(const[Lt,dt]of Object.entries(at))X.searchParams.set(Lt,dt);const nt=await Za(n.headers),wt=await m(X.toString(),{method:`GET`,headers:nt,signal:W});return wt.ok||await ps(wt,t),wt},V=l===`sse`?async(I,H,W)=>{const tt=new URL(t);tt.searchParams.set(Rh,I),tt.searchParams.set(Qo,`sse`),H&&tt.searchParams.set(`cursor`,H);const X=await sc(n.params);for(const[wt,Lt]of Object.entries(X))tt.searchParams.set(wt,Lt);const at=await Za(n.headers),nt=await m(tt.toString(),{method:`GET`,headers:at,signal:W});return nt.ok||await ps(nt,t),nt}:void 0;return new qC({url:t,contentType:v,live:l,startOffset:r,isJsonMode:N,initialOffset:b,initialCursor:w,initialUpToDate:E,initialStreamClosed:T,firstResponse:y,abortController:d,fetchNext:A,startSSE:V,sseResilience:n.sseResilience,encoding:R})}var nS=class extends Error{currentEpoch;constructor(n){super(`Producer epoch is stale. Current server epoch: ${n}. Call restart() or create a new producer with a higher epoch.`),this.name=`StaleEpochError`,this.currentEpoch=n}},JC=class extends Error{expectedSeq;receivedSeq;constructor(n,t){super(`Producer sequence gap: expected ${n}, received ${t}`),this.name=`SequenceGapError`,this.expectedSeq=n,this.receivedSeq=t}};function sS(n){return n?n.split(`;`)[0].trim().toLowerCase():``}var Hv=class{#t;#e;#n;#s=0;#a;#i;#c;#l;#p;#d;#h=[];#f=0;#g=null;#y;#x;#o=!1;#u=null;#b;#m;#S=new Map;constructor(n,t,i){const r=i?.epoch??0,l=i?.maxBatchBytes??1024*1024,o=i?.maxInFlight??5,u=i?.lingerMs??5;if(r<0)throw new Error(`epoch must be >= 0`);if(l<=0)throw new Error(`maxBatchBytes must be > 0`);if(o<=0)throw new Error(`maxInFlight must be > 0`);if(u<0)throw new Error(`lingerMs must be >= 0`);this.#t=n,this.#e=t,this.#n=r,this.#a=i?.autoClaim??!1,this.#i=l,this.#c=u,this.#p=i?.signal,this.#d=i?.onError,this.#l=i?.fetch??((...d)=>fetch(...d)),this.#x=o,this.#m=!this.#a,this.#y=zv.promise(this.#O.bind(this),this.#x),this.#p&&this.#p.addEventListener(`abort`,()=>{this.#A(new Pt(`Producer aborted`,`ALREADY_CLOSED`,void 0,void 0))},{once:!0})}append(n){if(this.#o)throw new Pt(`Producer is closed`,`ALREADY_CLOSED`,void 0,void 0);let t;if(typeof n==`string`)t=new TextEncoder().encode(n);else if(n instanceof Uint8Array)t=n;else throw new Pt(`append() requires string or Uint8Array. For objects, use JSON.stringify().`,`BAD_REQUEST`,400,void 0);this.#h.push({body:t}),this.#f+=t.length,this.#f>=this.#i?this.#E():this.#g||(this.#g=setTimeout(()=>{this.#g=null,this.#h.length>0&&this.#E()},this.#c))}async flush(){this.#g&&(clearTimeout(this.#g),this.#g=null),this.#h.length>0&&this.#E(),await this.#y.drained()}async detach(){if(!this.#o){this.#o=!0;try{await this.flush()}catch{}}}async close(n){if(this.#o){if(this.#u)return this.#u;await this.flush();const i=await this.#v(this.#b);return this.#u=i,i}this.#o=!0,this.#b=n,await this.flush();const t=await this.#v(n);return this.#u=t,t}async#v(n){const t=this.#t.contentType??`application/octet-stream`,i=sS(t)===`application/json`;let r;if(n!==void 0){const g=typeof n==`string`?new TextEncoder().encode(n):n;i?r=`[${new TextDecoder().decode(g)}]`:r=g}const l=this.#s,u={...await this.#t.resolveHeaders(),"content-type":t,[J0]:this.#e,[Fo]:this.#n.toString(),[Z0]:l.toString(),[In]:`true`},d=await this.#l(this.#t.url,{method:`POST`,headers:u,body:r,signal:this.#p});if(d.status===204)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===200)return this.#s=l+1,{finalOffset:d.headers.get(_n)??``};if(d.status===403){const g=d.headers.get(Fo),m=g?parseInt(g,10):this.#n;if(this.#a){const y=m+1;return this.#n=y,this.#s=0,this.#v(n)}throw new nS(m)}throw await Zs.fromResponse(d,this.#t.url)}async restart(){await this.flush(),this.#n++,this.#s=0}get epoch(){return this.#n}get nextSeq(){return this.#s}get pendingCount(){return this.#h.length}get inFlightCount(){return this.#y.length()}#E(){if(this.#h.length===0)return;const n=this.#h,t=this.#s;this.#h=[],this.#f=0,this.#s++,this.#a&&!this.#m&&this.#y.length()>0?this.#y.drained().then(()=>{this.#y.push({batch:n,seq:t}).catch(()=>{})}):this.#y.push({batch:n,seq:t}).catch(()=>{})}async#O(n){const{batch:t,seq:i}=n,r=this.#n;try{await this.#T(t,i,r),this.#m||(this.#m=!0),this.#R(r,i,void 0)}catch(l){throw this.#R(r,i,l),this.#d&&this.#d(l),l}}#R(n,t,i){let r=this.#S.get(n);r||(r=new Map,this.#S.set(n,r));const l=r.get(t);if(l){l.resolved=!0,l.error=i;for(const u of l.waiters)u(i);l.waiters=[]}else r.set(t,{resolved:!0,error:i,waiters:[]});const o=t-this.#x*3;if(o>0)for(const u of r.keys())u{const u=d=>{d?o(d):l()};r?r.waiters.push(u):i.set(t,{resolved:!1,waiters:[u]})})}async#T(n,t,i){const r=this.#t.contentType??`application/octet-stream`,l=sS(r)===`application/json`;let o;if(l)o=`[${n.map(v=>new TextDecoder().decode(v.body)).join(`,`)}]`;else{const y=n.reduce((w,E)=>w+E.body.length,0),v=new Uint8Array(y);let b=0;for(const w of n)v.set(w.body,b),b+=w.body.length;o=v}const u=this.#t.url,p={...await this.#t.resolveHeaders(),"content-type":r,[J0]:this.#e,[Fo]:i.toString(),[Z0]:t.toString()},g=await this.#l(u,{method:`POST`,headers:p,body:o,signal:this.#p});if(g.status===204)return{offset:``,duplicate:!0};if(g.status===200)return{offset:g.headers.get(_n)??``,duplicate:!1};if(g.status===403){const y=g.headers.get(Fo),v=y?parseInt(y,10):i;if(this.#a){const b=v+1;return this.#n=b,this.#s=1,this.#T(n,0,b)}throw new nS(v)}if(g.status===409){const y=g.headers.get(DC),v=y?parseInt(y,10):0;if(v0&&this.#d(n),this.#h=[],this.#f=0,this.#g&&(clearTimeout(this.#g),this.#g=null)}};function Uh(n){return n?n.split(`;`)[0].trim().toLowerCase():``}function ZC(n){return n!=null&&typeof n.then==`function`}var Ln=class Ya{url;contentType;#t;#e;#n;#s;#a;#i;#c=[];constructor(t){tx(t);const i=t.url instanceof URL?t.url.toString():t.url;this.url=i,this.#t={...t,url:i},this.#s=t.onError,t.contentType&&(this.contentType=t.contentType),this.#a=t.batching!==!1,this.#a&&(this.#i=zv.promise(this.#d.bind(this),1)),this.#n=t.fetch??((...o)=>fetch(...o));const r={...t.backoffOptions??Jd},l=Bv(this.#n,r);this.#e=LC(l)}static async create(t){const i=new Ya(t);return await i.create({contentType:t.contentType,ttlSeconds:t.ttlSeconds,expiresAt:t.expiresAt,body:t.body,closed:t.closed}),i}static async connect(t){const i=new Ya(t);return await i.head(),i}static async head(t){return new Ya(t).head()}static async delete(t){return new Ya(t).delete()}async head(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#n(r.toString(),{method:`HEAD`,headers:i,signal:t?.signal??this.#t.signal});if(!l.ok){if(l.status===404)return{exists:!1};await ps(l,this.url)}const o=l.headers.get(`content-type`)??void 0,u=l.headers.get(_n)??void 0,d=l.headers.get(`etag`)??void 0,p=l.headers.get(`cache-control`)??void 0,g=l.headers.get(In)?.toLowerCase()===`true`;return o&&(this.contentType=o),{exists:!0,contentType:o,offset:u,etag:d,cacheControl:p,streamClosed:g}}async create(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType;l&&(i[`content-type`]=l),t?.ttlSeconds!==void 0&&(i[OC]=String(t.ttlSeconds)),t?.expiresAt&&(i[RC]=t.expiresAt),t?.closed&&(i[In]=`true`);const o=WC(t?.body),u=await this.#e(r.toString(),{method:`PUT`,headers:i,body:o,signal:this.#t.signal});u.ok||await ps(u,this.url,{operation:`create`});const d=u.headers.get(`content-type`);return d?this.contentType=d:l&&(this.contentType=l),this}async delete(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=await this.#e(r.toString(),{method:`DELETE`,headers:i,signal:t?.signal??this.#t.signal});l.ok||await ps(l,this.url)}async close(t){const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l),i[In]=`true`;let o;t?.body!==void 0&&(Uh(l)===`application/json`?o=`[${typeof t.body==`string`?t.body:new TextDecoder().decode(t.body)}]`:o=(typeof t.body==`string`,t.body));const u=await this.#e(r.toString(),{method:`POST`,headers:i,body:o,signal:t?.signal??this.#t.signal});if(u.status===409&&u.headers.get(In)?.toLowerCase()===`true`){const g=u.headers.get(_n)??void 0;throw new Nv(this.url,g)}return u.ok||await ps(u,this.url),{finalOffset:u.headers.get(_n)??``}}async append(t,i){const r=ZC(t)?await t:t;return this.#a&&this.#i?this.#p(r,i):this.#l(r,i)}async#l(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Oh]=i.seq);const u=Uh(o)===`application/json`;let d;u?d=`[${typeof t==`string`?t:new TextDecoder().decode(t)}]`:typeof t==`string`?d=t:d=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);const p=await this.#e(l.toString(),{method:`POST`,headers:r,body:d,signal:i?.signal??this.#t.signal});p.ok||await ps(p,this.url)}async#p(t,i){return new Promise((r,l)=>{if(this.#c.push({data:t,seq:i?.seq,contentType:i?.contentType,signal:i?.signal,resolve:r,reject:l}),this.#i.idle()){const o=this.#c.splice(0);this.#i.push(o).catch(u=>{for(const d of o)d.reject(u)})}})}async#d(t){try{await this.#h(t);for(const i of t)i.resolve();if(this.#c.length>0){const i=this.#c.splice(0);this.#i.push(i).catch(r=>{for(const l of i)l.reject(r)})}}catch(i){for(const r of t)r.reject(i);for(const r of this.#c)r.reject(i);throw this.#c=[],i}}async#h(t){if(t.length===0)return;const{requestHeaders:i,fetchUrl:r}=await this.#f(),l=t[0]?.contentType??this.#t.contentType??this.contentType;l&&(i[`content-type`]=l);let o;for(let y=t.length-1;y>=0;y--)if(t[y].seq!==void 0){o=t[y].seq;break}o&&(i[Oh]=o);const u=Uh(l)===`application/json`;let d;if(u)d=`[${t.map(v=>typeof v.data==`string`?v.data:new TextDecoder().decode(v.data)).join(`,`)}]`;else{const y=t.some(b=>b.data instanceof Uint8Array),v=t.some(b=>typeof b.data==`string`);if(y&&!v){const b=t.map(N=>N.data),w=b.reduce((N,M)=>N+M.length,0),E=new Uint8Array(w);let T=0;for(const N of b)E.set(N,T),T+=N.length;d=E}else if(v&&!y)d=t.map(b=>b.data).join(``);else{const b=new TextEncoder,w=t.map(M=>typeof M.data==`string`?b.encode(M.data):M.data),E=w.reduce((M,R)=>M+R.length,0),T=new Uint8Array(E);let N=0;for(const M of w)T.set(M,N),N+=M.length;d=T}}const p=[];this.#t.signal&&p.push(this.#t.signal);for(const y of t)y.signal&&p.push(y.signal);const g=p.length>0?AbortSignal.any(p):void 0,m=await this.#e(r.toString(),{method:`POST`,headers:i,body:d,signal:g});m.ok||await ps(m,this.url)}async appendStream(t,i){const{requestHeaders:r,fetchUrl:l}=await this.#f(),o=i?.contentType??this.#t.contentType??this.contentType;o&&(r[`content-type`]=o),i?.seq&&(r[Oh]=i.seq);const u=PC(t),d=await this.#e(l.toString(),{method:`POST`,headers:r,body:u,duplex:`half`,signal:i?.signal??this.#t.signal});d.ok||await ps(d,this.url)}writable(t){const i=t?.producerId??`writable-${crypto.randomUUID().slice(0,8)}`;let r=null;const l=new Hv(this,i,{autoClaim:!0,lingerMs:t?.lingerMs,maxBatchBytes:t?.maxBatchBytes,onError:o=>{r||(r=o),t?.onError?.(o)},signal:t?.signal??this.#t.signal});return new WritableStream({write(o){l.append(o)},async close(){if(await l.close(),r)throw r},abort(o){l.detach().catch(u=>{t?.onError?.(u)})}})}async stream(t){const i={...this.#t.headers,...t?.headers},r={...this.#t.params,...t?.params};return QC({url:this.url,headers:i,params:r,signal:t?.signal??this.#t.signal,fetch:this.#t.fetch,backoffOptions:this.#t.backoffOptions,offset:t?.offset,live:t?.live,json:t?.json,onError:t?.onError??this.#s,warnOnHttp:t?.warnOnHttp??this.#t.warnOnHttp})}async resolveHeaders(){return Za(this.#t.headers)}async#f(){const t=await Za(this.#t.headers),i=new URL(this.url),r=await sc(this.#t.params);for(const[l,o]of Object.entries(r))i.searchParams.set(l,o);return{requestHeaders:t,fetchUrl:i}}};function WC(n){if(n!==void 0)return typeof n==`string`?new TextEncoder().encode(n):n instanceof Uint8Array||n instanceof Blob||n instanceof FormData||n instanceof ReadableStream||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?n:new TextEncoder().encode(JSON.stringify(n))}function PC(n){if(n instanceof ReadableStream)return n.pipeThrough(new TransformStream({transform(r,l){typeof r==`string`?l.enqueue(new TextEncoder().encode(r)):l.enqueue(r)}}));const t=new TextEncoder,i=n[Symbol.asyncIterator]();return new ReadableStream({async pull(r){try{const{done:l,value:o}=await i.next();l?r.close():typeof o==`string`?r.enqueue(t.encode(o)):r.enqueue(o)}catch(l){r.error(l)}},cancel(){i.return?.()}})}function tx(n){if(!n.url)throw new UC;if(n.signal&&!(n.signal instanceof AbortSignal))throw new zC;Iv(n.url,n.warnOnHttp)}const ex=`__includes_scalar__`;class Ti{}class jr extends Ti{constructor(t,i){super(),this.collection=t,this.alias=i,this.type=`collectionRef`}}class yn extends Ti{constructor(t,i){super(),this.query=t,this.alias=i,this.type=`queryRef`}}class Oe extends Ti{constructor(t){super(),this.path=t,this.type=`ref`}}class ke extends Ti{constructor(t){super(),this.value=t,this.type=`val`}}class Ve extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type=`func`}}class qv extends Ti{constructor(t,i){super(),this.name=t,this.args=i,this.type=`agg`}}class Ai extends Ti{constructor(t,i,r,l,o,u,d=`collection`,p){super(),this.query=t,this.correlationField=i,this.childCorrelationField=r,this.fieldName=l,this.parentFilters=o,this.parentProjection=u,this.materialization=d,this.scalarField=p,this.type=`includesSubquery`}}function Nr(n){return n instanceof qv||n instanceof Ve||n instanceof Oe||n instanceof ke||n instanceof Ai}function Pd(n){return typeof n==`object`&&`expression`in n?n.expression:n}function iS(n){return typeof n==`object`&&`expression`in n?n.expression:n}function rS(n){return typeof n==`object`&&`expression`in n&&n.residual===!0}function nx(n){return{expression:n,residual:!0}}function sx(n,t){if(n.from.alias===t)return n.from;for(const i of n.join||[])if(i.from.alias===t)return i.from}function al(n,t,i){if(t.path.length!==0){if(t.path.length===1){const r=t.path[0];if(n.select){const l=n.select[r];if(l&&l.type===`ref`)return al(n,l,i)}return{collection:i,path:[r]}}if(t.path.length>1){const[r,...l]=t.path,o=sx(n,r);return o?o.type===`queryRef`?al(o.query,new Oe(l),i):{collection:o.collection,path:l}:void 0}}}class vn extends Error{constructor(t){super(t),this.name=`TanStackDBError`}}class aS extends vn{constructor(t,i,r){const l=`${t===`insert`?`Insert`:`Update`} validation failed: ${i.map(o=>` -- ${o.message} - path: ${o.path}`).join(``)}`;super(r||l),this.name=`SchemaValidationError`,this.type=t,this.issues=i}}class Oi extends vn{constructor(t){super(t),this.name=`CollectionConfigurationError`}}class ix extends Oi{constructor(){super(`Collection requires a config`)}}class rx extends Oi{constructor(){super(`Collection requires a sync config`)}}class ax extends Oi{constructor(){super(`Schema must implement the standard-schema interface`)}}class lS extends Oi{constructor(){super(`Schema validation must be synchronous`)}}class bl extends vn{constructor(t){super(t),this.name=`CollectionStateError`}}class lx extends bl{constructor(t,i){super(`Cannot perform ${t} on collection "${i}" - collection is in error state. Try calling cleanup() and restarting the collection.`)}}class ox extends bl{constructor(t,i,r){super(`Invalid collection status transition from "${t}" to "${i}" for collection "${r}"`)}}class cx extends bl{constructor(){super(`Collection is in error state`)}}class ux extends bl{constructor(){super(`Active subscribers count is negative - this should never happen`)}}class Yn extends vn{constructor(t){super(t),this.name=`CollectionOperationError`}}class fx extends Yn{constructor(t){super(`An object was created without a defined key: ${JSON.stringify(t)}`)}}class hx extends Yn{constructor(t,i){const r=t===null?`null`:typeof t;super(`getKey returned an invalid key type. Expected string or number, but got ${r}: ${JSON.stringify(t)}. Item: ${JSON.stringify(i)}`)}}class dx extends Yn{constructor(t){super(`Cannot insert document with ID "${t}" because it already exists in the collection`)}}class px extends Yn{constructor(t,i,r){const l=`Cannot insert document with key "${t}" from sync because it already exists in the collection "${i}"`;r?.hasCustomGetKey&&r.hasDistinct?super(`${l}. This collection uses a custom getKey with .distinct(). The .distinct() operator deduplicates by the ENTIRE selected object (standard SQL behavior), but your custom getKey extracts only a subset of fields. This causes multiple distinct rows (with different values in non-key fields) to receive the same key. To fix this, either: (1) ensure your SELECT only includes fields that uniquely identify each row, (2) use .groupBy() with min()/max() aggregates to select one value per group, or (3) remove the custom getKey to use the default key behavior.`):r?.hasCustomGetKey&&r.hasJoins?super(`${l}. This collection uses a custom getKey with joined queries. Joined queries can produce multiple rows with the same key when relationships are not 1:1. Consider: (1) using a composite key in your getKey function (e.g., \`\${item.key1}-\${item.key2}\`), (2) ensuring your join produces unique rows per key, or (3) removing the custom getKey to use the default composite key behavior.`):super(l)}}class gx extends Yn{constructor(){super(`The first argument to update is missing`)}}class yx extends Yn{constructor(){super(`No keys were passed to update`)}}class mx extends Yn{constructor(t){super(`The key "${t}" was passed to update but an object for this key was not found in the collection`)}}class Sx extends Yn{constructor(t,i){super(`Updating the key of an item is not allowed. Original key: "${t}", Attempted new key: "${i}". Please delete the old item and create a new one if a key change is necessary.`)}}class vx extends Yn{constructor(){super(`No keys were passed to delete`)}}class wx extends Yn{constructor(t){super(`Collection.delete was called with key '${t}' but there is no item in the collection with this key`)}}class tp extends vn{constructor(t){super(t),this.name=`MissingHandlerError`}}class bx extends tp{constructor(){super(`Collection.insert called directly (not within an explicit transaction) but no 'onInsert' handler is configured.`)}}class Ex extends tp{constructor(){super(`Collection.update called directly (not within an explicit transaction) but no 'onUpdate' handler is configured.`)}}class Cx extends tp{constructor(){super(`Collection.delete called directly (not within an explicit transaction) but no 'onDelete' handler is configured.`)}}class Ss extends vn{constructor(t){super(t),this.name=`TransactionError`}}class xx extends Ss{constructor(){super(`mutationFn is required when creating a transaction`)}}class _x extends Ss{constructor(){super(`onMutate must be synchronous and cannot return a promise. Remove async/await or returned promises from onMutate.`),this.name=`OnMutateMustBeSynchronousError`}}class Tx extends Ss{constructor(){super(`You can no longer call .mutate() as the transaction is no longer pending`)}}class Ax extends Ss{constructor(){super(`You can no longer call .rollback() as the transaction is already completed`)}}class Ox extends Ss{constructor(){super(`You can no longer call .commit() as the transaction is no longer pending`)}}class zh extends Ss{constructor(){super(`No pending sync transaction to write to`)}}class jh extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't still write to it.`)}}class Rx extends Ss{constructor(){super(`No pending sync transaction to commit`)}}class Dx extends Ss{constructor(){super(`The pending sync transaction is already committed, you can't commit it again.`)}}class Ri extends vn{constructor(t){super(t),this.name=`QueryBuilderError`}}class Mx extends Ri{constructor(t){super(`Only one source is allowed in the ${t}`)}}class kx extends Ri{constructor(t){super(`A sub query passed to a ${t} must have a from clause itself`)}}class Ux extends Ri{constructor(t){super(`Invalid source for live query: The value provided for alias "${t}" is not a Collection or subquery. Live queries only accept Collection instances or subqueries. Please ensure you're passing a valid Collection or QueryBuilder, not a plain array or other data type.`)}}class Xo extends Ri{constructor(t,i){super(`Invalid source for ${t}: Expected an object with a single key-value pair like { alias: collection }. For example: .from({ todos: todosCollection }). Got: ${i}`)}}class zx extends Ri{constructor(){super(`Join condition must be an equality expression`)}}class jx extends Ri{constructor(){super(`Query must have a from clause`)}}class oS extends Ri{constructor(t){super(`Invalid where() expression: Expected a query expression, but received a ${t}. This usually happens when using JavaScript's comparison operators (===, !==, <, >, etc.) directly. Instead, use the query builder functions: - - ❌ .where(({ user }) => user.id === 'abc') - ✅ .where(({ user }) => eq(user.id, 'abc')) - -Available comparison functions: eq, gt, gte, lt, lte, and, or, not, like, ilike, isNull, isUndefined`)}}class Ue extends vn{constructor(t){super(t),this.name=`QueryCompilationError`}}class Nx extends Ue{constructor(){super(`DISTINCT requires a SELECT clause.`)}}class Bx extends Ue{constructor(){super(`fn.select() cannot be used with groupBy(). groupBy requires the compiler to statically analyze aggregate functions (count, sum, max, etc.) in the SELECT clause, which is not possible with fn.select() since it is an opaque function. Use .select() instead of .fn.select() when combining with groupBy().`)}}class Lx extends Ue{constructor(){super(`Top-level scalar select() is not supported by createLiveQueryCollection() or queryOnce(). Return an object from .select(), or use the scalar query inside toArray(...) or concat(toArray(...)).`)}}class Ix extends Ue{constructor(){super(`HAVING clause requires GROUP BY clause`)}}class Hx extends Ue{constructor(){super(`LIMIT and OFFSET require an ORDER BY clause to ensure deterministic results`)}}class Kv extends Ue{constructor(t,i,r){const l=i?`alias "${t}" (collection "${i}")`:`collection "${t}"`,o=r?.length?`. Available keys: ${r.join(`, `)}`:``;super(`Input for ${l} not found in inputs map${o}`)}}class qx extends Ue{constructor(t,i){super(`Subquery uses alias "${t}" which is already used in the parent query. Each alias must be unique across parent and subquery contexts. Parent query aliases: ${i.join(`, `)}. Please rename "${t}" in either the parent query or subquery to avoid conflicts.`)}}class Kx extends Ue{constructor(t){super(`Unsupported FROM type: ${t}`)}}class Vx extends Ue{constructor(t){super(`Unknown expression type: ${t}`)}}class $x extends Ue{constructor(){super(`Reference path cannot be empty`)}}class Gx extends Ue{constructor(t){super(`Unknown function: ${t}`)}}class cS extends Ue{constructor(t){super(`Collection "${t}" not found during compilation of join`)}}class Di extends vn{constructor(t){super(t),this.name=`JoinError`}}class Yx extends Di{constructor(t){super(`Unsupported join type: ${t}`)}}class Fx extends Di{constructor(t){super(`Invalid join condition: both expressions refer to the same source "${t}"`)}}class Qx extends Di{constructor(){super(`Invalid join condition: expressions must reference source aliases`)}}class Xx extends Di{constructor(t){super(`Invalid join condition: left expression refers to an unavailable source "${t}"`)}}class Jx extends Di{constructor(t){super(`Invalid join condition: right expression does not refer to the joined source "${t}"`)}}class Zx extends Di{constructor(){super(`Invalid join condition`)}}class Wx extends Di{constructor(t){super(`Unsupported join source type: ${t}`)}}class Vc extends vn{constructor(t){super(t),this.name=`GroupByError`}}class Px extends Vc{constructor(t){super(`Non-aggregate expression '${t}' in SELECT must also appear in GROUP BY clause`)}}class t_ extends Vc{constructor(t){super(`Unsupported aggregate function: ${t}`)}}class e_ extends Vc{constructor(t){super(`Aggregate function in HAVING clause must also be in SELECT clause: ${t}`)}}class n_ extends Vc{constructor(t){super(`Unknown expression type in HAVING clause: ${t}`)}}class uS extends vn{constructor(t,i){const r=i instanceof Error?i.message:String(i);super(`Collection "${t}" sync cleanup function threw an error: ${r}`),this.name=`SyncCleanupError`}}class s_ extends vn{constructor(t){super(t),this.name=`QueryOptimizerError`}}class i_ extends s_{constructor(){super(`Cannot combine empty expression list`)}}class r_ extends Ue{constructor(t,i,r,l){super(`Internal error: subscription for alias '${t}' (remapped from '${i}', collection '${r}') is missing in join pipeline. Available aliases: ${l.join(`, `)}. This indicates a bug in alias tracking.`)}}class a_ extends Ue{constructor(t){super(`Internal error: compiler returned aliases without inputs: ${t.join(`, `)}. This indicates a bug in query compilation. Please report this issue.`)}}class l_ extends Ue{constructor(){super(`setWindow() can only be called on collections with an ORDER BY clause. Add .orderBy() to your query to enable window movement.`)}}function Hn(n,t){return ic(n,t,new Map)}function ic(n,t,i){if(n===t)return!0;if(n==null||t==null||typeof n!=typeof t)return!1;if(n instanceof Date)return t instanceof Date?n.getTime()===t.getTime():!1;if(t instanceof Date)return!1;if(n instanceof RegExp)return t instanceof RegExp?n.source===t.source&&n.flags===t.flags:!1;if(t instanceof RegExp)return!1;if(n instanceof Map){if(!(t instanceof Map)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const l=Array.from(n.entries()).every(([o,u])=>t.has(o)&&ic(u,t.get(o),i));return i.delete(n),l}if(t instanceof Map)return!1;if(n instanceof Set){if(!(t instanceof Set)||n.size!==t.size)return!1;if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Array.from(n),l=Array.from(t);if(r.every(u=>typeof u!=`object`))return i.delete(n),r.every(u=>t.has(u));const o=r.length===l.length;return i.delete(n),o}if(t instanceof Set)return!1;if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)&&!(n instanceof DataView)&&!(t instanceof DataView)){const r=n,l=t;if(r.length!==l.length)return!1;for(let o=0;oic(l,t[o],i));return i.delete(n),r}if(Array.isArray(t))return!1;if(typeof n==`object`){if(i.has(n))return i.get(n)===t;i.set(n,t);const r=Object.keys(n),l=Object.keys(t);if(r.length!==l.length)return i.delete(n),!1;const o=r.every(u=>u in t&&ic(n[u],t[u],i));return i.delete(n),o}return!1}const o_=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function Ws(n){if(n==null||typeof n!=`object`)return!1;const t=n[Symbol.toStringTag];return typeof t==`string`&&o_.has(t)}const Vv={direction:`asc`,nulls:`first`,stringSort:`locale`},Nh=new WeakMap;let c_=1;function fS(n){if(Nh.has(n))return Nh.get(n);const t=c_++;return Nh.set(n,t),t}const ep=(n,t,i)=>{const{nulls:r}=i;if(n==null&&t==null)return 0;if(n==null)return r===`first`?-1:1;if(t==null)return r===`first`?1:-1;if(typeof n==`string`&&typeof t==`string`&&i.stringSort===`locale`)return n.localeCompare(t,i.locale,i.localeOptions);if(Array.isArray(n)&&Array.isArray(t)){for(let u=0;ud?1:0}const l=typeof n==`object`,o=typeof t==`object`;if(l||o){if(l&&o){const u=fS(n),d=fS(t);return u-d}if(l)return 1;if(o)return-1}return nt?1:0},u_=(n,t,i)=>ep(t,n,{...i,nulls:i.nulls===`first`?`last`:`first`});function Wa(n){return(t,i)=>n.direction===`asc`?ep(t,i,n):u_(t,i,n)}const f_=Wa({direction:`asc`,nulls:`first`,stringSort:`locale`});function h_(n,t){if(n.byteLength!==t.byteLength)return!1;for(let i=0;ii}case`ref`:return t?m_(n):y_(n);case`func`:return S_(n,t);default:throw new Vx(n.type)}}function y_(n){const[t,...i]=n.path;if(!t)throw new $x;if(t===`$selected`){if(i.length===0)return l=>l.$selected;if(i.length===1){const l=i[0];return o=>o.$selected?.[l]}else return l=>{const o=l.$selected;if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}const r=t;if(i.length===0)return l=>l[r];if(i.length===1){const l=i[0];return o=>o[r]?.[l]}else return l=>{const o=l[r];if(o===void 0)return;let u=o;for(const d of i){if(u==null)return u;u=u[d]}return u}}function m_(n){const t=n.path;return i=>{let r=i;for(const l of t){if(r==null)return r;r=r[l]}return r}}function S_(n,t){const i=n.args.map(r=>np(r,t));switch(n.name){case`eq`:{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=Cr(l(o));return ye(u)||ye(d)?null:p_(u,d)}}case`gt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>d}}case`gte`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u>=d}}case`lt`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u{const u=r(o),d=l(o);return ye(u)||ye(d)?null:u<=d}}case`and`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!1)return!1;ye(u)&&(l=!0)}return l?null:!0};case`or`:return r=>{let l=!1;for(const o of i){const u=o(r);if(u===!0)return!0;ye(u)&&(l=!0)}return l?null:!1};case`not`:{const r=i[0];return l=>{const o=r(l);return ye(o)?null:!o}}case`in`:{const r=i[0],l=i[1];return o=>{const u=Cr(r(o)),d=l(o);return ye(u)?null:Array.isArray(d)?d.some(p=>Cr(p)===u):!1}}case`like`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:hS(u,d,!1)}}case`ilike`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return ye(u)||ye(d)?null:hS(u,d,!0)}}case`upper`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toUpperCase():o}}case`lower`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`?o.toLowerCase():o}}case`length`:{const r=i[0];return l=>{const o=r(l);return typeof o==`string`||Array.isArray(o)?o.length:0}}case`concat`:return r=>i.map(l=>{const o=l(r);try{return String(o??``)}catch{try{return JSON.stringify(o)||``}catch{return`[object]`}}}).join(``);case`coalesce`:return r=>{for(const l of i){const o=l(r);if(o!=null)return o}return null};case`add`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)+(d??0)}}case`subtract`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)-(d??0)}}case`multiply`:{const r=i[0],l=i[1];return o=>{const u=r(o),d=l(o);return(u??0)*(d??0)}}case`divide`:{const r=i[0],l=i[1];return o=>{const u=r(o),p=l(o)??0;return p!==0?(u??0)/p:null}}case`date`:{const r=i[0];return l=>{const o=r(l),u=Bh(o);return u?u.toISOString().slice(0,10):null}}case`datetime`:{const r=i[0];return l=>{const o=r(l),u=Bh(o);return u?u.toISOString():null}}case`strftime`:{const r=i[0],l=i[1];return o=>{const u=r(o);if(typeof u!=`string`)return null;const d=l(o),p=Bh(d);return p?g_(u,p):null}}case`isUndefined`:{const r=i[0];return l=>r(l)===void 0}case`isNull`:{const r=i[0];return l=>r(l)===null}default:throw new Gx(n.name)}}function hS(n,t,i){if(typeof n!=`string`||typeof t!=`string`)return!1;const r=i?n.toLowerCase():n;let o=(i?t.toLowerCase():t).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return o=o.replace(/%/g,`.*`),o=o.replace(/_/g,`.`),new RegExp(`^${o}$`,`s`).test(r)}class v_{constructor(t){this.originalIndex=t}lookup(t,i){const r=t===`gt`?`lt`:t===`gte`?`lte`:t===`lt`?`gt`:t===`lte`?`gte`:t;return this.originalIndex.lookup(r,i)}rangeQuery(t={}){return this.originalIndex.rangeQueryReversed(t)}rangeQueryReversed(t={}){return this.originalIndex.rangeQuery(t)}take(t,i,r){return this.originalIndex.takeReversed(t,i,r)}takeFromStart(t,i){return this.originalIndex.takeReversedFromEnd(t,i)}takeReversed(t,i,r){return this.originalIndex.take(t,i,r)}takeReversedFromEnd(t,i){return this.originalIndex.takeFromStart(t,i)}get orderedEntriesArray(){return this.originalIndex.orderedEntriesArrayReversed}get orderedEntriesArrayReversed(){return this.originalIndex.orderedEntriesArray}supports(t){return this.originalIndex.supports(t)}matchesField(t){return this.originalIndex.matchesField(t)}matchesCompareOptions(t){return this.originalIndex.matchesCompareOptions(t)}matchesDirection(t){return this.originalIndex.matchesDirection(t)}getStats(){return this.originalIndex.getStats()}add(t,i){this.originalIndex.add(t,i)}remove(t,i){this.originalIndex.remove(t,i)}update(t,i,r){this.originalIndex.update(t,i,r)}build(t){this.originalIndex.build(t)}clear(){this.originalIndex.clear()}get keyCount(){return this.originalIndex.keyCount}equalityLookup(t){return this.originalIndex.equalityLookup(t)}inArrayLookup(t){return this.originalIndex.inArrayLookup(t)}get indexedKeysSet(){return this.originalIndex.indexedKeysSet}get valueMapData(){return this.originalIndex.valueMapData}}function dS(n,t,i,r,l){const o=n;return{...n,$synced:o.$synced??r(),$origin:o.$origin??l(),$key:o.$key??t,$collectionId:o.$collectionId??i}}const gd=[`$synced`,`$origin`,`$key`,`$collectionId`];function w_(n){return gd.includes(n)}function Gv(n){return n.some(t=>w_(t))}function El(n,t,i){if(Gv(t))return;const r=i??{...Vv,...n.compareOptions};for(const l of n.indexes.values())if(l.matchesField(t)&&l.matchesCompareOptions(r))return l.matchesDirection(r.direction)?l:new v_(l)}function b_(n){if(n.length===0)return new Set;if(n.length===1)return new Set(n[0]);let t=new Set(n[0]);for(let i=1;i=2){const o=r.split(`.`),u=El(t,o);if(u&&u.supports(`gt`)&&u.supports(`lt`)){let d,p,g=!0,m=!0;for(const{operation:v,value:b}of l)switch(v){case`gt`:(d===void 0||b>d)&&(d=b,g=!1);break;case`gte`:(d===void 0||b>d)&&(d=b,g=!0);break;case`lt`:(p===void 0||b0){const l=r.map(u=>u.matchingKeys);return{canOptimize:!0,matchingKeys:b_(l)}}return{canOptimize:!1,matchingKeys:new Set}}function A_(n,t){if(n.type!==`func`||n.args.length<2)return{canOptimize:!1,matchingKeys:new Set};const i=[];for(const r of n.args){const l=sp(r,t);l.canOptimize&&i.push(l)}if(i.length>0){const r=i.map(o=>o.matchingKeys);return{canOptimize:!0,matchingKeys:E_(r)}}return{canOptimize:!1,matchingKeys:new Set}}function O_(n,t){if(n.type!==`func`||n.args.length!==2)return{canOptimize:!1,matchingKeys:new Set};const i=n.args[0],r=n.args[1];if(i.type===`ref`&&r.type===`val`&&Array.isArray(r.value)){const l=i.path,o=r.value,u=El(t,l);if(u){if(u.supports(`in`))return{canOptimize:!0,matchingKeys:u.lookup(`in`,o)};if(u.supports(`eq`)){const d=new Set;for(const p of o){const g=u.lookup(`eq`,p);for(const m of g)d.add(m)}return{canOptimize:!0,matchingKeys:d}}}}return{canOptimize:!1,matchingKeys:new Set}}function Yv(n){return n.config.autoIndex===`eager`}function $c(n,t,i,r,l){if(Gv(t)||!Yv(i))return;const o=r??{...Vv,...i.compareOptions};if(!Array.from(i.indexes.values()).find(d=>d.matchesField(t)&&d.matchesCompareOptions(o)))try{i.createIndex(d=>{let p=d;for(const g of t)p=p[g];return p},{name:`auto:${t.join(`.`)}`,options:l?{compareFn:l,compareOptions:o}:{}})}catch(d){console.warn(`${i.id?`[${i.id}] `:``}Failed to create auto-index for field path "${t.join(`.`)}":`,d)}}function R_(n,t){if(!Yv(t))return;const i=D_(n);for(const{fieldName:r,fieldPath:l}of i)$c(r,l,t)}function D_(n){const t=[];function i(r){if(r.type!==`func`)return;const l=r;if(l.name===`and`){for(const g of l.args)i(g);return}if(![`eq`,`gt`,`gte`,`lt`,`lte`,`in`].includes(l.name)||l.args.length<1||l.args[0].type!==`ref`)return;const d=l.args[0].path;if(d.length===0)return;const p=d.join(`_`);t.push({fieldName:p,fieldPath:d})}return i(n),t}class M_ extends Map{constructor(t,i){super(i),this.defaultValue=t}get(t){return this.has(t)?super.get(t):this.defaultValue()}update(t,i){const r=this.get(t),l=i(r);return this.set(t,l),l}}const Lh=3e4;function Ih(n,t){if(t.length<=Lh)n.push(...t);else for(let i=0;i0)l=o;else return o}return r}class U_{constructor(){this.objectIds=new WeakMap,this.nextId=0}getId(t){if(typeof t!=`object`||t===null){const i=String(t);let r=0;for(let l=0;lt?1:0:typeof n==`string`?-1:1}function ll(n){return JSON.stringify(n,(t,i)=>typeof i==`bigint`?i.toString():i instanceof Date?i.toISOString():i)}const j_=ve(),N_=ve(),B_=ve(),L_=ve(),I_=ve();function ve(){return Math.random()*(2**31-1)>>>0}const Fv=new ArrayBuffer(8),H_=new DataView(Fv),Fs=new Uint8Array(Fv);class Cl{constructor(){this.hash=j_,this.length=0,this.carry=0,this.carryBytes=0}_mix(t){t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t,this.hash=this.hash<<13|this.hash>>>19,this.hash=Math.imul(this.hash,5)+3864292196}writeByte(t){this.carry|=(t&255)<<8*this.carryBytes,this.carryBytes++,this.length++,this.carryBytes===4&&(this._mix(this.carry>>>0),this.carry=0,this.carryBytes=0)}update(t){switch(typeof t){case`symbol`:{this.update(I_);const i=t.description;if(!i)return;for(let r=0;r>>8&255)}return}case`string`:this.update(N_);for(let i=0;i>>8&255)}return;case`number`:H_.setFloat64(0,t,!0),this.writeByte(Fs[0]),this.writeByte(Fs[1]),this.writeByte(Fs[2]),this.writeByte(Fs[3]),this.writeByte(Fs[4]),this.writeByte(Fs[5]),this.writeByte(Fs[6]),this.writeByte(Fs[7]);return;case`bigint`:{let i=t;for(i<0n?(i=-i,this.update(L_)):this.update(B_);i>0n;)this.writeByte(Number(i&0xffn)),i>>=8n;t===0n&&this.writeByte(0);return}default:throw new TypeError(`Unsupported input type: ${typeof t}`)}}digest(){if(this.carryBytes>0){let t=this.carry>>>0;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),this.hash^=t}return this.hash^=this.length,this.hash^=this.hash>>>16,this.hash=Math.imul(this.hash,2246822507),this.hash^=this.hash>>>13,this.hash=Math.imul(this.hash,3266489909),this.hash^=this.hash>>>16,this.hash>>>0}}const q_=ve(),K_=ve(),V_=ve(),$_=ve(),G_=ve(),Y_=ve(),F_=ve(),Q_=ve(),X_=ve(),J_=ve(),Z_=ve(),W_=ve(),P_=ve(),tT=new Set([`Temporal.Duration`,`Temporal.Instant`,`Temporal.PlainDate`,`Temporal.PlainDateTime`,`Temporal.PlainMonthDay`,`Temporal.PlainTime`,`Temporal.PlainYearMonth`,`Temporal.ZonedDateTime`]);function eT(n){const t=n[Symbol.toStringTag];return typeof t==`string`&&tT.has(t)}const nT=128,ol=new WeakMap;function Me(n){const t=new Cl;return Qv(t,n),t.digest()}function sT(n){const t=ol.get(n);if(t!==void 0)return t;let i;if(n instanceof Date)i=iT(n);else if(typeof Buffer<`u`&&n instanceof Buffer||n instanceof Uint8Array)if(n.byteLength<=nT)i=rT(n);else return md(n);else{if(n instanceof File)return md(n);if(eT(n))i=aT(n);else{let r=n,l=Q_;n instanceof Array&&(l=X_),n instanceof Map&&(l=J_,r=[...n.entries()]),n instanceof Set&&(l=Z_,r=[...n.entries()]),i=lT(r,l)}}return ol.set(n,i),i}function iT(n){const t=new Cl;return t.update(F_),t.update(n.getTime()),t.digest()}function rT(n){const t=new Cl;t.update(W_),t.update(n.byteLength);for(let i=0;i[t(i),r]))}filter(t){return new ne(this.#t.filter(([i,r])=>t(i)))}negate(){return new ne(this.#t.map(([t,i])=>[t,-i]))}concat(t){const i=[];return Ih(i,this.#t),Ih(i,t.getInner()),new ne(i)}consolidate(){if(this.#t.length>0){const t=this.#t[0]?.[0];if(Array.isArray(t)&&t.length===2)return this.#e()}return this.#n()}#e(){const t=new Map,i=new Map,r=o=>{if(o.length!==2)throw new Error(`Expected tuple of length 2`);const[u,d]=o;return`${Hh.getStringId(u)}|${Hh.getStringId(d)}`};for(const[o,u]of this.#t){if(!Array.isArray(o)||o.length!==2)return this.#n();const[d,p]=o;if(typeof d!=`string`&&typeof d!=`number`)return this.#n();let g;Array.isArray(p)&&p.length===2?g=r(p):g=Hh.getStringId(p);const m=d+`|`+g;t.set(m,(t.get(m)||0)+u),i.has(m)||i.set(m,o)}const l=[];for(const[o,u]of t)u!==0&&l.push([i.get(o),u]);return new ne(l)}#n(){const t=new M_(()=>0),i=new Map;let r=!1,l=!1,o=!1;for(const[p,g]of this.#t)if(typeof p==`string`)r=!0;else if(typeof p==`number`)l=!0;else{o=!0;break}const u=o||r&&l;for(const[p,g]of this.#t){const m=u?Me(p):p;u&&!i.has(m)&&i.set(m,p),t.update(m,y=>y+g)}const d=[];for(const[p,g]of t.entries())if(g!==0){const m=u?i.get(p):p;d.push([m,g])}return new ne(d)}extend(t){const i=t instanceof ne?t.getInner():t;Ih(this.#t,i)}add(t,i){i!==0&&this.#t.push([t,i])}getInner(){return this.#t}}class uT{#t;constructor(t){this.#t=t}drain(){const t=[...this.#t].reverse();return this.#t.length=0,t}isEmpty(){return this.#t.length===0}}class On{#t=[];sendData(t){t instanceof ne||(t=new ne(t));for(const i of this.#t)i.unshift(t)}newReader(){const t=[];return this.#t.push(t),new uT(t)}}class Xv{constructor(t,i,r){this.id=t,this.inputs=i,this.output=r}hasPendingWork(){return this.inputs.some(t=>!t.isEmpty())}}class Mi extends Xv{constructor(t,i,r){super(t,[i],r),this.id=t}inputMessages(){return this.inputs[0].drain()}}class fT extends Xv{constructor(t,i,r,l){super(t,[i,r],l),this.id=t}inputAMessages(){return this.inputs[0].drain()}inputBMessages(){return this.inputs[1].drain()}}class ip extends Mi{run(){for(const t of this.inputMessages())this.output.sendData(this.inner(t))}}class hT{#t=[];#e=0;#n=!1;constructor(){}#s(){if(this.#n)throw new Error(`Graph already finalized`)}getNextOperatorId(){return this.#s(),this.#e++}newInput(){this.#s();const t=new On;return new dT(this,t)}addOperator(t){this.#s(),this.#t.push(t)}finalize(){this.#s(),this.#n=!0}step(){if(!this.#n)throw new Error(`Graph not finalized`);for(const t of this.#t)t.run()}pendingWork(){return this.#t.some(t=>t.hasPendingWork())}run(){for(;this.pendingWork();)this.step()}}class Rn{#t;#e;constructor(t,i){this.#t=t,this.#e=i}connectReader(){return this.#e.newReader()}get writer(){return this.#e}get graph(){return this.#t}pipe(...t){return t.reduce((i,r)=>r(i),this)}}class dT extends Rn{sendData(t){this.writer.sendData(t)}}class pT extends Mi{run(){const t=this.inputMessages();if(t.length===0)return;const i=new ne;for(const l of t)i.extend(l);const r=i.consolidate();r.getInner().length>0&&this.output.sendData(r)}}function Jv(){return n=>{const t=new Rn(n.graph,new On),i=new pT(n.graph.getNextOperatorId(),n.connectReader(),t.writer);return n.graph.addOperator(i),t}}const Fa=Symbol(`NO_PREFIX`);class gS extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Pa(t),l=this.get(r);if(rc(l)){const[o,u]=l;if(Pa(o)!==r)throw new Error(`Mismatching prefixes, this should never happen`);if(o===t||Me(o)===Me(t)){const p=u+i;p===0?this.delete(r):this.set(r,[t,p])}else{const p=new Qa;p.set(Me(o),l),p.set(Me(t),[t,i]),this.set(r,p)}}else l===void 0?this.set(r,[t,i]):l.addValue(t,i)&&this.delete(r);return this.size===0}}class Qa extends Map{addValue(t,i){if(i===0)return this.size===0;const r=Me(t),l=this.get(r);if(l){const[,o]=l,u=o+i;u===0?this.delete(r):this.set(r,[t,u])}else this.set(r,[t,i]);return this.size===0}}class Xs{#t;#e=new Map;constructor(){this.#t=new Map}static fromMultiSets(t){const i=new Xs;for(const r of t)for(const[l,o]of r.getInner()){const[u,d]=l;i.addValue(u,[d,o])}return i}toString(t=!1){return`Index(${JSON.stringify([...this.entries()],void 0,t?2:void 0)})`}get size(){return this.#t.size}has(t){return this.#t.has(t)}hasPresence(t){return(this.#e.get(t)||0)!==0}getConsolidatedMultiplicity(t){return this.#e.get(t)||0}getPresenceKeys(){return this.#e.keys()}get(t){return[...this.getIterator(t)]}*getIterator(t){const i=this.#t.get(t);if(rc(i))yield i;else{if(i===void 0)return;if(i instanceof Qa)for(const r of i.values())yield r;else for(const r of i.values())if(rc(r))yield r;else for(const l of r.values())yield l}}*entries(){for(const t of this.#t.keys())for(const i of this.getIterator(t))yield[t,i]}*entriesIterators(){for(const t of this.#t.keys())yield[t,this.getIterator(t)]}addValue(t,i){const[r,l]=i;if(l===0)return;const o=(this.#e.get(t)||0)+l;o===0?this.#e.delete(t):this.#e.set(t,o);const u=this.#t.get(t);if(u===void 0){this.#t.set(t,i);return}if(rc(u)){this.#n(t,u,r,l);return}if(u instanceof Qa){const d=Pa(r);if(d!==Fa){const p=new gS;p.set(Fa,u),p.set(d,i),this.#t.set(t,p)}else u.addValue(r,l)&&this.#t.delete(t)}else u.addValue(r,l)&&this.#t.delete(t)}#n(t,i,r,l){const[o,u]=i;if(o===r){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}const d=Pa(r),p=Pa(o);if(p===d&&(o===r||Me(o)===Me(r))){const g=u+l;g===0?this.#t.delete(t):this.#t.set(t,[r,g]);return}if(p===Fa&&d===Fa){const g=new Qa;g.set(Me(o),i),g.set(Me(r),[r,l]),this.#t.set(t,g)}else{const g=new gS;if(p===d){const m=new Qa;m.set(Me(o),i),m.set(Me(r),[r,l]),g.set(p,m)}else g.set(p,i),g.set(d,[r,l]);this.#t.set(t,g)}}append(t){for(const[i,r]of t.entries())this.addValue(i,r)}join(t){const i=[];if(this.size<=t.size)for(const[r,l]of this.entriesIterators()){if(!t.has(r))continue;const o=t.get(r);for(const[u,d]of l)for(const[p,g]of o)d!==0&&g!==0&&i.push([[r,[u,p]],d*g])}else for(const[r,l]of t.entriesIterators()){if(!this.has(r))continue;const o=this.get(r);for(const[u,d]of l)for(const[p,g]of o)g!==0&&d!==0&&i.push([[r,[p,u]],g*d])}return new ne(i)}}function Pa(n){return Array.isArray(n)&&(typeof n[0]==`string`||typeof n[0]==`number`||typeof n[0]==`bigint`)?n[0]:Fa}function rc(n){return Array.isArray(n)}class gT extends Mi{#t=new Xs;#e=new Xs;#n;constructor(t,i,r,l){super(t,i,r),this.#n=l}run(){const t=new Set;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const[u,d]=l;this.#t.addValue(u,[d,o]),t.add(u)}const i=[];for(const r of t){const l=this.#t.get(r),o=this.#e.get(r),u=this.#n(l),d=new Map,p=new Map;for(const[g,m]of u){const y=d.get(g)??0;d.set(g,y+m)}for(const[g,m]of o){const y=p.get(g)??0;p.set(g,y+m)}for(const[g,m]of p)d.has(g)||(i.push([[r,g],-m]),this.#e.addValue(r,[g,-m]));for(const[g,m]of d)p.has(g)||m!==0&&(i.push([[r,g],m]),this.#e.addValue(r,[g,m]));for(const[g,m]of d){const y=p.get(g);if(y!==void 0){const v=m-y;v!==0&&(i.push([[r,g],v]),this.#e.addValue(r,[g,v]))}}}i.length>0&&this.output.sendData(new ne(i))}}function Zv(n){return t=>{const i=new Rn(t.graph,new On),r=new gT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class yT extends Mi{#t;#e;constructor(t,i,r,l=o=>o){super(t,i,r),this.#t=l,this.#e=new Map}run(){const t=new Map;for(const r of this.inputMessages())for(const[l,o]of r.getInner()){const u=Me(this.#t(l)),p=(t.get(u)?.[0]??this.#e.get(u)??0)+o;t.set(u,[p,l])}const i=[];for(const[r,[l,o]]of t.entries()){const u=this.#e.get(r)??0;l===0?this.#e.delete(r):this.#e.set(r,l),u<=0&&l>0?i.push([[Me(this.#t(o)),o[1]],1]):u>0&&l<=0&&i.push([[Me(this.#t(o)),o[1]],-1])}i.length>0&&this.output.sendData(new ne(i))}}function mT(n=t=>t){return t=>{const i=new Rn(t.graph,new On),r=new yT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class ST extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.filter(this.#t)}}function ys(n){return t=>{const i=new Rn(t.graph,new On),r=new ST(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}const vT=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function xr(n,t,i){const r=i[0];if(t!=null&&n>=t)throw new Error(n+` >= `+t);if(n.slice(-1)===r||t&&t.slice(-1)===r)throw new Error(`trailing zero`);if(t){let u=0;for(;(n[u]||r)===t[u];)u++;if(u>0)return t.slice(0,u)+xr(n.slice(u),t.slice(u),i)}const l=n?i.indexOf(n[0]):0,o=t!=null?i.indexOf(t[0]):i.length;if(o-l>1){const u=Math.round(.5*(l+o));return i[u]}else return t&&t.length>1?t.slice(0,1):i[l]+xr(n.slice(1),null,i)}function Wv(n){if(n.length!==Pv(n[0]))throw new Error(`invalid integer part of order key: `+n)}function Pv(n){if(n>=`a`&&n<=`z`)return n.charCodeAt(0)-97+2;if(n>=`A`&&n<=`Z`)return 90-n.charCodeAt(0)+2;throw new Error(`invalid order key head: `+n)}function Xa(n){const t=Pv(n[0]);if(t>n.length)throw new Error(`invalid order key: `+n);return n.slice(0,t)}function yS(n,t){if(n===`A`+t[0].repeat(26))throw new Error(`invalid order key: `+n);const i=Xa(n);if(n.slice(i.length).slice(-1)===t[0])throw new Error(`invalid order key: `+n)}function mS(n,t){Wv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])+1;u===t.length?r[o]=t[0]:(r[o]=t[u],l=!1)}if(l){if(i===`Z`)return`a`+t[0];if(i===`z`)return null;const o=String.fromCharCode(i.charCodeAt(0)+1);return o>`a`?r.push(t[0]):r.pop(),o+r.join(``)}else return i+r.join(``)}function wT(n,t){Wv(n);const[i,...r]=n.split(``);let l=!0;for(let o=r.length-1;l&&o>=0;o--){const u=t.indexOf(r[o])-1;u===-1?r[o]=t.slice(-1):(r[o]=t[u],l=!1)}if(l){if(i===`a`)return`Z`+t.slice(-1);if(i===`A`)return null;const o=String.fromCharCode(i.charCodeAt(0)-1);return o<`Z`?r.push(t.slice(-1)):r.pop(),o+r.join(``)}else return i+r.join(``)}function bT(n,t,i=vT){if(n!=null&&yS(n,i),t!=null&&yS(t,i),n!=null&&t!=null&&n>=t)throw new Error(n+` >= `+t);if(n==null){if(t==null)return`a`+i[0];const p=Xa(t),g=t.slice(p.length);if(p===`A`+i[0].repeat(26))return p+xr(``,g,i);if(p{const o=n(i,l);return o!==0?o:yd(t,r)}}class rp{#t=[];#e;#n;#s;constructor(t,i,r){this.#n=t,this.#s=t+i,this.#e=r}get size(){const t=this.#n,i=this.#s-this.#n,r=this.#t.length-t;return Math.max(0,Math.min(i,r))}move({offset:t,limit:i}){const r=this.#n,l=this.#s-this.#n,o=[this.#n,this.#s===1/0?this.#n+this.size:this.#s];this.#n=t??r,this.#s=this.#n+(i??l);const u=[this.#n,this.#s===1/0?Math.max(this.#n+this.size,o[1]):this.#s],{onlyInA:d,onlyInB:p}=z_(o,u),g=[];p.forEach(y=>{const v=this.#t[y];v&&g.push(v)});const m=[];return d.forEach(y=>{const v=this.#t[y];v&&m.push(v)}),{moveIns:g,moveOuts:m,changes:d.length+p.length>0}}insert(t){const i={moveIn:null,moveOut:null},r=this.#a(t),l=r===0?null:wS(this.#t[r-1]),o=r===this.#t.length?null:wS(this.#t[r]),u=bT(l,o),d=SS(t,u);if(this.#t.splice(r,0,d),rthis.#e(vS(i),vS(r)))}}class ew{#t=new Map;#e;constructor(t){this.#e=t}get size(){return this.#e.size}get isEmpty(){return this.#t.size===0&&this.#e.size===0}processElement(t,i,r){const{oldMultiplicity:l,newMultiplicity:o}=this.#n(t,r);return l<=0&&o>0?this.#e.insert([t,i]):l>0&&o<=0?this.#e.delete([t,i]):{moveIn:null,moveOut:null}}move(t){if(!(this.#e instanceof rp))throw new Error(`Cannot move B+-tree implementation of TopK with fractional index`);return this.#e.move(t)}#n(t,i){if(i===0){const o=this.#t.get(t)??0;return{oldMultiplicity:o,newMultiplicity:o}}const r=this.#t.get(t)??0,l=r+i;return l===0?this.#t.delete(t):this.#t.set(t,l),{oldMultiplicity:r,newMultiplicity:l}}}function Sc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],1])}}function vc(n,t){if(n){const[[i,r],l]=n;t.push([[i,[r,l]],-1])}}class ET extends Mi{#t=new Map;#e;#n;#s;#a;constructor(t,i,r,l,o){super(t,i,r),this.#e=o.groupKeyFn,this.#a=o.limit??1/0,this.#s=o.offset??0,this.#n=tw(l),o.setSizeCallback?.(()=>this.#i()),o.setWindowFn?.(this.#p.bind(this))}createTopK(t,i,r){return new rp(t,i,r)}#i(){let t=0;for(const i of this.#t.values())t+=i.size;return t}#c(t){let i=this.#t.get(t);if(!i){const r=this.createTopK(this.#s,this.#a,this.#n);i=new ew(r),this.#t.set(t,i)}return i}#l(t,i){i.isEmpty&&this.#t.delete(t)}#p({offset:t,limit:i}){t!==void 0&&(this.#s=t),i!==void 0&&(this.#a=i);const r=[];let l=!1;for(const o of this.#t.values()){const u=o.move({offset:this.#s,limit:this.#a});u.moveIns.forEach(d=>Sc(d,r)),u.moveOuts.forEach(d=>vc(d,r)),u.changes&&(l=!0)}l&&this.output.sendData(new ne(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.#d(o,u,l,t)}t.length>0&&this.output.sendData(new ne(t))}#d(t,i,r,l){const o=this.#e(t,i),u=this.#c(o),d=u.processElement(t,i,r);Sc(d.moveIn,l),vc(d.moveOut,l),this.#l(o,u)}}function CT(n,t){return i=>{const r=new Rn(i.graph,new On),l=new ET(i.graph.getNextOperatorId(),i.connectReader(),r.writer,n,t);return i.graph.addOperator(l),r}}class xT extends fT{#t=new Xs;#e=new Xs;#n;constructor(t,i,r,l,o=`inner`){super(t,i,r,l),this.#n=o}run(){const t=Xs.fromMultiSets(this.inputAMessages()),i=Xs.fromMultiSets(this.inputBMessages());if(t.size===0&&i.size===0)return;const r=new ne;this.#n!==`anti`&&this.emitInnerResults(t,i,r),(this.#n===`left`||this.#n===`full`||this.#n===`anti`)&&this.emitLeftOuterResults(t,i,r),(this.#n===`right`||this.#n===`full`)&&this.emitRightOuterResults(t,i,r),this.#t.append(t),this.#e.append(i),r.getInner().length>0&&this.output.sendData(r)}emitInnerResults(t,i,r){t.size>0&&r.extend(t.join(this.#e)),i.size>0&&r.extend(this.#t.join(i)),t.size>0&&i.size>0&&r.extend(t.join(i))}emitLeftOuterResults(t,i,r){if(t.size>0)for(const[l,o]of t.entriesIterators()){const u=this.#e.getConsolidatedMultiplicity(l),d=i.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[g,null]],m)}if(i.size>0)for(const l of i.getPresenceKeys()){const o=this.#e.getConsolidatedMultiplicity(l),u=i.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#t.getIterator(l))m!==0&&r.add([l,[g,null]],p?-m:+m)}}emitRightOuterResults(t,i,r){if(i.size>0)for(const[l,o]of i.entriesIterators()){const u=this.#t.getConsolidatedMultiplicity(l),d=t.getConsolidatedMultiplicity(l);if(u+d===0)for(const[g,m]of o)m!==0&&r.add([l,[null,g]],m)}if(t.size>0)for(const l of t.getPresenceKeys()){const o=this.#t.getConsolidatedMultiplicity(l),u=t.getConsolidatedMultiplicity(l);if(u===0)continue;const d=o+u;if(o===0==(d===0))continue;const p=o===0;for(const[g,m]of this.#e.getIterator(l))m!==0&&r.add([l,[null,g]],p?-m:+m)}}}function nw(n,t=`inner`){return i=>{if(i.graph!==n.graph)throw new Error(`Cannot join streams from different graphs`);const r=new Rn(i.graph,new On),l=new xT(i.graph.getNextOperatorId(),i.connectReader(),n.connectReader(),r.writer,t);return i.graph.addOperator(l),r}}class _T extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return t.map(this.#t)}}function oe(n){return t=>{const i=new Rn(t.graph,new On),r=new _T(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class TT extends Mi{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}run(){for(const t of this.inputMessages())this.#t(t),this.output.sendData(t)}}function Sd(n){return t=>{const i=new Rn(t.graph,new On),r=new TT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class AT extends ip{#t;constructor(t,i,r,l){super(t,i,r),this.#t=l}inner(t){return this.#t(t),t}}function OT(n){return t=>{const i=new Rn(t.graph,new On),r=new AT(t.graph.getNextOperatorId(),t.connectReader(),i.writer,n);return t.graph.addOperator(r),i}}class RT extends Mi{#t;constructor(t,i,r,l,o){super(t,i,r);const u=o.limit??1/0,d=o.offset??0,p=this.createTopK(d,u,tw(l));this.#t=new ew(p),o.setSizeCallback?.(()=>this.#t.size),o.setWindowFn?.(this.moveTopK.bind(this))}createTopK(t,i,r){return new rp(t,i,r)}moveTopK({offset:t,limit:i}){const r=[],l=this.#t.move({offset:t,limit:i});l.moveIns.forEach(o=>Sc(o,r)),l.moveOuts.forEach(o=>vc(o,r)),l.changes&&this.output.sendData(new ne(r))}run(){const t=[];for(const i of this.inputMessages())for(const[r,l]of i.getInner()){const[o,u]=r;this.processElement(o,u,l,t)}t.length>0&&this.output.sendData(new ne(t))}processElement(t,i,r,l){const o=this.#t.processElement(t,i,r);Sc(o.moveIn,l),vc(o.moveOut,l)}}function DT(n,t){const i=t||{};return r=>{const l=new Rn(r.graph,new On),o=new RT(r.graph.getNextOperatorId(),r.connectReader(),l.writer,n,i);return r.graph.addOperator(o),l}}function bS(n){return`pipe`in n}function ES(n,t={}){const i=Object.fromEntries(Object.entries(t).filter(([r,l])=>!bS(l)));return Object.fromEntries(Object.entries(t).filter(([r,l])=>bS(l))),r=>{const l=`__original_key__`;return r.pipe(oe(d=>{const p=n(d),g=ll(p),m={};m[l]=p;for(const[y,v]of Object.entries(i))m[y]=v.preMap(d);return[g,m]})).pipe(Zv(d=>{let p=0;for(const[y,v]of d)p+=v;if(p<=0)return[];const g={},m=d[0]?.[0]?.[l];g[l]=m;for(const[y,v]of Object.entries(i)){const b=d.map(([w,E])=>[w[y],E]);g[y]=v.reduce(b)}return[[g,1]]})).pipe(oe(([d,p])=>{const g=p[l],m={};Object.assign(m,g);for(const[y,v]of Object.entries(i))v.postMap?m[y]=v.postMap(p[y]):m[y]=p[y];return[d,m]}))}}function MT(n=t=>t){return{preMap:t=>n(t),reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function kT(n=t=>t){return{preMap:t=>n(t)==null?0:1,reduce:t=>{let i=0;for(const[r,l]of t)i+=r*l;return i}}}function UT(n=t=>t){return{preMap:t=>({sum:n(t),count:0}),reduce:t=>{let i=0,r=0;for(const[l,o]of t)i+=l.sum*o,r+=o;return{sum:i,count:r}},postMap:t=>t.sum/t.count}}function zT(n){const t=n??(i=>i);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&li);return{preMap:i=>t(i),reduce:i=>{let r;for(const[l,o]of i)(!r||l&&l>r)&&(r=l);return r}}}const NT={sum:MT,count:kT,avg:UT,min:zT,max:jT};function BT(n,t){const i=t.limit??1/0,r=t.offset??0,l=t.setSizeCallback,o=t.setWindowFn,u=t.groupKeyFn,d=t.comparator??((p,g)=>p===g?0:pp.pipe(CT((g,m)=>d(n(g),n(m)),{limit:i,offset:r,setSizeCallback:l,setWindowFn:o,groupKeyFn:u}),Jv())}function LT(n,t,i){const r=i?.limit??1/0,l=i?.offset??0,o=i?.setSizeCallback,u=i?.setWindowFn,d=i?.comparator??((p,g)=>p===g?0:pp.pipe(n((g,m)=>d(t(g),t(m)),{limit:r,offset:l,setSizeCallback:o,setWindowFn:u}),Jv())}function IT(n,t){return LT(DT,n,t)}const qh=`__virtual_synced__`,Kh=`__virtual_has_local__`;function CS(n){let t=!1,i=!0,r=!1;for(const[l,o]of Object.entries(n)){if(l===`$selected`)continue;const u=o,d=`$synced`in u,p=`$origin`in u;!d&&!p||(t=!0,u.$synced===!1&&(i=!1),u.$origin===`local`&&(r=!0))}return{synced:t?i:!0,hasLocal:r}}const{sum:HT,count:qT,avg:KT,min:VT,max:$T}=NT;function GT(n,t){const i=new Map,r=[...n];if(!t)return{selectToGroupByIndex:i,groupByExpressions:r};for(const[l,o]of Object.entries(t)){if(o.type===`agg`||Br(o))continue;const u=r.findIndex(d=>wc(o,d));if(u===-1)throw new Px(l);i.set(l,u)}return{selectToGroupByIndex:i,groupByExpressions:r}}function xS(n,t,i,r,l,o,u){const d={[qh]:{preMap:([,w])=>CS(w).synced,reduce:w=>{for(const[E,T]of w)if(!E&&T>0)return!1;return!0}},[Kh]:{preMap:([,w])=>CS(w).hasLocal,reduce:w=>{for(const[E,T]of w)if(E&&T>0)return!0;return!1}}};if(t.length===0){const w=d,E={},T={value:0};if(r){for(const[M,R]of Object.entries(r))if(R.type===`agg`)w[M]=Zo(R);else if(Br(R)){const{transformed:A,extracted:V}=vd(R,T);for(const[I,H]of Object.entries(V))w[I]=Zo(H);E[M]=fe(A)}}const N=u?([,M])=>({__singleGroup:!0,__correlationKey:M?.[u]?.__correlationKey}):()=>({__singleGroup:!0});if(n=n.pipe(ES(N,w)),n=n.pipe(oe(([,M])=>{const A={...M.$selected||{}};if(r){for(const[X,at]of Object.entries(r))at.type===`agg`&&(A[X]=M[X]);_S(A,M,E)}const V=u?M.__correlationKey:void 0,I=V!==void 0?`single_group_${ll(V)}`:`single_group`,H={...M,$selected:A},W=M[qh],tt=M[Kh];return H.$synced=W??!0,H.$origin=tt?`local`:`remote`,H.$key=I,H.$collectionId=o??H.$collectionId,u&&V!==void 0&&(H[u]={__correlationKey:V}),[I,H]})),i&&i.length>0)for(const M of i){const R=iS(M),A=bc(R,r||{},`$selected`),V=fe(A);n=n.pipe(ys(([,I])=>{const H={$selected:I.$selected};return Tr(V(H))}))}if(l&&l.length>0)for(const M of l)n=n.pipe(ys(([,R])=>{const A={$selected:R.$selected};return Tr(M(A))}));return n}const p=GT(t,r),g=t.map(w=>fe(w)),m=([,w])=>{const E={...w};delete E.$selected;const T={};for(let N=0;N{const E=w.$selected||{},T={};if(r){for(const[H,W]of Object.entries(r))if(W.type===`agg`)T[H]=w[H];else if(!v[H]){const tt=p.selectToGroupByIndex.get(H);tt!==void 0?T[H]=w[`__key_${tt}`]:T[H]=E[H]}_S(T,w,v)}else for(let H=0;H0)for(const w of i){const E=iS(w),T=bc(E,r||{}),N=fe(T);n=n.pipe(ys(([,M])=>{const R={$selected:M.$selected};return N(R)}))}if(l&&l.length>0)for(const w of l)n=n.pipe(ys(([,E])=>{const T={$selected:E.$selected};return Tr(w(T))}));return n}function wc(n,t){if(!n||!t||n.type!==t.type)return!1;switch(n.type){case`ref`:return!n.path||!t.path||n.path.length!==t.path.length?!1:n.path.every((i,r)=>i===t.path[r]);case`val`:return n.value===t.value;case`func`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>wc(i,t.args[r]));case`agg`:return n.name===t.name&&n.args?.length===t.args?.length&&(n.args||[]).every((i,r)=>wc(i,t.args[r]));default:return!1}}function Zo(n){const t=fe(n.args[0]),i=([,o])=>{const u=t(o);return typeof u==`number`?u:u!=null?Number(u):0},r=([,o])=>{const u=t(o);return typeof u==`number`||typeof u==`string`||typeof u==`bigint`||u instanceof Date?u:u!=null?Number(u):0},l=([,o])=>t(o);switch(n.name.toLowerCase()){case`sum`:return HT(i);case`count`:return qT(l);case`avg`:return KT(i);case`min`:return VT(r);case`max`:return $T(r);default:throw new t_(n.name)}}function bc(n,t,i=`$selected`){switch(n.type){case`agg`:{const r=n;for(const[l,o]of Object.entries(t))if(o.type===`agg`&&YT(r,o))return new Oe([i,l]);throw new e_(r.name)}case`func`:{const r=n,l=r.args.map(o=>bc(o,t));return new Ve(r.name,l)}case`ref`:return n;case`val`:return n;default:throw new n_(n.type)}}function _S(n,t,i){for(const r of Object.keys(t))r.startsWith(`__agg_`)&&(n[r]=t[r]);for(const[r,l]of Object.entries(i))n[r]=l({$selected:n});for(const r of Object.keys(n))r.startsWith(`__agg_`)&&delete n[r]}function Br(n){return Nr(n)?n.type===`agg`?!0:n.type===`func`&&`args`in n?n.args.some(t=>Br(t)):!1:!1}function vd(n,t){if(n.type===`agg`){const i=`__agg_${t.value++}`;return{transformed:new Oe([`$selected`,i]),extracted:{[i]:n}}}if(n.type===`func`){const i={},r=n.args.map(l=>{const o=vd(l,t);return Object.assign(i,o.extracted),o.transformed});return{transformed:new Ve(n.name,r),extracted:i}}return{transformed:n,extracted:{}}}function YT(n,t){return n.name===t.name&&n.args.length===t.args.length&&n.args.every((i,r)=>wc(i,t.args[r]))}function FT(n,t,i,r,l,o,u,d,p,g){const m=i.map(E=>{const T=bc(E.expression,r,`$selected`);return{compiledExpression:fe(T),compareOptions:wd(E,l)}}),y=E=>{const T=E;return i.length>1?m.map(N=>N.compiledExpression(T)):i.length===1?m[0].compiledExpression(T):null},v=(E,T)=>{if(i.length>1){const N=E,M=T;for(let R=0;R1?String(A.path[0]):n.from.alias}}if(N){const I=i.every(X=>X.expression.type===`ref`)?i.map(X=>{const at=X.expression,nt=al(n,at,l);return fe(nt?new Oe(nt.path):X.expression,!0)}):void 0;w={alias:M,offset:p??0,limit:d,comparator:(X,at)=>{if(i.length===1){const nt=X&&N(X),wt=at&&N(at);return v(nt,wt)}if(I){const nt=wt=>wt&&I.map(Lt=>Lt(wt));return v(nt(X),nt(at))}return 0},valueExtractorForRawRow:X=>{if(i.length===1)return N(X);if(I)return I.map(at=>at(X))},firstColumnValueExtractor:N,index:E,orderBy:i};const tt=T?.id??l.id;o[tt]=w,b=X=>{o[tt].dataNeeded=()=>{const at=X();return Math.max(0,w.limit-at)}}}}return g?t.pipe(BT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,groupKeyFn:g,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}})):t.pipe(IT(y,{limit:d,offset:p,comparator:v,setSizeCallback:b,setWindowFn:E=>{u(T=>{E(T),w&&(w.offset=T.offset??w.offset,w.limit=T.limit??w.limit)})}}))}function wd(n,t){return n.compareOptions.stringSort!==void 0?n.compareOptions:{...t.compareOptions,direction:n.compareOptions.direction,nulls:n.compareOptions.nulls}}function QT(n,t={}){const i=r=>{const l=[];for(const[o,u]of n.entries())(r?.(u)??!0)&&l.push({type:`insert`,key:o,value:u});return l};if(t.limit!==void 0&&!t.orderBy)throw new Error(`limit cannot be used without orderBy`);if(t.orderBy){const r=t.where?tl(t.where):void 0,l=JT(n,t.orderBy,t.limit,r,t.optimizedOnly);if(l===void 0)return;const o=[];for(const u of l){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}if(!t.where)return i();try{const r=t.where,l=C_(r,n);if(l.canOptimize){const o=[];for(const u of l.matchingKeys){const d=n.get(u);d!==void 0&&o.push({type:`insert`,key:u,value:d})}return o}else{if(t.optimizedOnly)return;const o=tl(r);return i(o)}}catch(r){console.warn(`${n.id?`[${n.id}] `:``}Error processing where clause, falling back to full scan:`,r);const l=tl(t.where);return t.optimizedOnly?void 0:i(l)}}function tl(n){const t=$v(n);return i=>{try{const r=t(i);return Tr(r)}catch{return!1}}}function XT(n,t){const i=tl(t.whereExpression);return r=>{const l=[];for(const o of r)if(o.type===`insert`)i(o.value)&&l.push(o);else if(o.type===`update`){const u=i(o.value),d=o.previousValue?i(o.previousValue):!1;u&&d?l.push(o):u&&!d?l.push({...o,type:`insert`}):!u&&d&&l.push({...o,type:`delete`,value:o.previousValue})}else i(o.value)&&l.push(o);(l.length>0||r.length===0)&&n(l)}}function JT(n,t,i,r,l){if(t.length===1){const p=t[0],g=p.expression;if(g.type===`ref`){const y=g.path,v=wd(p,n);$c(y[0],y,n,v);const b=El(n,y,v);if(b&&b.supports(`gt`)){const w=E=>{const T=n.get(E);return T===void 0?!1:r?.(T)??!0};return b.takeFromStart(i??b.keyCount,w)}}}if(l)return;const o=[];for(const[p,g]of n.entries())(r?.(g)??!0)&&o.push({key:p,value:g});const u=(p,g)=>{for(const m of t){const y=Wa(m.compareOptions),v=TS(p.value,m.expression),b=TS(g.value,m.expression),w=y(v,b);if(w!==0)return w}return 0};o.sort(u);const d=o.map(p=>p.key);return i!==void 0?d.slice(0,i):d}function TS(n,t){if(t.type===`ref`){const i=t;let r=n;for(const l of i.path)r=r?.[l];return r}else return t.type===`val`?t.value:$v(t)(n)}class AS{constructor(t){this.map=new Map,this.sortedKeys=[],this.comparator=t}indexOf(t,i){let r=0,l=this.sortedKeys.length;if(!this.comparator){for(;r0)r=o+1;else return o}return r}for(;r0)r=o+1;else{const g=yd(t,u);if(g<0)l=o;else if(g>0)r=o+1;else return o}}return r}set(t,i){if(this.map.has(t)){const l=this.map.get(t),o=this.indexOf(t,l);this.sortedKeys.splice(o,1)}const r=this.indexOf(t,i);return this.sortedKeys.splice(r,0,t),this.map.set(t,i),this}get(t){return this.map.get(t)}delete(t){if(this.map.has(t)){const i=this.map.get(t),r=this.indexOf(t,i);return this.sortedKeys.splice(r,1),this.map.delete(t)}return!1}has(t){return this.map.has(t)}clear(){this.map.clear(),this.sortedKeys=[]}get size(){return this.map.size}*[Symbol.iterator](){for(const t of this.sortedKeys)yield[t,this.map.get(t)]}entries(){return this[Symbol.iterator]()}keys(){return this.sortedKeys[Symbol.iterator]()}values(){return(function*(){for(const t of this.sortedKeys)yield this.map.get(t)}).call(this)}forEach(t){for(const i of this.sortedKeys)t(this.map.get(i),i,this.map)}}const ac=`__tanstack_db_direct`;class ZT{constructor(t){this.pendingSyncedTransactions=[],this.syncedMetadata=new Map,this.syncedCollectionMetadata=new Map,this.optimisticUpserts=new Map,this.optimisticDeletes=new Set,this.pendingOptimisticUpserts=new Map,this.pendingOptimisticDeletes=new Set,this.pendingOptimisticDirectUpserts=new Set,this.pendingOptimisticDirectDeletes=new Set,this.rowOrigins=new Map,this.pendingLocalChanges=new Set,this.pendingLocalOrigins=new Set,this.virtualPropsCache=new WeakMap,this.size=0,this.syncedKeys=new Set,this.preSyncVisibleState=new Map,this.recentlySyncedKeys=new Set,this.hasReceivedFirstCommit=!1,this.isCommittingSyncTransactions=!1,this.isLocalOnly=!1,this.commitPendingTransactions=()=>{let i=!1;for(const d of this.transactions.values())if(d.state===`persisting`){i=!0;break}const{committedSyncedTransactions:r,uncommittedSyncedTransactions:l,hasTruncateSync:o,hasImmediateSync:u}=this.pendingSyncedTransactions.reduce((d,p)=>(p.committed?(d.committedSyncedTransactions.push(p),p.truncate&&(d.hasTruncateSync=!0),p.immediate&&(d.hasImmediateSync=!0)):d.uncommittedSyncedTransactions.push(p),d),{committedSyncedTransactions:[],uncommittedSyncedTransactions:[],hasTruncateSync:!1,hasImmediateSync:!1});if(!i||o||u){this.isCommittingSyncTransactions=!0;const d=new Map(this.rowOrigins),p=new Map(this.optimisticUpserts),g=new Set(this.optimisticDeletes),m=o?r.find(M=>M.truncate)?.optimisticSnapshot:null;let y,v;const b=new Set;for(const M of r){for(const R of M.operations)b.add(R.key);for(const[R]of M.rowMetadataWrites)b.add(R)}let w=this.preSyncVisibleState;if(w.size===0){w=new Map;for(const M of b){const R=this.get(M);R!==void 0&&w.set(M,R)}}const E=[],T=this.config.sync.rowUpdateMode||`partial`,N=new Map;for(const M of this.transactions.values())if(M.state===`completed`)for(const R of M.mutations)this.isThisCollection(R.collection)&&R.optimistic&&N.set(R.key,{type:R.type,value:R.modified});for(const M of r){if(M.truncate){const R=new Set([...this.syncedData.keys(),...m?.upserts.keys()||[]]);for(const A of R){if(m?.deletes.has(A))continue;const V=m?.upserts.get(A)||this.syncedData.get(A);V!==void 0&&E.push({type:`delete`,key:A,value:V})}y=new Set(this.pendingLocalChanges),v=new Set(this.pendingLocalOrigins),this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedKeys.clear(),this.clearOriginTrackingState();for(const A of b)w.delete(A);this._events.emit(`truncate`,{type:`truncate`,collection:this.collection})}for(const R of M.operations){const A=R.key;this.syncedKeys.add(A);const V=this.isLocalOnly||this.pendingLocalChanges.has(A)||this.pendingLocalOrigins.has(A)||y?.has(A)===!0||v?.has(A)===!0?`local`:`remote`;switch(R.type){case`insert`:this.syncedData.set(A,R.value),this.rowOrigins.set(A,V),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break;case`update`:{if(T===`partial`){const I=Object.assign({},this.syncedData.get(A),R.value);this.syncedData.set(A,I)}else this.syncedData.set(A,R.value);this.rowOrigins.set(A,V),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break}case`delete`:this.syncedData.delete(A),this.syncedMetadata.delete(A),this.rowOrigins.delete(A),this.pendingLocalChanges.delete(A),this.pendingLocalOrigins.delete(A),this.pendingOptimisticUpserts.delete(A),this.pendingOptimisticDeletes.delete(A),this.pendingOptimisticDirectUpserts.delete(A),this.pendingOptimisticDirectDeletes.delete(A);break}}for(const[R,A]of M.rowMetadataWrites){if(A.type===`delete`){this.syncedMetadata.delete(R);continue}this.syncedMetadata.set(R,A.value)}for(const[R,A]of M.collectionMetadataWrites){if(A.type===`delete`){this.syncedCollectionMetadata.delete(R);continue}this.syncedCollectionMetadata.set(R,A.value)}}if(o){const M=new Set;for(const V of r)for(const I of V.operations)(I.type===`insert`||I.type===`update`)&&M.add(I.key);const R=new Map(m.upserts),A=new Set(m.deletes);for(const[V,I]of R)if(!A.has(V))if(M.has(V)){let H=!1;for(let W=E.length-1;W>=0;W--){const tt=E[W];if(tt.key===V&&tt.type===`insert`){tt.value=I,H=!0;break}}H||E.push({type:`insert`,key:V,value:I})}else E.push({type:`insert`,key:V,value:I});if(E.length>0&&A.size>0){const V=[];for(const I of E)I.type===`insert`&&A.has(I.key)||V.push(I);E.length=0,E.push(...V)}this.lifecycle.status!==`ready`&&this.lifecycle.markReady()}if(this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.isCommittingSyncTransactions=!1,o&&m){for(const[M,R]of m.upserts)this.optimisticUpserts.set(M,R);for(const M of m.deletes)this.optimisticDeletes.add(M)}for(const M of this.transactions.values())if(![`completed`,`failed`].includes(M.state)){for(const R of M.mutations)if(this.isThisCollection(R.collection)&&R.optimistic)switch(R.type){case`insert`:case`update`:this.optimisticUpserts.set(R.key,R.modified),this.optimisticDeletes.delete(R.key);break;case`delete`:this.optimisticUpserts.delete(R.key),this.optimisticDeletes.add(R.key);break}}for(const M of b){const R=w.get(M),A=this.get(M),V=this.getVirtualPropsSnapshotForState(M,{rowOrigins:d,optimisticUpserts:p,optimisticDeletes:g,completedOptimisticKeys:N}),I=this.getVirtualPropsSnapshotForState(M),H=V.$synced!==I.$synced||V.$origin!==I.$origin,W=R!==void 0?dS(R,M,this.collection.id,()=>V.$synced,()=>V.$origin):void 0,tt=N.get(M);let X=!1;tt&&(tt.type===`delete`&&R!==void 0&&A===void 0&&Hn(tt.value,R)||A!==void 0&&Hn(tt.value,A))&&(X=!0);const at=H&&R!==void 0&&A!==void 0&&Hn(R,A);if(!(X&&!at))if(R===void 0&&A!==void 0){const nt=N.get(M);if(nt){const wt=nt.value,Lt=dS(wt,M,this.collection.id,()=>V.$synced,()=>V.$origin);E.push({type:`update`,key:M,value:A,previousValue:Lt})}else E.push({type:`insert`,key:M,value:A})}else R!==void 0&&A===void 0?E.push({type:`delete`,key:M,value:W??R}):R!==void 0&&A!==void 0&&(!Hn(R,A)||at)&&E.push({type:`update`,key:M,value:A,previousValue:W??R})}this.size=this.calculateSize(),E.length>0&&this.indexes.updateIndexes(E),this.changes.emitEvents(E,!0),this.pendingSyncedTransactions=l,this.preSyncVisibleState.clear(),Promise.resolve().then(()=>{this.recentlySyncedKeys.clear()}),this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0)}},this.config=t,this.transactions=new AS((i,r)=>i.compareCreatedAt(r)),this.syncedData=new AS(t.compare)}setDeps(t){this.collection=t.collection,this.lifecycle=t.lifecycle,this.changes=t.changes,this.indexes=t.indexes,this._events=t.events}isRowSynced(t){return this.isLocalOnly?!0:!this.optimisticUpserts.has(t)&&!this.optimisticDeletes.has(t)}getRowOrigin(t){return this.isLocalOnly||this.optimisticUpserts.has(t)||this.optimisticDeletes.has(t)?`local`:this.rowOrigins.get(t)??`remote`}createVirtualPropsSnapshot(t,i){return{$synced:i?.$synced??this.isRowSynced(t),$origin:i?.$origin??this.getRowOrigin(t),$key:i?.$key??t,$collectionId:i?.$collectionId??this.collection.id}}getVirtualPropsSnapshotForState(t,i){if(this.isLocalOnly)return this.createVirtualPropsSnapshot(t,{$synced:!0,$origin:`local`});const r=i?.optimisticUpserts??this.optimisticUpserts,l=i?.optimisticDeletes??this.optimisticDeletes,o=r.has(t)||l.has(t)||i?.completedOptimisticKeys?.has(t)===!0;return this.createVirtualPropsSnapshot(t,{$synced:!o,$origin:o?`local`:(i?.rowOrigins??this.rowOrigins).get(t)??`remote`})}enrichWithVirtualPropsSnapshot(t,i){const r=t,l=r.$synced??i.$synced,o=r.$origin??i.$origin,u=r.$key??i.$key,d=r.$collectionId??i.$collectionId,p=this.virtualPropsCache.get(t);if(p&&p.synced===l&&p.origin===o&&p.key===u&&p.collectionId===d)return p.enriched;const g={...t,$synced:l,$origin:o,$key:u,$collectionId:d};return this.virtualPropsCache.set(t,{synced:l,origin:o,key:u,collectionId:d,enriched:g}),g}clearOriginTrackingState(){this.rowOrigins.clear(),this.pendingLocalChanges.clear(),this.pendingLocalOrigins.clear()}enrichWithVirtualProps(t,i){return this.enrichWithVirtualPropsSnapshot(t,this.createVirtualPropsSnapshot(i))}enrichChangeMessage(t){const{__virtualProps:i}=t,r=i?.value?this.enrichWithVirtualPropsSnapshot(t.value,i.value):this.enrichWithVirtualProps(t.value,t.key),l=t.previousValue?i?.previousValue?this.enrichWithVirtualPropsSnapshot(t.previousValue,i.previousValue):this.enrichWithVirtualProps(t.previousValue,t.key):void 0;return{key:t.key,type:t.type,value:r,previousValue:l,metadata:t.metadata}}getWithVirtualProps(t){const i=this.get(t);if(i!==void 0)return this.enrichWithVirtualProps(i,t)}get(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;if(!i.has(t))return r.has(t)?r.get(t):l.get(t)}has(t){const{optimisticDeletes:i,optimisticUpserts:r,syncedData:l}=this;return i.has(t)?!1:r.has(t)?!0:l.has(t)}*keys(){const{syncedData:t,optimisticDeletes:i,optimisticUpserts:r}=this;for(const l of t.keys())i.has(l)||(yield l);for(const l of r.keys())!t.has(l)&&!i.has(l)&&(yield l)}*values(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){for(const[t,i]of this.entries())yield[t,i]}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}isThisCollection(t){return t===this.collection}recomputeOptimisticState(t=!1){if(this.isCommittingSyncTransactions&&!t)return;const i=new Map(this.optimisticUpserts),r=new Set(this.optimisticDeletes),l=new Map(this.rowOrigins);for(const y of this.transactions.values()){const v=y.metadata[ac]===!0;if(y.state===`completed`){for(const b of y.mutations)if(this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.add(b.key),!!b.optimistic))switch(b.type){case`insert`:case`update`:this.pendingOptimisticUpserts.set(b.key,b.modified),this.pendingOptimisticDeletes.delete(b.key),v?(this.pendingOptimisticDirectUpserts.add(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break;case`delete`:this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.add(b.key),v?(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.add(b.key)):(this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key));break}}else if(y.state===`failed`)for(const b of y.mutations)this.isThisCollection(b.collection)&&(this.pendingLocalOrigins.delete(b.key),b.optimistic&&(this.pendingOptimisticUpserts.delete(b.key),this.pendingOptimisticDeletes.delete(b.key),this.pendingOptimisticDirectUpserts.delete(b.key),this.pendingOptimisticDirectDeletes.delete(b.key)))}this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingLocalChanges.clear();const o=new Set;for(const y of this.pendingSyncedTransactions)for(const v of y.operations)o.add(v.key);const u=[];for(const[y,v]of this.pendingOptimisticUpserts)o.has(y)||this.pendingOptimisticDirectUpserts.has(y)?this.optimisticUpserts.set(y,v):u.push(y);for(const y of u)this.pendingOptimisticUpserts.delete(y),this.pendingLocalOrigins.delete(y);const d=[];for(const y of this.pendingOptimisticDeletes)o.has(y)||this.pendingOptimisticDirectDeletes.has(y)?this.optimisticDeletes.add(y):d.push(y);for(const y of d)this.pendingOptimisticDeletes.delete(y),this.pendingLocalOrigins.delete(y);const p=[];for(const y of this.transactions.values())[`completed`,`failed`].includes(y.state)||p.push(y);for(const y of p)for(const v of y.mutations)if(this.isThisCollection(v.collection)&&(this.pendingLocalChanges.add(v.key),v.optimistic))switch(v.type){case`insert`:case`update`:this.optimisticUpserts.set(v.key,v.modified),this.optimisticDeletes.delete(v.key);break;case`delete`:this.optimisticUpserts.delete(v.key),this.optimisticDeletes.add(v.key);break}this.size=this.calculateSize();const g=[];this.collectOptimisticChanges(i,r,l,g);const m=g.filter(y=>!!(!this.recentlySyncedKeys.has(y.key)||t));if(this.pendingSyncedTransactions.length>0&&!t){const y=new Set;for(const b of this.pendingSyncedTransactions)for(const w of b.operations)y.add(w.key);const v=m.filter(b=>!(b.type===`delete`&&y.has(b.key)&&!p.some(E=>E.mutations.some(T=>this.isThisCollection(T.collection)&&T.key===b.key))));v.length>0&&this.indexes.updateIndexes(v),this.changes.emitEvents(v,t)}else m.length>0&&this.indexes.updateIndexes(m),this.changes.emitEvents(m,t)}calculateSize(){const t=this.syncedData.size,i=Array.from(this.optimisticDeletes).filter(l=>this.syncedData.has(l)&&!this.optimisticUpserts.has(l)).length,r=Array.from(this.optimisticUpserts.keys()).filter(l=>!this.syncedData.has(l)).length;return t-i+r}collectOptimisticChanges(t,i,r,l){const o=new Set([...t.keys(),...this.optimisticUpserts.keys(),...i,...this.optimisticDeletes]);for(const u of o){const d=this.get(u),p=this.getPreviousValue(u,t,i),g=this.getVirtualPropsSnapshotForState(u,{rowOrigins:r,optimisticUpserts:t,optimisticDeletes:i}),m=this.getVirtualPropsSnapshotForState(u);p!==void 0&&d===void 0?l.push({type:`delete`,key:u,value:p,__virtualProps:{value:g}}):p===void 0&&d!==void 0?l.push({type:`insert`,key:u,value:d,__virtualProps:{value:m}}):p!==void 0&&d!==void 0&&p!==d&&l.push({type:`update`,key:u,value:d,previousValue:p,__virtualProps:{value:m,previousValue:g}})}}getPreviousValue(t,i,r){if(!r.has(t))return i.has(t)?i.get(t):this.syncedData.get(t)}scheduleTransactionCleanup(t){if(t.state===`completed`){this.transactions.delete(t.id);return}t.isPersisted.promise.then(()=>{this.transactions.delete(t.id)}).catch(()=>{})}capturePreSyncVisibleState(){if(this.pendingSyncedTransactions.length===0)return;const t=new Set;for(const i of this.pendingSyncedTransactions)for(const r of i.operations)t.add(r.key);for(const i of t)this.recentlySyncedKeys.add(i);for(const i of t)if(!this.preSyncVisibleState.has(i)){const r=this.get(i);r!==void 0&&this.preSyncVisibleState.set(i,r)}}onTransactionStateChange(){this.changes.shouldBatchEvents=this.pendingSyncedTransactions.length>0,this.capturePreSyncVisibleState(),this.recomputeOptimisticState(!1)}cleanup(){this.syncedData.clear(),this.syncedMetadata.clear(),this.syncedCollectionMetadata.clear(),this.optimisticUpserts.clear(),this.optimisticDeletes.clear(),this.pendingOptimisticUpserts.clear(),this.pendingOptimisticDeletes.clear(),this.pendingOptimisticDirectUpserts.clear(),this.pendingOptimisticDirectDeletes.clear(),this.clearOriginTrackingState(),this.isLocalOnly=!1,this.size=0,this.pendingSyncedTransactions=[],this.syncedKeys.clear(),this.hasReceivedFirstCommit=!1}}function sw(){const n=new Map;function t(i){const r=i.join(`.`);if(n.has(r))return n.get(r);const l=new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return i;if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=[...i,String(u)];return t(p)},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?!0:Reflect.has(o,u)},ownKeys(o){return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,u){return u===`__refProxy`||u===`__path`||u===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(o,u)}});return n.set(r,l),l}return t([])}function wi(n){const t=new Map;let i=0;function r(o){const u=o.join(`.`);if(t.has(u))return t.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return o;if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){const g=++i,m=`__SPREAD_SENTINEL__${o.join(`.`)}__${g}`;return Object.prototype.hasOwnProperty.call(p,m)||Object.defineProperty(p,m,{enumerable:!0,configurable:!0,value:!0}),Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return t.set(u,d),d}return new Proxy({},{get(o,u,d){if(u===`__refProxy`)return!0;if(u===`__path`)return[];if(u===`__type`)return;if(typeof u==`symbol`)return Reflect.get(o,u,d);const p=String(u);if(n.includes(p))return r([p])},has(o,u){return u===`__refProxy`||u===`__path`||u===`__type`||typeof u==`string`&&n.includes(u)?!0:Reflect.has(o,u)},ownKeys(o){return[...n,`__refProxy`,`__path`,`__type`]},getOwnPropertyDescriptor(o,u){if(u===`__refProxy`||u===`__path`||u===`__type`)return{enumerable:!1,configurable:!0};if(typeof u==`string`&&n.includes(u))return{enumerable:!0,configurable:!0}}})}function OS(n){const t=wi(n),i=new Map;function r(o){const u=o.join(`.`);if(i.has(u))return i.get(u);const d=new Proxy({},{get(p,g,m){if(g===`__refProxy`)return!0;if(g===`__path`)return[`$selected`,...o];if(g===`__type`)return;if(typeof g==`symbol`)return Reflect.get(p,g,m);const y=[...o,String(g)];return r(y)},has(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?!0:Reflect.has(p,g)},ownKeys(p){return Reflect.ownKeys(p)},getOwnPropertyDescriptor(p,g){return g===`__refProxy`||g===`__path`||g===`__type`?{enumerable:!1,configurable:!0}:Reflect.getOwnPropertyDescriptor(p,g)}});return i.set(u,d),d}const l=r([]);return new Proxy(t,{get(o,u,d){return u===`$selected`?l:Reflect.get(o,u,d)},has(o,u){return u===`$selected`?!0:Reflect.has(o,u)},ownKeys(o){return[...Reflect.ownKeys(o),`$selected`]},getOwnPropertyDescriptor(o,u){return u===`$selected`?{enumerable:!0,configurable:!0,value:l}:Reflect.getOwnPropertyDescriptor(o,u)}})}function se(n){return lc(n)?new Oe(n.__path):n&&typeof n==`object`&&`type`in n&&(n.type===`func`||n.type===`ref`||n.type===`val`||n.type===`agg`)?n:new ke(n)}function lc(n){return n&&typeof n==`object`&&n.__refProxy===!0}function bd(n,t){return new Ve(`eq`,[se(n),se(t)])}function RS(n,t){return new Ve(`gt`,[se(n),se(t)])}function WT(n,t){return new Ve(`gte`,[se(n),se(t)])}function Ed(n,t){return new Ve(`lt`,[se(n),se(t)])}function Cd(n,t,...i){const r=[n,t,...i];return new Ve(`and`,r.map(l=>se(l)))}function PT(n,t,...i){const r=[n,t,...i];return new Ve(`or`,r.map(l=>se(l)))}function tA(n,t){return new Ve(`in`,[se(n),se(t)])}class eA{constructor(t){this.query=t}}class nA{constructor(t){this.query=t}}class iw{constructor(){this.listeners=new Map}on(t,i){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(i),()=>{this.listeners.get(t)?.delete(i)}}once(t,i){const r=this.on(t,l=>{i(l),r()});return r}off(t,i){this.listeners.get(t)?.delete(i)}waitFor(t,i){return new Promise((r,l)=>{let o;const u=this.on(t,d=>{o&&(clearTimeout(o),o=void 0),r(d),u()});i&&(o=setTimeout(()=>{o=void 0,u(),l(new Error(`Timeout waiting for event ${String(t)}`))},i))})}emitInner(t,i){this.listeners.get(t)?.forEach(r=>{try{r(i)}catch(l){queueMicrotask(()=>{throw l})}})}clearListeners(){this.listeners.clear()}}function sA(n,t){if(t.length===0||n.length===0)return;if(n.length===1){const{expression:r,compareOptions:l}=n[0];return(l.direction===`asc`?RS:Ed)(r,new ke(t[0]))}const i=[];for(let r=0;rCd(m,y)))}}return i.length===1?i[0]:i.reduce((r,l)=>PT(r,l))}class iA extends iw{constructor(t,i,r){super(),this.collection=t,this.callback=i,this.options=r,this.loadedInitialState=!1,this.skipFiltering=!1,this.snapshotSent=!1,this.loadedSubsets=[],this.sentKeys=new Set,this.limitedSnapshotRowCount=0,this._status=`ready`,this.pendingLoadSubsetPromises=new Set,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches=new Set,r.onUnsubscribe&&this.on(`unsubscribed`,o=>r.onUnsubscribe(o)),r.whereExpression&&R_(r.whereExpression,this.collection);const l=o=>{i(o),this.trackSentKeys(o)};this.callback=l,this.filteredCallback=r.whereExpression?XT(this.callback,r):this.callback,this.truncateCleanup=this.collection.on(`truncate`,()=>{this.handleTruncate()})}get status(){return this._status}handleTruncate(){const t=[...this.loadedSubsets],i=this.collection._sync.syncLoadSubsetFn!==null;if(t.length===0||!i){this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[];return}this.isBufferingForTruncate=!0,this.truncateBuffer=[],this.pendingTruncateRefetches.clear(),this.snapshotSent=!1,this.loadedInitialState=!1,this.limitedSnapshotRowCount=0,this.lastSentKey=void 0,this.loadedSubsets=[],queueMicrotask(()=>{if(this.isBufferingForTruncate){for(const r of t){const l=this.collection._sync.loadSubset(r);this.loadedSubsets.push(r),this.trackLoadSubsetPromise(l),l instanceof Promise&&(this.pendingTruncateRefetches.add(l),l.catch(()=>{}).finally(()=>{this.pendingTruncateRefetches.delete(l),this.checkTruncateRefetchComplete()}))}this.pendingTruncateRefetches.size===0&&this.flushTruncateBuffer()}})}checkTruncateRefetchComplete(){this.pendingTruncateRefetches.size===0&&this.isBufferingForTruncate&&this.flushTruncateBuffer()}flushTruncateBuffer(){this.isBufferingForTruncate=!1;const t=this.truncateBuffer.flat();t.length>0&&this.filteredCallback(t),this.truncateBuffer=[]}setOrderByIndex(t){this.orderByIndex=t}hasOrderByIndex(){return this.orderByIndex!==void 0}setStatus(t){if(this._status===t)return;const i=this._status;this._status=t,this.emitInner(`status:change`,{type:`status:change`,subscription:this,previousStatus:i,status:t});const r=`status:${t}`;this.emitInner(r,{type:r,subscription:this,previousStatus:i,status:t})}trackLoadSubsetPromise(t){t instanceof Promise&&(this.pendingLoadSubsetPromises.add(t),this.setStatus(`loadingSubset`),t.finally(()=>{this.pendingLoadSubsetPromises.delete(t),this.pendingLoadSubsetPromises.size===0&&this.setStatus(`ready`)}))}hasLoadedInitialState(){return this.loadedInitialState}hasSentAtLeastOneSnapshot(){return this.snapshotSent}emitEvents(t){const i=this.filterAndFlipChanges(t);this.isBufferingForTruncate?i.length>0&&this.truncateBuffer.push(i):this.filteredCallback(i)}requestSnapshot(t){if(this.loadedInitialState)return!1;const i={where:this.options.whereExpression,optimizedOnly:t?.optimizedOnly??!1};if(t){if(`where`in t){const p=t.where;if(i.where){const g=i.where,m=Cd(g,p);i.where=m}else i.where=p}}else this.loadedInitialState=!0;const r={where:i.where,subscription:this,orderBy:t?.orderBy,limit:t?.limit},l=this.collection._sync.loadSubset(r);t?.onLoadSubsetResult?.(l),this.loadedSubsets.push(r),(t?.trackLoadSubsetPromise??!0)&&this.trackLoadSubsetPromise(l);const u=this.collection.currentStateAsChanges(i);if(u===void 0)return!1;const d=u.filter(p=>!this.sentKeys.has(p.key));for(const p of d)this.sentKeys.add(p.key);return this.snapshotSent=!0,this.callback(d),!0}requestLimitedSnapshot({orderBy:t,limit:i,minValues:r,offset:l,trackLoadSubsetPromise:o=!0,onLoadSubsetResult:u}){if(!i)throw new Error(`limit is required`);if(!this.orderByIndex)throw new Error(`Ordered snapshot was requested but no index was found. You have to call setOrderByIndex before requesting an ordered snapshot.`);const d=r!==void 0&&r.length>0,g=r?.[0],m=this.orderByIndex,y=this.options.whereExpression,v=y?tl(y):void 0,b=tt=>{if(tt!==void 0&&this.sentKeys.has(tt))return!1;const X=this.collection.get(tt);return X===void 0?!1:v?.(X)??!0};let w=g;const E=[];let T=[];if(d){const{expression:tt}=t[0],X=this.collection.currentStateAsChanges({where:bd(tt,new ke(g))});if(X){const at=X.map(wt=>wt.key).filter(wt=>!this.sentKeys.has(wt)&&b(wt));T.push(...at);const nt=m.take(i-T.length,g,b);T.push(...nt)}else T=m.take(i,g,b)}else T=m.takeFromStart(i,b);const N=()=>Math.max(i-E.length,0),M=()=>T.length===0,R=t[0].expression,A=R.type===`ref`?fe(new Oe(R.path),!0):null;for(;N()>0&&!M();){const tt=new Set;for(const X of T){const at=this.collection.get(X);E.push({type:`insert`,key:X,value:at}),w=A?A(at):at,tt.add(X)}T=m.take(N(),w,b)}const V=this.limitedSnapshotRowCount;for(const tt of E)this.sentKeys.add(tt.key);this.callback(E),this.limitedSnapshotRowCount+=E.length,E.length>0&&(this.lastSentKey=E[E.length-1].key);let I;if(r!==void 0&&r.length>0){const tt=sA(t,r);if(tt){const{expression:X}=t[0],at=r[0];let nt;if(at instanceof Date){const wt=new Date(at.getTime()+1);nt=Cd(WT(X,new ke(at)),Ed(X,new ke(wt)))}else nt=bd(X,new ke(at));I={whereFrom:tt,whereCurrent:nt,lastKey:this.lastSentKey}}}const H={where:y,limit:i,orderBy:t,cursor:I,offset:l??V,subscription:this},W=this.collection._sync.loadSubset(H);u?.(W),this.loadedSubsets.push(H),o&&this.trackLoadSubsetPromise(W)}filterAndFlipChanges(t){if(this.loadedInitialState||this.skipFiltering)return t;const i=this.isBufferingForTruncate,r=[];for(const l of t){let o=l;if(this.sentKeys.has(l.key)){if(l.type===`insert`)continue;l.type===`delete`&&this.sentKeys.delete(l.key)}else{if(l.type===`update`)o={...l,type:`insert`,previousValue:void 0};else if(l.type===`delete`&&!i)continue;this.sentKeys.add(l.key)}r.push(o)}return r}trackSentKeys(t){if(!(this.loadedInitialState||this.skipFiltering)){for(const i of t)i.type===`delete`?this.sentKeys.delete(i.key):this.sentKeys.add(i.key);this.orderByIndex&&(this.limitedSnapshotRowCount=Math.max(this.limitedSnapshotRowCount,this.sentKeys.size))}}markAllStateAsSeen(){this.skipFiltering=!0}unsubscribe(){this.truncateCleanup?.(),this.truncateCleanup=void 0,this.isBufferingForTruncate=!1,this.truncateBuffer=[],this.pendingTruncateRefetches.clear();for(const t of this.loadedSubsets)this.collection._sync.unloadSubset(t);this.loadedSubsets=[],this.emitInner(`unsubscribed`,{type:`unsubscribed`,subscription:this}),this.clearListeners()}}class rA{constructor(){this.activeSubscribersCount=0,this.changeSubscriptions=new Set,this.batchedEvents=[],this.shouldBatchEvents=!1}setDeps(t){this.lifecycle=t.lifecycle,this.sync=t.sync,this.events=t.events,this.collection=t.collection,this.state=t.state}emitEmptyReadyEvent(){for(const t of this.changeSubscriptions)t.emitEvents([])}enrichChangeWithVirtualProps(t){return this.state.enrichChangeMessage(t)}emitEvents(t,i=!1){if(this.shouldBatchEvents&&!i){this.batchedEvents.push(...t);return}let r=t;if(i&&(this.batchedEvents.length>0&&(r=[...this.batchedEvents,...t]),this.batchedEvents=[],this.shouldBatchEvents=!1),r.length===0)return;const l=r.map(o=>this.enrichChangeWithVirtualProps(o));for(const o of this.changeSubscriptions)o.emitEvents(l)}subscribeChanges(t,i={}){if(this.addSubscriber(),i.where&&i.whereExpression)throw new Error(`Cannot specify both 'where' and 'whereExpression' options. Use one or the other.`);const{where:r,...l}=i;let o=l.whereExpression;if(r){const d=sw(),p=r(d);o=se(p)}const u=new iA(this.collection,t,{...l,whereExpression:o,onUnsubscribe:()=>{this.removeSubscriber(),this.changeSubscriptions.delete(u)}});return i.onStatusChange&&u.on(`status:change`,i.onStatusChange),i.includeInitialState?u.requestSnapshot({trackLoadSubsetPromise:!1,orderBy:i.orderBy,limit:i.limit,onLoadSubsetResult:i.onLoadSubsetResult}):i.includeInitialState===!1&&u.markAllStateAsSeen(),this.changeSubscriptions.add(u),u}addSubscriber(){const t=this.activeSubscribersCount;this.activeSubscribersCount++,this.lifecycle.cancelGCTimer(),(this.lifecycle.status===`cleaned-up`||this.lifecycle.status===`idle`)&&this.sync.startSync(),this.events.emitSubscribersChange(this.activeSubscribersCount,t)}removeSubscriber(){const t=this.activeSubscribersCount;if(this.activeSubscribersCount--,this.activeSubscribersCount===0)this.lifecycle.startGCTimer();else if(this.activeSubscribersCount<0)throw new ux;this.events.emitSubscribersChange(this.activeSubscribersCount,t)}cleanup(){this.batchedEvents=[],this.shouldBatchEvents=!1}}const aA=n=>setTimeout(()=>{n({didTimeout:!0,timeRemaining:()=>50})},0),lA=n=>{clearTimeout(n)},oA=typeof window<`u`&&`requestIdleCallback`in window?(n,t)=>window.requestIdleCallback(n,t):(n,t)=>aA(n),Vh=typeof window<`u`&&`cancelIdleCallback`in window?n=>window.cancelIdleCallback(n):lA,rw=class ds{constructor(){this.tasks=new Map,this.timeoutId=null,this.microtaskScheduled=!1}static getInstance(){return ds.instance||(ds.instance=new ds),ds.instance}schedule(t,i,r){const l=Date.now()+i;this.tasks.set(t,{executeAt:l,callback:r}),this.microtaskScheduled||(this.microtaskScheduled=!0,Promise.resolve().then(()=>{this.microtaskScheduled=!1,this.updateTimeout()}))}cancel(t){this.tasks.delete(t)}updateTimeout(){if(this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.tasks.size===0)return;let t=1/0;for(const r of this.tasks.values())r.executeAtthis.process(),i)}process(){this.timeoutId=null;const t=Date.now();for(const[i,r]of this.tasks.entries())if(t>=r.executeAt){this.tasks.delete(i);try{r.callback()}catch(l){console.error(`Error in CleanupQueue task:`,l)}}this.tasks.size>0&&this.updateTimeout()}static resetInstance(){ds.instance&&(ds.instance.timeoutId!==null&&clearTimeout(ds.instance.timeoutId),ds.instance=null)}};rw.instance=null;let $h=rw;class cA{constructor(t,i){this.status=`idle`,this.hasBeenReady=!1,this.hasReceivedFirstCommit=!1,this.onFirstReadyCallbacks=[],this.idleCallbackId=null,this.config=t,this.id=i}setDeps(t){this.indexes=t.indexes,this.events=t.events,this.changes=t.changes,this.sync=t.sync,this.state=t.state}validateStatusTransition(t,i){if(t===i)return;if(!{idle:[`loading`,`error`,`cleaned-up`],loading:[`ready`,`error`,`cleaned-up`],ready:[`cleaned-up`,`error`],error:[`cleaned-up`,`idle`],"cleaned-up":[`loading`,`error`]}[t].includes(i))throw new ox(t,i,this.id)}setStatus(t,i=!1){if(t===`ready`&&!i)throw new bl(`You can't directly call "setStatus('ready'). You must use markReady instead.`);this.validateStatusTransition(this.status,t);const r=this.status;this.status=t,this.events.emitStatusChange(t,r)}validateCollectionUsable(t){switch(this.status){case`error`:throw new lx(t,this.id);case`cleaned-up`:this.sync.startSync();break}}markReady(){if(this.validateStatusTransition(this.status,`ready`),this.status===`loading`){if(this.setStatus(`ready`,!0),!this.hasBeenReady){this.hasBeenReady=!0,this.hasReceivedFirstCommit||(this.hasReceivedFirstCommit=!0);const t=[...this.onFirstReadyCallbacks];this.onFirstReadyCallbacks=[],t.forEach(i=>i())}this.changes.changeSubscriptions.size>0&&this.changes.emitEmptyReadyEvent()}}startGCTimer(){const t=this.config.gcTime??3e5;t<=0||!Number.isFinite(t)||$h.getInstance().schedule(this,t,()=>{this.changes.activeSubscribersCount===0&&this.scheduleIdleCleanup()})}cancelGCTimer(){$h.getInstance().cancel(this),this.idleCallbackId!==null&&(Vh(this.idleCallbackId),this.idleCallbackId=null)}scheduleIdleCleanup(){this.idleCallbackId!==null&&Vh(this.idleCallbackId),this.idleCallbackId=oA(t=>{this.changes.activeSubscribersCount===0?this.performCleanup(t)&&(this.idleCallbackId=null):this.idleCallbackId=null},{timeout:1e3})}performCleanup(t){if(!t||t.timeRemaining()>0||t.didTimeout){this.sync.cleanup(),this.state.cleanup(),this.changes.cleanup(),this.indexes.cleanup(),$h.getInstance().cancel(this),this.hasBeenReady=!1;const r=[...this.onFirstReadyCallbacks];return this.onFirstReadyCallbacks=[],r.forEach(l=>{try{l()}catch(o){console.error(`${this.config.id?`[${this.config.id}] `:``}Error in onFirstReady callback during cleanup:`,o)}}),this.setStatus(`cleaned-up`),this.events.cleanup(),!0}else return this.scheduleIdleCleanup(),!1}onFirstReady(t){if(this.hasBeenReady){t();return}this.onFirstReadyCallbacks.push(t)}cleanup(){this.idleCallbackId!==null&&(Vh(this.idleCallbackId),this.idleCallbackId=null),this.performCleanup()}}const ap=Symbol(`liveQueryInternal`);class uA{constructor(t,i){this.preloadPromise=null,this.syncCleanupFn=null,this.syncLoadSubsetFn=null,this.syncUnloadSubsetFn=null,this.pendingLoadSubsetPromises=new Set,this.config=t,this.id=i,this.syncMode=t.syncMode??`eager`}setDeps(t){this.collection=t.collection,this.state=t.state,this.lifecycle=t.lifecycle,this._events=t.events}startSync(){if(!(this.lifecycle.status!==`idle`&&this.lifecycle.status!==`cleaned-up`)){this.lifecycle.setStatus(`loading`);try{const t=fA(this.config.sync.sync({collection:this.collection,begin:i=>{this.state.pendingSyncedTransactions.push({committed:!1,operations:[],deletedKeys:new Set,rowMetadataWrites:new Map,collectionMetadataWrites:new Map,immediate:i?.immediate})},write:i=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!r)throw new zh;if(r.committed)throw new jh;let l;`key`in i?l=i.key:l=this.config.getKey(i.value),this.state.pendingLocalChanges.has(l)&&this.state.pendingLocalOrigins.add(l);let o=i.type;if(i.type===`insert`){const d=this.state.syncedData.has(l),p=r.deletedKeys.has(l),g=r.truncate===!0;if(d&&!p&&!g){const m=this.state.syncedData.get(l);if(m!==void 0&&Hn(m,i.value))o=`update`;else{const b=this.config.utils[ap];throw new px(l,this.id,{hasCustomGetKey:b?.hasCustomGetKey??!1,hasJoins:b?.hasJoins??!1,hasDistinct:b?.hasDistinct??!1})}}}const u={...i,type:o,key:l};r.operations.push(u),o===`delete`?(r.deletedKeys.add(l),r.rowMetadataWrites.set(l,{type:`delete`})):o===`insert`?u.metadata!==void 0?r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata}):r.rowMetadataWrites.set(l,{type:`delete`}):u.metadata!==void 0&&r.rowMetadataWrites.set(l,{type:`set`,value:u.metadata})},commit:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new Rx;if(i.committed)throw new Dx;i.committed=!0,this.state.commitPendingTransactions()},markReady:()=>{this.lifecycle.markReady()},truncate:()=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!i)throw new zh;if(i.committed)throw new jh;i.operations=[],i.deletedKeys.clear(),i.rowMetadataWrites.clear(),i.truncate=!0,i.optimisticSnapshot={upserts:new Map(this.state.optimisticUpserts),deletes:new Set(this.state.optimisticDeletes)}},metadata:this.createSyncMetadataApi()}));if(this.syncCleanupFn=t?.cleanup??null,this.syncLoadSubsetFn=t?.loadSubset??null,this.syncUnloadSubsetFn=t?.unloadSubset??null,this.syncMode===`on-demand`&&!this.syncLoadSubsetFn)throw new Oi(`Collection "${this.id}" is configured with syncMode "on-demand" but the sync function did not return a loadSubset handler. Either provide a loadSubset handler or use syncMode "eager".`)}catch(t){throw this.lifecycle.setStatus(`error`),t}}}getActivePendingSyncTransaction(){const t=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(!t)throw new zh;if(t.committed)throw new jh;return t}createSyncMetadataApi(){return{row:{get:t=>{const i=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1],r=i?.rowMetadataWrites.get(t);if(r)return r.type===`delete`?void 0:r.value;if(!i?.truncate)return this.state.syncedMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().rowMetadataWrites.set(t,{type:`delete`})}},collection:{get:t=>{const r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1]?.collectionMetadataWrites.get(t);return r?r.type===`delete`?void 0:r.value:this.state.syncedCollectionMetadata.get(t)},set:(t,i)=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`set`,value:i})},delete:t=>{this.getActivePendingSyncTransaction().collectionMetadataWrites.set(t,{type:`delete`})},list:t=>{const i=new Map(this.state.syncedCollectionMetadata),r=this.state.pendingSyncedTransactions[this.state.pendingSyncedTransactions.length-1];if(r)for(const[l,o]of r.collectionMetadataWrites)o.type===`delete`?i.delete(l):i.set(l,o.value);return Array.from(i.entries()).filter(([l])=>t?l.startsWith(t):!0).map(([l,o])=>({key:l,value:o}))}}}}preload(){return this.preloadPromise?this.preloadPromise:(this.syncMode===`on-demand`&&console.warn(`${this.id?`[${this.id}] `:``}Calling .preload() on a collection with syncMode "on-demand" is a no-op. In on-demand mode, data is only loaded when queries request it. Instead, create a live query and call .preload() on that to load the specific data you need. See https://tanstack.com/blog/tanstack-db-0.5-query-driven-sync for more details.`),this.preloadPromise=new Promise((t,i)=>{if(this.lifecycle.status===`ready`){t();return}if(this.lifecycle.status===`error`){i(new cx);return}if(this.lifecycle.onFirstReady(()=>{t()}),this.lifecycle.status===`idle`||this.lifecycle.status===`cleaned-up`)try{this.startSync()}catch(r){i(r);return}}),this.preloadPromise)}get isLoadingSubset(){return this.pendingLoadSubsetPromises.size>0}trackLoadPromise(t){const i=!this.isLoadingSubset;this.pendingLoadSubsetPromises.add(t),i&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!0,previousIsLoadingSubset:!1,loadingSubsetTransition:`start`}),t.finally(()=>{const r=this.pendingLoadSubsetPromises.size===1&&this.pendingLoadSubsetPromises.has(t);this.pendingLoadSubsetPromises.delete(t),r&&this._events.emit(`loadingSubset:change`,{type:`loadingSubset:change`,collection:this.collection,isLoadingSubset:!1,previousIsLoadingSubset:!0,loadingSubsetTransition:`end`})})}loadSubset(t){if(this.syncMode===`eager`)return!0;if(this.syncLoadSubsetFn){const i=this.syncLoadSubsetFn(t);if(i instanceof Promise)return this.trackLoadPromise(i),i}return!0}unloadSubset(t){this.syncUnloadSubsetFn&&this.syncUnloadSubsetFn(t)}cleanup(){try{this.syncCleanupFn&&(this.syncCleanupFn(),this.syncCleanupFn=null)}catch(t){queueMicrotask(()=>{if(t instanceof Error){const i=new uS(this.id,t);throw i.cause=t,i.stack=t.stack,i}else throw new uS(this.id,t)})}this.preloadPromise=null}}function fA(n){if(typeof n==`function`)return{cleanup:n};if(typeof n==`object`)return n}const DS=1;function oc(n,t){return n===t?0:nQs(r)??null);if(n instanceof Date)return{__type:`date`,value:n.toISOString()};if(n instanceof Set)return{__type:`set`,values:Array.from(n).map(l=>Qs(l)??null).sort((l,o)=>oc(bi(l),bi(o)))};if(n instanceof Map)return{__type:`map`,entries:Array.from(n.entries()).map(([l,o])=>({key:Qs(l)??null,value:Qs(o)??null})).sort((l,o)=>oc(bi(l.key),bi(o.key)))};if(n instanceof RegExp)return{__type:`regexp`,value:n.toString()};const t={},i=Object.entries(n).sort(([r],[l])=>oc(r,l));for(const[r,l]of i){const o=Qs(l);o!==void 0&&(t[r]=o)}return t}function bi(n){return n===null?`null`:Array.isArray(n)?`[${n.map(bi).join(`,`)}]`:typeof n!=`object`?JSON.stringify(n):`{${Object.keys(n).sort((r,l)=>oc(r,l)).map(r=>`${JSON.stringify(r)}:${bi(n[r])}`).join(`,`)}}`}function dA(n,t,i,r,l){const o=hA(r),u=Qs(t)??null,d=Qs(l),g=Qs({signatureVersion:DS,expression:u,options:d??null})??null,m=bi(g);return{signatureVersion:DS,signature:m,indexId:n,name:i,expression:t,resolver:o,...d===void 0?{}:{options:d}}}function xd(n){if(n===null||typeof n!=`object`)return n;if(Array.isArray(n))return n.map(i=>xd(i));const t={};for(const[i,r]of Object.entries(n))t[i]=xd(r);return t}function pA(n){return JSON.parse(JSON.stringify(n))}class gA{constructor(){this.indexes=new Map,this.indexMetadata=new Map,this.indexCounter=0}setDeps(t){this.state=t.state,this.lifecycle=t.lifecycle,this.defaultIndexType=t.defaultIndexType,this.events=t.events}createIndex(t,i={}){this.lifecycle.validateCollectionUsable(`createIndex`);const r=++this.indexCounter,l=sw(),o=t(l),u=se(o),d=i.indexType??this.defaultIndexType;if(!d)throw new Oi(`No index type specified and no defaultIndexType set on collection. Either pass indexType in config, or set defaultIndexType on the collection: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, ... })`);const p=new d(r,u,i.name,i.options);p.build(this.state.entries()),this.indexes.set(r,p);const g=dA(r,u,i.name,d,i.options);return this.indexMetadata.set(r,g),this.events.emitIndexAdded(g),p}removeIndex(t){this.lifecycle.validateCollectionUsable(`removeIndex`);const i=typeof t==`number`?t:t.id,r=this.indexes.get(i);if(!r||typeof t!=`number`&&r!==t)return!1;this.indexes.delete(i);const l=this.indexMetadata.get(i);return this.indexMetadata.delete(i),l&&this.events.emitIndexRemoved(l),!0}getIndexMetadataSnapshot(){return Array.from(this.indexMetadata.values()).sort((t,i)=>t.indexId-i.indexId).map(t=>({...t,expression:pA(t.expression),resolver:{...t.resolver},...t.options===void 0?{}:{options:xd(t.options)}}))}updateIndexes(t){for(const i of this.indexes.values())for(const r of t)switch(r.type){case`insert`:i.add(r.key,r.value);break;case`update`:r.previousValue?i.update(r.key,r.previousValue,r.value):i.add(r.key,r.value);break;case`delete`:i.remove(r.key,r.value);break}}cleanup(){this.indexes.clear(),this.indexMetadata.clear()}}var yA={};const mA=new Set([`find`,`findLast`,`findIndex`,`findLastIndex`,`filter`,`map`,`flatMap`,`forEach`,`some`,`every`,`reduce`,`reduceRight`]),SA=new Set([`pop`,`push`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`]),vA=new Set([`set`,`delete`,`clear`,`add`]),wA=new Set([`entries`,`keys`,`values`,`forEach`]);function lp(n){return n!==null&&typeof n==`object`&&!(n instanceof Date)&&!(n instanceof RegExp)&&!Ws(n)}function bA(n,t,i,r){if(mA.has(n))return function(...l){const o=l[0];if(typeof o!=`function`)return t.apply(i.copy_,l);const u=(g,m)=>{if(lp(g)){const y={tracker:i,prop:String(m)},{proxy:v}=r(g,y);return v}return g},d=function(g,m,y){const v=u(g,m);return o.call(this,v,m,y)};if(n===`reduce`||n===`reduceRight`){const g=function(m,y,v,b){const w=u(y,v);return o.call(this,m,w,v,b)};return t.apply(i.copy_,[g,...l.slice(1)])}const p=t.apply(i.copy_,[d,...l.slice(1)]);if((n===`find`||n===`findLast`)&&p&&typeof p==`object`){const g=i.copy_.indexOf(p);if(g!==-1)return u(p,g)}return n===`filter`&&Array.isArray(p)?p.map(g=>{const m=i.copy_.indexOf(g);return m!==-1?u(g,m):g}):p}}function EA(n,t){return function(){const i=n.copy_;let r=0;return{next(){if(r>=i.length)return{done:!0,value:void 0};const l=i[r];let o=l;if(lp(l)){const u={tracker:n,prop:String(r)},{proxy:d}=t(l,u);o=d}return r++,{done:!1,value:o}},[Symbol.iterator](){return this}}}}function MS(n,t,i){return function(...r){const l=n.apply(t.copy_,r);return i(t),l}}function CA(n,t,i,r,l,o,u){if(wA.has(n)||t===Symbol.iterator)return function(...p){const g=i.apply(l.copy_,p);if(n===`forEach`){const y=p[0];if(typeof y==`function`){const v=function(b,w,E){const T=y.call(this,b,w,E);return u(l),T};return i.apply(r,[v,...p.slice(1)])}}if(n===`entries`||n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator){const y=g,v=new Map;if(n===`values`&&r instanceof Map)for(const[w,E]of l.copy_.entries())v.set(E,w);const b=new Map;if(r instanceof Set)for(const w of l.copy_.values())b.set(w,w);return{next(){const w=y.next();if(!w.done&&w.value&&typeof w.value==`object`){if(n===`entries`&&Array.isArray(w.value)&&w.value.length===2){if(w.value[1]&&typeof w.value[1]==`object`){const E=w.value[0],T={tracker:l,prop:E,updateMap:M=>{l.copy_ instanceof Map&&l.copy_.set(E,M)}},{proxy:N}=o(w.value[1],T);w.value[1]=N}}else if(n===`values`||n===Symbol.iterator.toString()||t===Symbol.iterator)if(n===`values`&&r instanceof Map){const E=v.get(w.value);if(E!==void 0){const T={tracker:l,prop:E,updateMap:M=>{l.copy_ instanceof Map&&l.copy_.set(E,M)}},{proxy:N}=o(w.value,T);w.value=N}}else if(r instanceof Set){const E=w.value,T={tracker:l,prop:E,updateSet:M=>{l.copy_ instanceof Set&&(l.copy_.delete(E),l.copy_.add(M),b.set(E,M))}},{proxy:N}=o(w.value,T);w.value=N}else{const E=Symbol(`iterator-value`),{proxy:T}=o(w.value,{tracker:l,prop:E});w.value=T}}return w},[Symbol.iterator](){return this}}}return g}}function At(...n){const t=typeof window<`u`&&typeof localStorage<`u`;t&&localStorage.getItem(`DEBUG`)===`true`?console.log(`[proxy]`,...n):!t&&typeof process<`u`&&yA.DEBUG===`true`&&console.log(`[proxy]`,...n)}function gs(n,t=new WeakMap){if(n==null||typeof n!=`object`)return n;if(t.has(n))return t.get(n);if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n.source,n.flags);if(Array.isArray(n)){const l=[];return t.set(n,l),n.forEach((o,u)=>{l[u]=gs(o,t)}),l}if(ArrayBuffer.isView(n)&&!(n instanceof DataView)){const l=Object.getPrototypeOf(n).constructor,o=new l(n.length);t.set(n,o);for(let u=0;u{l.set(u,gs(o,t))}),l}if(n instanceof Set){const l=new Set;return t.set(n,l),n.forEach(o=>{l.add(gs(o,t))}),l}if(Ws(n))return n;const i={};t.set(n,i);for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=gs(n[l],t));const r=Object.getOwnPropertySymbols(n);for(const l of r)i[l]=gs(n[l],t);return i}let kS=0;function xA(){return kS+=1,kS}function op(n,t){const i=new Map;function r(y,v){if(At(`Object ID:`,y.constructor.name),i.has(y))return i.get(y);{const b=op(y,v);return i.set(y,b),b}}const l=new Map,o={copy_:gs(n),originalObject:gs(n),proxyCount:xA(),modified:!1,assigned_:{},parent:t,target:n};At(`createChangeProxy called for target`,n,o.proxyCount);function u(y){y.modified||(y.modified=!0),y.parent&&(At(`propagating change to parent`),`updateMap`in y.parent?y.parent.updateMap(y.copy_):`updateSet`in y.parent?y.parent.updateSet(y.copy_):(y.parent.tracker.copy_[y.parent.prop]=y.copy_,y.parent.tracker.assigned_[y.parent.prop]=!0),u(y.parent.tracker))}function d(y){if(At(`checkIfReverted called with assigned keys:`,Object.keys(y.assigned_)),Object.keys(y.assigned_).length===0&&Object.getOwnPropertySymbols(y.assigned_).length===0)return At(`No assigned properties, returning true`),!0;for(const b in y.assigned_)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(At(`Checking property ${String(b)}, current:`,w,`original:`,E),!Hn(w,E))return At(`Property ${String(b)} is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Property ${String(b)} was deleted, returning false`),!1;const v=Object.getOwnPropertySymbols(y.assigned_);for(const b of v)if(y.assigned_[b]===!0){const w=y.copy_[b],E=y.originalObject[b];if(!Hn(w,E))return At(`Symbol property is different, returning false`),!1}else if(y.assigned_[b]===!1)return At(`Symbol property was deleted, returning false`),!1;return At(`All properties match original values, returning true`),!0}function p(y,v){At(`checkParentStatus called for child prop:`,v);const b=d(y);At(`Parent checkIfReverted returned:`,b),b&&(At(`Parent is fully reverted, clearing tracking`),y.modified=!1,y.assigned_={},y.parent&&(At(`Continuing up the parent chain`),p(y.parent.tracker,y.parent.prop)))}function g(y){if(At(`createObjectProxy`,y),l.has(y))return At(`proxyCache found match`),l.get(y);const v=new Proxy(y,{get(b,w){At(`get`,b,w);const E=o.copy_[w]??o.originalObject[w],T=o.originalObject[w];if(At(`value (at top of proxy get)`,E),Object.getOwnPropertyDescriptor(b,w)?.get)return E;if(typeof E==`function`){if(Array.isArray(b)){const M=w.toString();if(SA.has(M))return MS(E,o,u);const R=bA(M,E,o,r);if(R)return R;if(w===Symbol.iterator)return EA(o,r)}if(b instanceof Map||b instanceof Set){const M=w.toString();if(vA.has(M))return MS(E,o,u);const R=CA(M,w,E,b,o,r,u);if(R)return R}return E.bind(b)}if(lp(E)){const M={tracker:o,prop:String(w)},{proxy:R}=r(T,M);return l.set(E,R),R}return E},set(b,w,E){const T=o.copy_[w];if(At(`set called for property ${String(w)}, current:`,T,`new:`,E),Hn(T,E))At(`Value unchanged, not tracking`);else{const N=o.originalObject[w],M=Hn(E,N);if(At(`value:`,E,`original:`,N,`isRevertToOriginal:`,M),M){At(`Reverting property ${String(w)} to original value`),delete o.assigned_[w.toString()],At(`Updating copy with original value for ${String(w)}`),o.copy_[w]=gs(N),At(`Checking if all properties reverted`);const R=d(o);At(`All reverted:`,R),R?(At(`All properties reverted, clearing tracking`),o.modified=!1,o.assigned_={},t&&(At(`Updating parent for property:`,t.prop),p(t.tracker,t.prop))):(At(`Some properties still changed, keeping modified flag`),o.modified=!0)}else At(`Setting new value for property ${String(w)}`),o.copy_[w]=E,o.assigned_[w.toString()]=!0,At(`Marking object and ancestors as modified`,o),u(o)}return!0},defineProperty(b,w,E){const T=Reflect.defineProperty(b,w,E);return T&&`value`in E&&(o.copy_[w]=gs(E.value),o.assigned_[w.toString()]=!0,u(o)),T},getOwnPropertyDescriptor(b,w){return Reflect.getOwnPropertyDescriptor(b,w)},preventExtensions(b){return Reflect.preventExtensions(b)},isExtensible(b){return Reflect.isExtensible(b)},deleteProperty(b,w){At(`deleteProperty`,b,w);const E=typeof w==`symbol`?w.toString():w;if(E in b){const T=E in o.originalObject,N=Reflect.deleteProperty(b,w);return N&&(T?(o.assigned_[E]=!1,u(o)):(delete o.assigned_[E],Object.keys(o.assigned_).length===0&&Object.getOwnPropertySymbols(o.assigned_).length===0?o.modified=!1:o.modified=!0)),N}return!0}});return l.set(y,v),v}return{proxy:g(o.copy_),getChanges:()=>{if(At(`getChanges called, modified:`,o.modified),At(o),!o.modified)return At(`Object not modified, returning empty object`),{};if(typeof o.copy_!=`object`||Array.isArray(o.copy_)||Object.keys(o.assigned_).length===0)return o.copy_;const y={};for(const v in o.copy_)o.assigned_[v]===!0&&v in o.copy_&&(y[v]=o.copy_[v]);return At(`Returning copy:`,y),y}}}function _A(n){const t=n.map(i=>op(i));return{proxies:t.map(i=>i.proxy),getChanges:()=>t.map(i=>i.getChanges())}}function TA(n,t){const{proxy:i,getChanges:r}=op(n);return t(i),r()}function AA(n,t){const{proxies:i,getChanges:r}=_A(n);return t(i),r()}function OA(){let n,t,i=!0;return{promise:new Promise((l,o)=>{n=u=>{i=!1,l(u)},t=u=>{i=!1,o(u)}}),resolve:n,reject:t,isPending:()=>i}}function RA(n){return typeof n==`object`&&n!==null&&typeof n.hasPendingGraphRun==`function`}class DA{constructor(){this.contexts=new Map,this.clearListeners=new Set}getOrCreateContext(t){let i=this.contexts.get(t);return i||(i={queue:[],jobs:new Map,dependencies:new Map,completed:new Set},this.contexts.set(t,i)),i}schedule({contextId:t,jobId:i,dependencies:r,run:l}){if(typeof t>`u`){l();return}const o=this.getOrCreateContext(t);if(o.jobs.has(i)||o.queue.push(i),o.jobs.set(i,l),r){const u=new Set(r);u.delete(i),o.dependencies.set(i,u)}else o.dependencies.has(i)||o.dependencies.set(i,new Set);o.completed.delete(i)}flush(t){const i=this.contexts.get(t);if(!i)return;const{queue:r,jobs:l,dependencies:o,completed:u}=i;for(;r.length>0;){let d=!1;const p=r.length;for(let g=0;gi(t))}onClear(t){return this.clearListeners.add(t),()=>this.clearListeners.delete(t)}hasPendingJobs(t){const i=this.contexts.get(t);return!!i&&i.jobs.size>0}clearJob(t,i){const r=this.contexts.get(t);r&&(r.jobs.delete(i),r.dependencies.delete(i),r.completed.delete(i),r.queue=r.queue.filter(l=>l!==i),r.jobs.size===0&&this.contexts.delete(t))}}const Ec=new DA,Cc=[];let cl=[],MA=0;function kA(n,t){switch(`${n.type}-${t.type}`){case`insert-update`:return{...n,type:`insert`,original:{},modified:t.modified,changes:{...n.changes,...t.changes},key:n.key,globalKey:n.globalKey,metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata},mutationId:t.mutationId,updatedAt:t.updatedAt};case`insert-delete`:return null;case`update-delete`:return t;case`update-update`:return{...t,original:n.original,changes:{...n.changes,...t.changes},metadata:t.metadata??n.metadata,syncMetadata:{...n.syncMetadata,...t.syncMetadata}};case`delete-delete`:case`insert-insert`:return t;default:{const i=`${n.type}-${t.type}`;throw new Error(`Unhandled mutation combination: ${i}`)}}}function Ja(n){const t=new NA(n);return Cc.push(t),t}function cc(){if(cl.length>0)return cl.slice(-1)[0]}function UA(n){Ec.clear(n.id),cl.push(n)}function zA(n){try{Ec.flush(n.id)}finally{cl=cl.filter(t=>t.id!==n.id)}}function jA(n){const t=Cc.findIndex(i=>i.id===n.id);t!==-1&&Cc.splice(t,1)}let NA=class{constructor(t){if(typeof t.mutationFn>`u`)throw new xx;this.id=t.id??crypto.randomUUID(),this.mutationFn=t.mutationFn,this.state=`pending`,this.mutations=[],this.isPersisted=OA(),this.autoCommit=t.autoCommit??!0,this.createdAt=new Date,this.sequenceNumber=MA++,this.metadata=t.metadata??{}}setState(t){this.state=t,(t===`completed`||t===`failed`)&&jA(this)}mutate(t){if(this.state!==`pending`)throw new Tx;UA(this);try{t()}finally{zA(this)}return this.autoCommit&&this.commit().catch(()=>{}),this}applyMutations(t){for(const i of t){const r=this.mutations.findIndex(l=>l.globalKey===i.globalKey);if(r>=0){const l=this.mutations[r],o=kA(l,i);o===null?this.mutations.splice(r,1):this.mutations[r]=o}else this.mutations.push(i)}}rollback(t){const i=t?.isSecondaryRollback??!1;if(this.state===`completed`)throw new Ax;if(this.setState(`failed`),!i){const r=new Set;this.mutations.forEach(l=>r.add(l.globalKey));for(const l of Cc)l.state===`pending`&&l.mutations.some(o=>r.has(o.globalKey))&&l.rollback({isSecondaryRollback:!0})}return this.isPersisted.reject(this.error?.error),this.touchCollection(),this}touchCollection(){const t=new Set;for(const i of this.mutations)t.has(i.collection.id)||(i.collection._state.onTransactionStateChange(),i.collection._state.pendingSyncedTransactions.length>0&&i.collection._state.commitPendingTransactions(),t.add(i.collection.id))}async commit(){if(this.state!==`pending`)throw new Ox;if(this.setState(`persisting`),this.mutations.length===0)return this.setState(`completed`),this.isPersisted.resolve(this),this;try{await this.mutationFn({transaction:this}),this.setState(`completed`),this.touchCollection(),this.isPersisted.resolve(this)}catch(t){const i=t instanceof Error?t:new Error(String(t));throw this.error={message:i.message,error:i},this.rollback(),i}return this}compareCreatedAt(t){const i=this.createdAt.getTime()-t.createdAt.getTime();return i!==0?i:this.sequenceNumber-t.sequenceNumber}};class BA{constructor(t,i){this.insert=(r,l)=>{this.lifecycle.validateCollectionUsable(`insert`);const o=this.state,u=cc();if(!u&&!this.config.onInsert)throw new bx;const d=Array.isArray(r)?r:[r],p=[],g=new Set;if(d.forEach(m=>{const y=this.validateData(m,`insert`),v=this.config.getKey(y);if(this.state.has(v)||g.has(v))throw new dx(v);g.add(v);const b=this.generateGlobalKey(v,m),w={mutationId:crypto.randomUUID(),original:{},modified:y,changes:Object.fromEntries(Object.keys(m).map(E=>[E,y[E]])),globalKey:b,key:v,metadata:l?.metadata,syncMetadata:this.config.sync.getSyncMetadata?.()||{},optimistic:l?.optimistic??!0,type:`insert`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(w)}),u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;{const m=Ja({metadata:{[ac]:!0},mutationFn:async y=>await this.config.onInsert({transaction:y.transaction,collection:this.collection})});return m.applyMutations(p),this.markPendingLocalOrigins(p),m.commit().catch(()=>{}),o.transactions.set(m.id,m),o.scheduleTransactionCleanup(m),o.recomputeOptimisticState(!0),m}},this.delete=(r,l)=>{const o=this.state;this.lifecycle.validateCollectionUsable(`delete`);const u=cc();if(!u&&!this.config.onDelete)throw new Cx;if(Array.isArray(r)&&r.length===0)throw new vx;const d=Array.isArray(r)?r:[r],p=[];for(const m of d){if(!this.state.has(m))throw new wx(m);const y=this.generateGlobalKey(m,this.state.get(m)),v={mutationId:crypto.randomUUID(),original:this.state.get(m),modified:this.state.get(m),changes:this.state.get(m),globalKey:y,key:m,metadata:l?.metadata,syncMetadata:o.syncedMetadata.get(m)||{},optimistic:l?.optimistic??!0,type:`delete`,createdAt:new Date,updatedAt:new Date,collection:this.collection};p.push(v)}if(u)return u.applyMutations(p),o.transactions.set(u.id,u),o.scheduleTransactionCleanup(u),o.recomputeOptimisticState(!0),u;const g=Ja({autoCommit:!0,metadata:{[ac]:!0},mutationFn:async m=>this.config.onDelete({transaction:m.transaction,collection:this.collection})});return g.applyMutations(p),this.markPendingLocalOrigins(p),g.commit().catch(()=>{}),o.transactions.set(g.id,g),o.scheduleTransactionCleanup(g),o.recomputeOptimisticState(!0),g},this.id=i,this.config=t}setDeps(t){this.lifecycle=t.lifecycle,this.state=t.state,this.collection=t.collection}ensureStandardSchema(t){if(t&&`~standard`in t)return t;throw new ax}validateData(t,i,r){if(!this.config.schema)return t;const l=this.ensureStandardSchema(this.config.schema);if(i===`update`&&r){const u=this.state.get(r);if(u&&t&&typeof t==`object`&&typeof u==`object`){const d=Object.assign({},u,t),p=l[`~standard`].validate(d);if(p instanceof Promise)throw new lS;if(`issues`in p&&p.issues){const v=p.issues.map(b=>({message:b.message,path:b.path?.map(w=>String(w))}));throw new aS(i,v)}const g=p.value,m=Object.keys(t);return Object.fromEntries(m.map(v=>[v,g[v]]))}}const o=l[`~standard`].validate(t);if(o instanceof Promise)throw new lS;if(`issues`in o&&o.issues){const u=o.issues.map(d=>({message:d.message,path:d.path?.map(p=>String(p))}));throw new aS(i,u)}return o.value}generateGlobalKey(t,i){if(typeof t!=`string`&&typeof t!=`number`)throw typeof t>`u`?new fx(i):new hx(t,i);return`KEY::${this.id}/${t}`}markPendingLocalOrigins(t){for(const i of t)this.state.pendingLocalOrigins.add(i.key)}update(t,i,r){if(typeof t>`u`)throw new gx;const l=this.state;this.lifecycle.validateCollectionUsable(`update`);const o=cc();if(!o&&!this.config.onUpdate)throw new Ex;const u=Array.isArray(t),d=u?t:[t];if(u&&d.length===0)throw new yx;const p=typeof i==`function`?i:r,g=typeof i==`function`?{}:i,m=d.map(w=>{const E=this.state.get(w);if(!E)throw new mx(w);return E});let y;u?y=AA(m,p):y=[TA(m[0],p)];const v=d.map((w,E)=>{const T=y[E];if(!T||Object.keys(T).length===0)return null;const N=m[E],M=this.validateData(T,`update`,w),R=Object.assign({},N,M),A=this.config.getKey(N),V=this.config.getKey(R);if(A!==V)throw new Sx(A,V);const I=this.generateGlobalKey(V,R);return{mutationId:crypto.randomUUID(),original:N,modified:R,changes:Object.fromEntries(Object.keys(T).map(H=>[H,R[H]])),globalKey:I,key:w,metadata:g.metadata,syncMetadata:l.syncedMetadata.get(w)||{},optimistic:g.optimistic??!0,type:`update`,createdAt:new Date,updatedAt:new Date,collection:this.collection}}).filter(Boolean);if(v.length===0){const w=Ja({mutationFn:async()=>{}});return w.commit().catch(()=>{}),l.scheduleTransactionCleanup(w),w}if(o)return o.applyMutations(v),l.transactions.set(o.id,o),l.scheduleTransactionCleanup(o),l.recomputeOptimisticState(!0),o;const b=Ja({metadata:{[ac]:!0},mutationFn:async w=>this.config.onUpdate({transaction:w.transaction,collection:this.collection})});return b.applyMutations(v),this.markPendingLocalOrigins(v),b.commit().catch(()=>{}),l.transactions.set(b.id,b),l.scheduleTransactionCleanup(b),l.recomputeOptimisticState(!0),b}}class LA extends iw{constructor(){super()}setDeps(t){this.collection=t.collection}emit(t,i){this.emitInner(t,i)}emitStatusChange(t,i){this.emit(`status:change`,{type:`status:change`,collection:this.collection,previousStatus:i,status:t});const r=`status:${t}`;this.emit(r,{type:r,collection:this.collection,previousStatus:i,status:t})}emitSubscribersChange(t,i){this.emit(`subscribers:change`,{type:`subscribers:change`,collection:this.collection,previousSubscriberCount:i,subscriberCount:t})}emitIndexAdded(t){this.emit(`index:added`,{type:`index:added`,collection:this.collection,index:t})}emitIndexRemoved(t){this.emit(`index:removed`,{type:`index:removed`,collection:this.collection,index:t})}cleanup(){this.clearListeners()}}function cp(n){const t=new up(n);return n.utils?t.utils=n.utils:t.utils={},t}class up{constructor(t){if(this.utils={},this.deferDataRefresh=null,this.insert=(i,r)=>this._mutations.insert(i,r),this.delete=(i,r)=>this._mutations.delete(i,r),!t)throw new ix;if(!t.sync)throw new rx;if(t.id?this.id=t.id:this.id=crypto.randomUUID(),this.config={...t,autoIndex:t.autoIndex??`off`},this.config.autoIndex===`eager`&&!t.defaultIndexType)throw new Oi(`autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it: - import { BasicIndex } from '@tanstack/db' - createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })`);this._changes=new rA,this._events=new LA,this._indexes=new gA,this._lifecycle=new cA(t,this.id),this._mutations=new BA(t,this.id),this._state=new ZT(t),this._sync=new uA(t,this.id),this.comparisonOpts=IA(t),this._changes.setDeps({collection:this,lifecycle:this._lifecycle,sync:this._sync,events:this._events,state:this._state}),this._events.setDeps({collection:this}),this._indexes.setDeps({state:this._state,lifecycle:this._lifecycle,defaultIndexType:t.defaultIndexType,events:this._events}),this._lifecycle.setDeps({changes:this._changes,events:this._events,indexes:this._indexes,state:this._state,sync:this._sync}),this._mutations.setDeps({collection:this,lifecycle:this._lifecycle,state:this._state}),this._state.setDeps({collection:this,lifecycle:this._lifecycle,changes:this._changes,indexes:this._indexes,events:this._events}),this._sync.setDeps({collection:this,state:this._state,lifecycle:this._lifecycle,events:this._events}),t.startSync===!0&&this._sync.startSync()}get status(){return this._lifecycle.status}get subscriberCount(){return this._changes.activeSubscribersCount}onFirstReady(t){return this._lifecycle.onFirstReady(t)}isReady(){return this._lifecycle.status===`ready`}get isLoadingSubset(){return this._sync.isLoadingSubset}startSyncImmediate(){this._sync.startSync()}preload(){return this._sync.preload()}get(t){return this._state.getWithVirtualProps(t)}has(t){return this._state.has(t)}get size(){return this._state.size}*keys(){yield*this._state.keys()}*values(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield i)}}*entries(){for(const t of this._state.keys()){const i=this.get(t);i!==void 0&&(yield[t,i])}}*[Symbol.iterator](){yield*this.entries()}forEach(t){let i=0;for(const[r,l]of this.entries())t(l,r,i++)}map(t){const i=[];let r=0;for(const[l,o]of this.entries())i.push(t(o,l,r++));return i}getKeyFromItem(t){return this.config.getKey(t)}createIndex(t,i={}){return this._indexes.createIndex(t,i)}removeIndex(t){return this._indexes.removeIndex(t)}getIndexMetadata(){return this._indexes.getIndexMetadataSnapshot()}get indexes(){return this._indexes.indexes}validateData(t,i,r){return this._mutations.validateData(t,i,r)}get compareOptions(){return{...this.comparisonOpts}}update(t,i,r){return this._mutations.update(t,i,r)}get state(){const t=new Map;for(const[i,r]of this.entries())t.set(i,r);return t}stateWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.state):this.preload().then(()=>this.state)}get toArray(){return Array.from(this.values())}toArrayWhenReady(){return this.size>0||this.isReady()?Promise.resolve(this.toArray):this.preload().then(()=>this.toArray)}currentStateAsChanges(t={}){return QT(this,t)}subscribeChanges(t,i={}){return this._changes.subscribeChanges(t,i)}on(t,i){return this._events.on(t,i)}once(t,i){return this._events.once(t,i)}off(t,i){this._events.off(t,i)}waitFor(t,i){return this._events.waitFor(t,i)}async cleanup(){return this._lifecycle.cleanup(),Promise.resolve()}}function IA(n){if(n.defaultStringCollation){const t=n.defaultStringCollation;return{stringSort:t.stringSort??`locale`,locale:t.stringSort===`locale`?t.locale:void 0,localeOptions:t.stringSort===`locale`?t.localeOptions:void 0}}else return{stringSort:`locale`}}function HA(n){return!!n&&(typeof n==`object`||typeof n==`function`)&&typeof n.then==`function`}function qA(n){const{mutationFn:t,onMutate:i,...r}=n;return l=>{const o=Ja({...r,mutationFn:async u=>await t(l,u)});return o.mutate(()=>{const u=i(l);if(HA(u))throw new _x}),o}}function KA(n){const t=VA(n);let i=n,r,l=0;const o=10;for(;low(u)),l=cw(r),o=aw(n);for(const[u,d]of l.singleSource)$A(n,u)&&!o.has(u)&&t.set(u,d);return t}function $A(n,t){if(n.from.alias===t)return n.from.type===`collectionRef`;if(n.join){for(const i of n.join)if(i.from.alias===t)return i.from.type===`collectionRef`}return!1}function aw(n){const t=new Set;if(n.join){const i=n.from.alias;for(const r of n.join){const l=r.from.alias;(r.type===`left`||r.type===`full`)&&t.add(l),(r.type===`right`||r.type===`full`)&&t.add(i)}}return t}function _d(n){const t={...n,from:n.from.type===`queryRef`?new yn(_d(n.from.query),n.from.alias):n.from,join:n.join?.map(i=>({...i,from:i.from.type===`queryRef`?new yn(_d(i.from.query),i.from.alias):i.from}))};return GA(t)}function GA(n){if(!n.where||n.where.length===0)return n;if(!n.join||n.join.length===0){if(n.where.length>1){const d=Ad(n.where),p=xc(d);return{...n,where:[p]}}return n}const t=n.where.filter(d=>!rS(d)),r=Ad(t).map(d=>ow(d)),l=cw(r),o=FA(n,l),u=n.where.filter(d=>rS(d));return u.length>0&&(o.where=[...o.where||[],...u]),o}function lw(n){return{...n,from:Td(n.from),join:n.join?.map(t=>({...t,from:Td(t.from)}))}}function Td(n){if(n.type===`collectionRef`)return n;const t=lw(n.query);if(YA(t)){const i=Td(t.from);return i.type===`collectionRef`?new jr(i.collection,n.alias):new yn(i.query,n.alias)}return new yn(t,n.alias)}function YA(n){return(!n.where||n.where.length===0)&&!n.select&&(!n.groupBy||n.groupBy.length===0)&&(!n.having||n.having.length===0)&&(!n.orderBy||n.orderBy.length===0)&&(!n.join||n.join.length===0)&&n.limit===void 0&&n.offset===void 0&&!n.fnSelect&&(!n.fnWhere||n.fnWhere.length===0)&&(!n.fnHaving||n.fnHaving.length===0)}function Ad(n){const t=[];for(const i of n){const r=Pd(i);t.push(...fp(r))}return t}function fp(n){if(n.type===`func`&&n.name===`and`){const t=[];for(const i of n.args)t.push(...fp(i));return t}else return[n]}function ow(n){const t=new Set;let i=!1;function r(l){switch(l.type){case`ref`:if(l.path&&l.path.length>0){const o=l.path[0];o&&(t.add(o),l.path.length===1&&(i=!0))}break;case`func`:l.args&&l.args.forEach(r);break;case`val`:break;case`agg`:l.args&&l.args.forEach(r);break}}return r(n),{expression:n,touchedSources:t,hasNamespaceOnlyRef:i}}function cw(n){const t=new Map,i=[];for(const o of n)if(o.touchedSources.size===1&&!o.hasNamespaceOnlyRef){const u=Array.from(o.touchedSources)[0];t.has(u)||t.set(u,[]),t.get(u).push(o.expression)}else(o.touchedSources.size>1||o.hasNamespaceOnlyRef)&&i.push(o.expression);const r=new Map;for(const[o,u]of t)r.set(o,xc(u));const l=i.length>0?xc(i):void 0;return{singleSource:r,multiSource:l}}function FA(n,t){const i=new Set,r=aw(n),l=new Map;for(const[y,v]of t.singleSource)r.has(y)||l.set(y,v);const o=US(n.from,l,i),u=n.join?n.join.map(y=>({...y,from:US(y.from,l,i)})):void 0,d=[];t.multiSource&&d.push(t.multiSource);const p=r.size>0;for(const[y,v]of t.singleSource)i.has(y)?p&&d.push(nx(v)):d.push(v);const g=d.length>1?[xc(d.flatMap(y=>fp(Pd(y))))]:d;return{select:n.select,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,distinct:n.distinct,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0,from:o,join:u,where:g.length>0?g:[]}}function _r(n){return{from:n.from.type===`collectionRef`?new jr(n.from.collection,n.from.alias):new yn(_r(n.from.query),n.from.alias),select:n.select,join:n.join?n.join.map(t=>({type:t.type,left:t.left,right:t.right,from:t.from.type===`collectionRef`?new jr(t.from.collection,t.from.alias):new yn(_r(t.from.query),t.from.alias)})):void 0,where:n.where?[...n.where]:void 0,groupBy:n.groupBy?[...n.groupBy]:void 0,having:n.having?[...n.having]:void 0,orderBy:n.orderBy?[...n.orderBy]:void 0,limit:n.limit,offset:n.offset,fnSelect:n.fnSelect,fnWhere:n.fnWhere?[...n.fnWhere]:void 0,fnHaving:n.fnHaving?[...n.fnHaving]:void 0}}function US(n,t,i){const r=t.get(n.alias);if(!r)return n.type===`collectionRef`?new jr(n.collection,n.alias):new yn(_r(n.query),n.alias);if(n.type===`collectionRef`){const u={from:new jr(n.collection,n.alias),where:[r]};return i.add(n.alias),new yn(u,n.alias)}if(!PA(n.query,r,n.alias))return new yn(_r(n.query),n.alias);if(eO(n.query,r,n.alias))return new yn(_r(n.query),n.alias);const l=n.query.where||[],o={..._r(n.query),where:[...l,r]};return i.add(n.alias),new yn(o,n.alias)}function QA(n,t,i){return n.select?uw(n.select)||tO(n.select,t,i):!1}function XA(n){return n.groupBy&&n.groupBy.length>0}function JA(n){return n.having&&n.having.length>0}function ZA(n){return n.orderBy&&n.orderBy.length>0&&(n.limit!==void 0||n.offset!==void 0)}function WA(n){return n.fnSelect||n.fnWhere&&n.fnWhere.length>0||n.fnHaving&&n.fnHaving.length>0}function PA(n,t,i){return!(QA(n,t,i)||XA(n)||JA(n)||ZA(n)||WA(n))}function uw(n){for(const t of Object.values(n))if(typeof t==`object`){const i=t;if(i.type===`agg`||!(`type`in i)&&uw(i))return!0}return!1}function hp(n){const t=[];if(n==null||typeof n!=`object`)return t;switch(n.type){case`ref`:t.push(n);break;case`func`:case`agg`:for(const i of n.args??[])t.push(...hp(i));break}return t}function tO(n,t,i){const r=new Set;for(const[o,u]of Object.entries(n))o.startsWith(`__SPREAD_SENTINEL__`)||u instanceof Oe||r.add(o);const l=hp(t);for(const o of l){const u=o.path;if(!Array.isArray(u)||u.length<2)continue;const d=u[0],p=u[1];if(d===i&&r.has(p))return!0}return!1}function eO(n,t,i){const r=hp(t);if(r.every(o=>o.path[0]!==i))return!1;if(n.fnSelect)return!0;const l=n.select;if(!l)return!1;for(const o of r){const u=o.path;if(u.length<2||u[0]!==i)continue;const d=l[u[1]];if(!d)continue;if(!(d instanceof Oe)||d.path.length<2)return!0;const[p,g]=d.path;if(p!==i&&p!==n.from.alias||g!==u[1])return!0}return!1}function xc(n){if(n.length===0)throw new i_;return n.length===1?n[0]:new Ve(`and`,n)}function nO(n,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M){let R=n;for(const A of t)R=sO(R,A,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M);return R}function sO(n,t,i,r,l,o,u,d,p,g,m,y,v,b,w,E,T,N,M){const R=t.from.type===`collectionRef`,{alias:A,input:V,collectionId:I}=rO(t.from,o,p,g,m,y,v,b,u,d,E,T,N,M);i[A]=V,R&&(T[A]=I);const H=p[r],W=p[I];if(!H)throw new cS(r);if(!W)throw new cS(I);const{activeSource:tt,lazySource:X}=lO(t.type,H,W),at=Object.keys(i),{mainExpr:nt,joinedExpr:wt}=iO(t.left,t.right,at,A),Lt=fe(nt),dt=fe(wt);let k=n.pipe(oe(([Z,st])=>[Cr(Lt(st)),[Z,st]])),q=V.pipe(oe(([Z,st])=>{const ut={[A]:st};return[Cr(dt(ut)),[Z,ut]]}));if(![`inner`,`left`,`right`,`full`].includes(t.type))throw new Yx(t.type);if(tt){const Z=tt===`main`?t.from:w.from,st=Z.type===`queryRef`&&(Z.query.limit||Z.query.offset),ut=nt.type===`func`||wt.type===`func`;if(!st&&!ut){const _=tt===`main`?A:l;y.add(_);const L=tt===`main`?k:q,Q=al(w,tt===`main`?wt:nt,X),ot=Q.collection,it=Q.path[0];it&&$c(it,Q.path,ot);const vt=L.pipe(OT(xt=>{const bt=N[_]||_,$e=g[bt];if(!$e)throw new r_(bt,_,X.id,Object.keys(g));if($e.hasLoadedInitialState())return;const Ge=xt.getInner().map(([[wn]])=>wn),Fn=new Oe(Q.path);$e.requestSnapshot({where:tA(Fn,Ge),optimizedOnly:!0})||$e.requestSnapshot()}));tt===`main`?k=vt:q=vt}}return k.pipe(nw(q,t.type),aO(t.type))}function iO(n,t,i,r){const l=i.filter(d=>d!==r),o=Od(n),u=Od(t);if(o&&l.includes(o)&&u===r)return{mainExpr:n,joinedExpr:t};if(o===r&&u&&l.includes(u))return{mainExpr:t,joinedExpr:n};throw!o||!u?new Qx:o===u?new Fx(o):l.includes(o)?u!==r?new Jx(r):new Zx:new Xx(o)}function Od(n){switch(n.type){case`ref`:return n.path[0]||null;case`func`:{const t=new Set;for(const i of n.args){const r=Od(i);r&&t.add(r)}return t.size===1?Array.from(t)[0]:null}default:return null}}function rO(n,t,i,r,l,o,u,d,p,g,m,y,v,b){switch(n.type){case`collectionRef`:{const w=t[n.alias];if(!w)throw new Kv(n.alias,n.collection.id,Object.keys(t));return y[n.alias]=n.collection.id,{alias:n.alias,input:w,collectionId:n.collection.id}}case`queryRef`:{const w=g.get(n.query)||n.query,E=m(w,t,i,r,l,o,u,d,p,g);Object.assign(y,E.aliasToCollectionId),Object.assign(v,E.aliasRemapping);const T=g.has(n.query),N=n.query.from.alias;if(!(!T&&n.alias===N))for(const[I,H]of E.sourceWhereClauses)b.set(I,H);const R=Object.keys(E.aliasToCollectionId).find(I=>E.aliasToCollectionId[I]===E.collectionId);R&&R!==n.alias&&(v[n.alias]=R);const V=E.pipeline.pipe(oe(I=>{const[H,[W,tt]]=I;return[H,W]}));return{alias:n.alias,input:V,collectionId:E.collectionId}}default:throw new Wx(n.type)}}function aO(n){return function(t){return t.pipe(ys(i=>{const[r,[l,o]]=i,u=l?.[1],d=o?.[1];return n===`inner`?!!(u&&d):n===`left`?!!u:n===`right`?!!d:!0}),oe(i=>{const[r,[l,o]]=i,u=l?.[0],d=l?.[1],p=o?.[0],g=o?.[1],m={};return d&&Object.assign(m,d),g&&Object.assign(m,g),[`[${u},${p}]`,m]}))}}function lO(n,t,i){switch(n){case`left`:return{activeSource:`main`,lazySource:i};case`right`:return{activeSource:`joined`,lazySource:t};case`inner`:return t.sizeuO(l,r)))}function hO(n){return n.type===`agg`}function dO(n){return n&&typeof n==`object`&&!Nr(n)}function fw(n,t,i){for(const[r,l]of Object.entries(t)){if(r.startsWith(`__SPREAD_SENTINEL__`)){const u=r.slice(19),d=u.lastIndexOf(`__`),p=d>=0?u.slice(0,d):u,g=l&&typeof l==`object`&&`type`in l&&l.type===`ref`;if(p.includes(`.`)||g){const m=[...n],y=g?l:new Oe(p.split(`.`)),v=fe(y);i.push({kind:`merge`,targetPath:m,source:v})}else{const m=p,y=[...n];i.push({kind:`merge`,targetPath:y,source:v=>v[m]})}continue}const o=l;if(o&&o.type===`includesSubquery`){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});continue}if(dO(o)){fw([...n,r],o,i);continue}if(hO(o)||Br(o))i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>null});else{if(o===void 0||!Nr(o)){i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>o});continue}if(o instanceof ke){const u=o.value;i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:()=>u})}else i.push({kind:`field`,alias:[...n,r].join(`.`),compiled:fe(o)})}}}const Ar=Symbol(`includesRouting`);function _c(n,t,i,r,l,o,u,d,p=new WeakMap,g=new WeakMap,m,y){const v=p.get(n);if(v)return v;Dd(n);const{optimizedQuery:b,sourceWhereClauses:w}=KA(n);let E=b;g.set(E,n),kd(E,n,g);const T={...t},N={},M={},R={},{alias:A,input:V,collectionId:I}=gO(E.from,T,i,r,l,o,u,d,p,g,N,M,w);R[A]=V;let H=V;if(m&&y){const dt=y.path.slice(1);H=V.pipe(oe(([Z,st])=>[vO(st,dt),[Z,st]])).pipe(nw(m,`inner`)).pipe(ys(([Z,[st]])=>st!=null),oe(([Z,[st,ut]])=>{const[_,L]=st,Y={...L,__correlationKey:Z};return ut!=null&&(Y.__parentContext=ut),[ut!=null?`${String(_)}::${JSON.stringify(ut)}`:_,Y]})),R[A]=H}let W=H.pipe(oe(([dt,k])=>{const{__parentContext:q,...Z}=k,st={[A]:Z};return q&&(Object.assign(st,q),st.__parentContext=q),[dt,st]}));if(E.join&&E.join.length>0&&(W=nO(W,E.join,R,I,A,T,p,g,i,r,l,o,u,d,n,_c,N,M,w)),E.where&&E.where.length>0)for(const dt of E.where){const k=Pd(dt),q=fe(k);W=W.pipe(ys(([Z,st])=>Tr(q(st))))}if(E.fnWhere&&E.fnWhere.length>0)for(const dt of E.fnWhere)W=W.pipe(ys(([k,q])=>Tr(dt(q))));const tt=[],X=[];if(E.select){const dt=mO(E.select);dt.length>0&&(E={...E,select:{...E.select}});for(const{key:k,subquery:q}of dt){const Z=fe(q.correlationField);let st;if(q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Y=>({alias:Y.path[0],field:Y.path.slice(1),compiled:fe(Y)}));st=W.pipe(oe(([Y,Q])=>{const ot={};for(const it of L){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(Q);let xt=ot[it.alias];for(let bt=0;bt[Z(Y),null]));st=st.pipe(Zv(L=>L.map(([Y,Q])=>[Y,Q>0?1:0])));const ut=q.parentFilters&&q.parentFilters.length>0?{...q.query,where:[...q.query.where||[],...q.parentFilters]}:q.query,_=_c(ut,T,i,r,l,o,u,d,p,g,st,q.childCorrelationField);if(Object.assign(N,_.aliasToCollectionId),Object.assign(M,_.aliasRemapping),tt.push({pipeline:_.pipeline,fieldName:q.fieldName,correlationField:q.correlationField,childCorrelationField:q.childCorrelationField,hasOrderBy:!!(q.query.orderBy&&q.query.orderBy.length>0),childCompilationResult:_,parentProjection:q.parentProjection,materialization:q.materialization,scalarField:q.scalarField}),q.parentProjection&&q.parentProjection.length>0){const L=q.parentProjection.map(Q=>({alias:Q.path[0],field:Q.path.slice(1),compiled:fe(Q)})),Y=Z;X.push({fieldName:q.fieldName,getRouting:Q=>{const ot={};for(const it of L){ot[it.alias]||(ot[it.alias]={});const vt=it.compiled(Q);let xt=ot[it.alias];for(let bt=0;bt({correlationKey:Z(L),parentContext:null})});SO(E.select,k)}}if(E.distinct&&!E.fnSelect&&!E.select)throw new Nx;if(E.fnSelect&&E.groupBy&&E.groupBy.length>0)throw new Bx;E.fnSelect?W=W.pipe(oe(([dt,k])=>{const q=E.fnSelect(k);return[dt,{...k,$selected:q}]})):E.select?W=fO(W,E.select):W=W.pipe(oe(([dt,k])=>{const q=!E.join&&!E.groupBy?k[A]:k;return[dt,{...k,$selected:q}]})),X.length>0&&(W=W.pipe(oe(([dt,k])=>{const q={};for(const{fieldName:Z,getRouting:st}of X)q[Z]=st(k);return k.$selected[Ar]=q,[dt,k]})));const at=m?A:void 0;if(E.groupBy&&E.groupBy.length>0?W=xS(W,E.groupBy,E.having,E.select,E.fnHaving,I,at):E.select&&Object.values(E.select).some(k=>k.type===`agg`||Br(k))&&(W=xS(W,[],E.having,E.select,E.fnHaving,I,at)),E.having&&(!E.groupBy||E.groupBy.length===0)&&!(E.select?Object.values(E.select).some(k=>k.type===`agg`):!1))throw new Ix;if(E.fnHaving&&E.fnHaving.length>0&&(!E.groupBy||E.groupBy.length===0))for(const dt of E.fnHaving)W=W.pipe(ys(([k,q])=>dt(q)));if(E.distinct&&(W=W.pipe(mT(([dt,k])=>k.$selected))),E.orderBy&&E.orderBy.length>0){const dt=m&&(E.limit!==void 0||E.offset!==void 0)?(ut,_)=>{const L=_?.[A]?.__correlationKey,Y=_?.__parentContext;return Y!=null?JSON.stringify([L,Y]):L}:void 0,Z=FT(n,W,E.orderBy,E.select||{},i[I],u,d,E.limit,E.offset,dt).pipe(oe(([ut,[_,L]])=>{const Y=_.$selected,Q=zS(Md(Y),_);if(m){const ot=_[A]?.__correlationKey,it=_.__parentContext??null;return delete Q.__correlationKey,delete Q.__parentContext,[ut,[Q,L,ot,it]]}return[ut,[Q,L]]})),st={collectionId:I,pipeline:Z,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:M,includes:tt.length>0?tt:void 0};return p.set(n,st),st}else if(E.limit!==void 0||E.offset!==void 0)throw new Hx;const wt=W.pipe(oe(([dt,k])=>{const q=k.$selected,Z=zS(Md(q),k);if(m){const st=k[A]?.__correlationKey,ut=k.__parentContext??null;return delete Z.__correlationKey,delete Z.__parentContext,[dt,[Z,void 0,st,ut]]}return[dt,[Z,void 0]]})),Lt={collectionId:I,pipeline:wt,sourceWhereClauses:w,aliasToCollectionId:N,aliasRemapping:M,includes:tt.length>0?tt:void 0};return p.set(n,Lt),Lt}function pO(n){const t=new Set;if(n.from.type===`collectionRef`&&t.add(n.from.alias),n.join)for(const i of n.join)i.from.type===`collectionRef`&&t.add(i.from.alias);return t}function Dd(n,t=new Set){const i=pO(n);for(const l of i)if(t.has(l))throw new qx(l,Array.from(t));const r=new Set([...t,...i]);if(n.from.type===`queryRef`&&Dd(n.from.query,r),n.join)for(const l of n.join)l.from.type===`queryRef`&&Dd(l.from.query,r)}function gO(n,t,i,r,l,o,u,d,p,g,m,y,v){switch(n.type){case`collectionRef`:{const b=t[n.alias];if(!b)throw new Kv(n.alias,n.collection.id,Object.keys(t));return m[n.alias]=n.collection.id,{alias:n.alias,input:b,collectionId:n.collection.id}}case`queryRef`:{const b=g.get(n.query)||n.query,w=_c(b,t,i,r,l,o,u,d,p,g);Object.assign(m,w.aliasToCollectionId),Object.assign(y,w.aliasRemapping);const E=g.has(n.query),T=n.query.from.alias;if(!(!E&&n.alias===T))for(const[V,I]of w.sourceWhereClauses)v.set(V,I);const M=Object.keys(w.aliasToCollectionId).find(V=>w.aliasToCollectionId[V]===w.collectionId);M&&M!==n.alias&&(y[n.alias]=M);const A=w.pipeline.pipe(oe(V=>{const[I,[H,W]]=V,tt=Md(H);return[I,tt]}));return{alias:n.alias,input:A,collectionId:w.collectionId}}default:throw new Kx(n.type)}}function yO(n){return n instanceof ke||n&&typeof n==`object`&&`type`in n&&n.type===`val`}function Md(n){return yO(n)?n.value:n}function zS(n,t){if(!n||typeof n!=`object`)return n;let i=!1;for(const r of gd)if(n[r]==null&&r in t){i=!0;break}if(!i)return n;for(const r of gd)n[r]==null&&r in t&&(n[r]=t[r]);return n}function kd(n,t,i){if(n.from.type===`queryRef`&&t.from.type===`queryRef`&&(i.set(n.from.query,t.from.query),kd(n.from.query,t.from.query,i)),n.join&&t.join)for(let r=0;r1)return new Oe(r.slice(1));if(r.length===1&&r[0]!==void 0)return new Oe([r[0]])}return new Oe(Array.isArray(r)?r:[String(r)])}else{const r=[];for(const l of n.args){const o=dp(l,t);r.push(o)}return new Ve(n.name,r)}}function pp(n,t){return n.map(r=>{const l=dp(r.expression,t);return{...r,expression:l}})}const pw=new WeakMap;function wO(n){return n.utils?.[ap]?.getBuilder?.()}function bO(n,t){pw.set(n,t)}function EO(n){return pw.get(n)}class Wt{constructor(t={}){this.query={},this.query={...t}}_createRefForSource(t,i){let r;try{r=Object.keys(t)}catch{const d=t===null?`null`:`undefined`;throw new Xo(i,d)}if(Array.isArray(t))throw new Xo(i,`array`);if(r.length!==1)throw r.length===0?new Xo(i,`empty object`):r.every(d=>!isNaN(Number(d)))?new Xo(i,`string`):new Mx(i);const l=r[0],o=t[l];let u;if(o instanceof up)u=new jr(o,l);else if(o instanceof Wt){const d=o._getQuery();if(!d.from)throw new kx(i);u=new yn(d,l)}else throw new Ux(l);return[l,u]}from(t){const[,i]=this._createRefForSource(t,`from clause`);return new Wt({...this.query,from:i})}join(t,i,r=`left`){const[l,o]=this._createRefForSource(t,`join clause`),d=[...this._getCurrentAliases(),l],p=wi(d),g=i(p);let m,y;if(g.type===`func`&&g.name===`eq`&&g.args.length===2)m=g.args[0],y=g.args[1];else throw new zx;const v={from:o,type:r,left:m,right:y},b=this.query.join||[];return new Wt({...this.query,join:[...b,v]})}leftJoin(t,i){return this.join(t,i,`left`)}rightJoin(t,i){return this.join(t,i,`right`)}innerJoin(t,i){return this.join(t,i,`inner`)}fullJoin(t,i){return this.join(t,i,`full`)}where(t){const i=this._getCurrentAliases(),r=wi(i),l=t(r),o=lc(l)?se(l):l;if(!Nr(o))throw new oS(jS(o));const u=this.query.where||[];return new Wt({...this.query,where:[...u,o]})}having(t){const i=this._getCurrentAliases(),r=this.query.select||this.query.fnSelect?OS(i):wi(i),l=t(r),o=lc(l)?se(l):l;if(!Nr(o))throw new oS(jS(o));const u=this.query.having||[];return new Wt({...this.query,having:[...u,o]})}select(t){const i=this._getCurrentAliases(),r=wi(i);let l=t(r);lc(l)&&l.__path.length===1&&(l={[`__SPREAD_SENTINEL__${l.__path[0]}__0`]:!0});const o=yw(l,i);return new Wt({...this.query,select:o,fnSelect:void 0})}orderBy(t,i=`asc`){const r=this._getCurrentAliases(),l=this.query.select||this.query.fnSelect?OS(r):wi(r),o=t(l),u=typeof i==`string`?{direction:i,nulls:`first`}:{direction:i.direction??`asc`,nulls:i.nulls??`first`,stringSort:i.stringSort,locale:i.stringSort===`locale`?i.locale:void 0,localeOptions:i.stringSort===`locale`?i.localeOptions:void 0},d=m=>({expression:se(m),compareOptions:u}),p=Array.isArray(o)?o.map(m=>d(m)):[d(o)],g=this.query.orderBy||[];return new Wt({...this.query,orderBy:[...g,...p]})}groupBy(t){const i=this._getCurrentAliases(),r=wi(i),l=t(r),o=Array.isArray(l)?l.map(d=>se(d)):[se(l)],u=this.query.groupBy||[];return new Wt({...this.query,groupBy:[...u,...o]})}limit(t){return new Wt({...this.query,limit:t})}offset(t){return new Wt({...this.query,offset:t})}distinct(){return new Wt({...this.query,distinct:!0})}findOne(){return new Wt({...this.query,singleResult:!0})}_getCurrentAliases(){const t=[];if(this.query.from&&t.push(this.query.from.alias),this.query.join)for(const i of this.query.join)t.push(i.from.alias);return t}get fn(){const t=this;return{select(i){return new Wt({...t.query,select:void 0,fnSelect:i})},where(i){return new Wt({...t.query,fnWhere:[...t.query.fnWhere||[],i]})},having(i){return new Wt({...t.query,fnHaving:[...t.query.fnHaving||[],i]})}}}_getQuery(){if(!this.query.from)throw new jx;return this.query}}function jS(n){return n===null?`null`:n===void 0?`undefined`:typeof n==`object`?`object`:typeof n}function CO(n){return n===void 0?se(null):n instanceof qv||n instanceof Ve||n instanceof Oe||n instanceof ke?n:se(n)}function gw(n){return n!==null&&typeof n==`object`&&!Nr(n)&&!n.__refProxy}function yw(n,t=[]){if(!gw(n))return CO(n);const i={};for(const[r,l]of Object.entries(n)){if(typeof r==`string`&&r.startsWith(`__SPREAD_SENTINEL__`)){i[r]=l;continue}if(l instanceof Wt){i[r]=Gh(l,r,t,`collection`);continue}if(l instanceof eA){if(!(l.query instanceof Wt))throw new Error(`toArray() must wrap a subquery builder`);i[r]=Gh(l.query,r,t,`array`);continue}if(l instanceof nA){if(!(l.query instanceof Wt))throw new Error(`concat(toArray(...)) must wrap a subquery builder`);i[r]=Gh(l.query,r,t,`concat`);continue}i[r]=yw(l,t)}return i}function gp(n){const t=[];switch(n.type){case`ref`:t.push(n);break;case`func`:for(const i of n.args??[])t.push(...gp(i));break}return t}function xO(n,t){const i=typeof n==`object`&&`expression`in n?n.expression:n;return gp(i).some(r=>r.path[0]!=null&&t.includes(r.path[0]))}function Gh(n,t,i,r){const l=n._getQuery(),o=[l.from.alias];if(l.join)for(const R of l.join)o.push(R.from.alias);let u,d,p=-1,g=-1;if(l.where)for(let R=0;R=2){for(let I=0;I eq(child.parentId, parent.id))`);const m=[...l.where];if(g>=0){const R=m[p],V=(typeof R==`object`&&`expression`in R?R.expression:R).args.filter((I,H)=>H!==g);if(V.length===1){const I=typeof R==`object`&&`expression`in R&&R.residual;m[p]=I?{expression:V[0],residual:!0}:V[0]}else{const I=new Ve(`and`,V),H=typeof R==`object`&&`expression`in R&&R.residual;m[p]=H?{expression:I,residual:!0}:I}}else m.splice(p,1);const y=[],v=[];for(const R of m)xO(R,i)?v.push(R):y.push(R);let b;if(v.length>0){const R=new Set;b=[];for(const A of v){const V=typeof A==`object`&&`expression`in A?A.expression:A;for(const I of gp(V))I.path[0]!=null&&i.includes(I.path[0])&&!R.has(I.path.join(`.`))&&(R.add(I.path.join(`.`)),b.push(I))}}const w={...l,where:y.length>0?y:void 0},E=w.select,T=E===void 0||gw(E);let N=w,M;if(r===`concat`&&(E===void 0||T))throw new Error(`concat(toArray(...)) for "${t}" requires the subquery to select a scalar value`);if(!T){if(r===`collection`)throw new Error(`Includes subquery for "${t}" must select an object when materializing as a Collection`);M=ex,N={...w,select:{[M]:E}}}return new Ai(N,u,d,t,v.length>0?v:void 0,b,r,M)}function NS(n,t,i,r){if(n.type===`ref`&&t.type===`ref`){const l=n.path[0],o=t.path[0];if(l&&o&&i.includes(l)&&r.includes(o))return{parentRef:n,childRef:t};if(l&&o&&i.includes(o)&&r.includes(l))return{parentRef:t,childRef:n}}}function _O(n){const t=n(new Wt);return mw(t)}function mw(n){return n._getQuery()}function TO(n){const t={};function i(o){o.type===`collectionRef`?t[o.collection.id]=o.collection:o.type===`queryRef`&&r(o.query)}function r(o){if(o.from&&i(o.from),o.join&&Array.isArray(o.join))for(const u of o.join)u.from&&i(u.from);o.select&&l(o.select)}function l(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ai?r(d.query):yp(d)&&l(d))}return r(n),t}function Sw(n){const t=n.from;if(t.type===`collectionRef`)return t.collection;if(t.type===`queryRef`)return Sw(t.query);throw new Error(`Failed to extract collection. Invalid FROM clause: ${JSON.stringify(n)}`)}function AO(n){const t=new Map;function i(o){if(o)if(o.type===`collectionRef`){const{id:u}=o.collection,d=t.get(u);d?d.add(o.alias):t.set(u,new Set([o.alias]))}else o.type===`queryRef`&&l(o.query)}function r(o){for(const[u,d]of Object.entries(o))typeof u==`string`&&u.startsWith(`__SPREAD_SENTINEL__`)||(d instanceof Ai?l(d.query):yp(d)&&r(d))}function l(o){if(o){if(i(o.from),o.join)for(const u of o.join)i(u.from);o.select&&r(o.select)}}return l(n),t}function yp(n){return!(n===null||typeof n!=`object`||n instanceof Ai||`type`in n&&typeof n.type==`string`||n.__refProxy)}function OO(n){const t=typeof n.query==`function`?_O(n.query):mw(n.query);if(t.select&&!yp(t.select))throw new Lx;return t}function RO(n,t,i){const r=[];for(const l of t){const o=i(l.value);l.type===`insert`?r.push([[o,l.value],1]):l.type===`update`?(r.push([[o,l.previousValue],-1]),r.push([[o,l.value],1])):r.push([[o,l.value],-1])}return r.length!==0&&n.sendData(new ne(r)),r.length}function*DO(n){for(const t of n)t.type===`update`?(yield{type:`delete`,key:t.key,value:t.previousValue},yield{type:`insert`,key:t.key,value:t.value}):yield t}function MO(n,t){const i=[];for(const r of n){if(r.type===`insert`){if(t.has(r.key))continue;t.add(r.key)}else r.type===`delete`&&t.delete(r.key);i.push(r)}return i}function kO(n,t,i,r){let l=t,o=!1;for(const u of n){if(u.type===`delete`)continue;const d=!i.has(u.key);l===void 0||r(l,u.value)<0?(l=u.value,o=!0):d&&(o=!0)}return{biggest:l,shouldResetLoadKey:o}}function UO(n,t){const{orderBy:i,limit:r,offset:l}=n,o=r!==void 0&&l!==void 0?r+l:r,u=i?pp(i,t):void 0,d=u?.every(p=>{const g=p.expression;if(g.type!==`ref`)return!1;const m=g.path;return Array.isArray(m)&&m.length===1})??!1;return{orderBy:d?u:void 0,limit:d?o:void 0}}function zO(n,t,i,r,l){const{orderBy:o,valueExtractorForRawRow:u,offset:d}=n,p=t?u(t):void 0;let g;p!==void 0&&(g=Array.isArray(p)?p:[p]);const m=ll({minValues:g??null,offset:d,limit:l});if(i===m)return;const y=pp(o,r);return{minValues:g,normalizedOrderBy:y,loadRequestKey:m}}const BS=Symbol.for(`@tanstack/db.collection-config-builder`);class jO{constructor(t,i,r,l){this.alias=t,this.collectionId=i,this.collection=r,this.collectionConfigBuilder=l,this.biggest=void 0,this.subscriptionLoadingPromises=new Map,this.sentToD2Keys=new Set}subscribe(){const t=this.getWhereClauseForAlias();if(t){const i=dp(t,this.alias);return this.subscribeToChanges(i)}return this.subscribeToChanges()}subscribeToChanges(t){const i=this.getOrderByInfo(),r=d=>{d instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(d)},l=d=>{const p=d.subscription;if(d.status===`loadingSubset`)this.ensureLoadingPromise(p);else{const g=this.subscriptionLoadingPromises.get(p);g&&(this.subscriptionLoadingPromises.delete(p),g.resolve())}};let o;if(i)o=this.subscribeToOrderedChanges(t,i,l,r);else{const d=!this.collectionConfigBuilder.isLazyAlias(this.alias);o=this.subscribeToMatchingChanges(t,d,l)}o.status===`loadingSubset`&&this.ensureLoadingPromise(o);const u=()=>{const d=this.subscriptionLoadingPromises.get(o);d&&(this.subscriptionLoadingPromises.delete(o),d.resolve()),o.unsubscribe()};return this.collectionConfigBuilder.currentSyncState.unsubscribeCallbacks.add(u),o}sendChangesToPipeline(t,i){const r=Array.isArray(t)?t:[...t],l=MO(r,this.sentToD2Keys),o=this.collectionConfigBuilder.currentSyncState.inputs[this.alias],d=RO(o,l,this.collection.config.getKey)>0?i:void 0;this.collectionConfigBuilder.scheduleGraphRun(d,{alias:this.alias})}subscribeToMatchingChanges(t,i,r){const l=p=>{this.sendChangesToPipeline(p)},o=UO(this.collectionConfigBuilder.query,this.alias),u=i?p=>{p instanceof Promise&&this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(p)}:void 0;return this.collection.subscribeChanges(l,{...i&&{includeInitialState:i},whereExpression:t,onStatusChange:r,orderBy:o.orderBy,limit:o.limit,onLoadSubsetResult:u})}subscribeToOrderedChanges(t,i,r,l){const{orderBy:o,offset:u,limit:d,index:p}=i,g=E=>{E instanceof Promise&&(this.pendingOrderedLoadPromise=E,E.finally(()=>{this.pendingOrderedLoadPromise===E&&(this.pendingOrderedLoadPromise=void 0)})),l(E)};this.orderedLoadSubsetResult=g;const m={},y=E=>{const T=Array.isArray(E)?E:[...E];this.trackSentValues(T,i.comparator);const N=DO(T);this.sendChangesToPipelineWithTracking(N,m.current)},v=this.collection.subscribeChanges(y,{whereExpression:t,onStatusChange:r});m.current=v;const b=this.collection.on(`truncate`,()=>{this.biggest=void 0,this.lastLoadRequestKey=void 0,this.pendingOrderedLoadPromise=void 0,this.sentToD2Keys.clear()});v.on(`unsubscribed`,()=>{b()});const w=pp(o,this.alias);return p?(v.setOrderByIndex(p),v.requestLimitedSnapshot({limit:u+d,orderBy:w,trackLoadSubsetPromise:!1,onLoadSubsetResult:g})):v.requestSnapshot({orderBy:w,limit:u+d,trackLoadSubsetPromise:!1,onLoadSubsetResult:g}),v}loadMoreIfNeeded(t){const i=this.getOrderByInfo();if(!i)return!0;const{dataNeeded:r}=i;if(!r||this.pendingOrderedLoadPromise)return!0;const l=r();return l>0&&this.loadNextItems(l,t),!0}sendChangesToPipelineWithTracking(t,i){if(!this.getOrderByInfo()){this.sendChangesToPipeline(t);return}const l=i;l[BS]??=this.loadMoreIfNeeded.bind(this,i),this.sendChangesToPipeline(t,l[BS])}loadNextItems(t,i){const r=this.getOrderByInfo();if(!r)return;const l=zO(r,this.biggest,this.lastLoadRequestKey,this.alias,t);l&&(this.lastLoadRequestKey=l.loadRequestKey,i.requestLimitedSnapshot({orderBy:l.normalizedOrderBy,limit:t,minValues:l.minValues,trackLoadSubsetPromise:!1,onLoadSubsetResult:this.orderedLoadSubsetResult}))}getWhereClauseForAlias(){const t=this.collectionConfigBuilder.sourceWhereClausesCache;if(t)return t.get(this.alias)}getOrderByInfo(){const t=this.collectionConfigBuilder.optimizableOrderByCollections[this.collectionId];if(t&&t.alias===this.alias)return t}trackSentValues(t,i){const r=kO(t,this.biggest,this.sentToD2Keys,i);this.biggest=r.biggest,r.shouldResetLoadKey&&(this.lastLoadRequestKey=void 0)}ensureLoadingPromise(t){if(this.subscriptionLoadingPromises.has(t))return;let i;const r=new Promise(l=>{i=l});this.subscriptionLoadingPromises.set(t,{resolve:i}),this.collectionConfigBuilder.liveQueryCollection._sync.trackLoadPromise(r)}}let NO=0;class BO{constructor(t){this.config=t,this.compiledAliasToCollectionId={},this.resultKeys=new WeakMap,this.orderByIndices=new WeakMap,this.isGraphRunning=!1,this.runCount=0,this.isInErrorState=!1,this.aliasDependencies={},this.builderDependencies=new Set,this.pendingGraphRuns=new Map,this.subscriptions={},this.lazySourcesCallbacks={},this.lazySources=new Set,this.optimizableOrderByCollections={},this.id=t.id||`live-query-${++NO}`,this.query=OO({query:t.query}),this.collections=TO(this.query);const i=AO(this.query);this.collectionByAlias={};for(const[r,l]of i.entries()){const o=this.collections[r];if(o)for(const u of l)this.collectionByAlias[u]=o}this.query.orderBy&&this.query.orderBy.length>0&&(this.compare=vw(this.orderByIndices)),this.compareOptions=this.config.defaultStringCollation??Sw(this.query).compareOptions,this.compileBasePipeline()}hasJoins(t){return!!(t.join&&t.join.length>0||t.from.type===`queryRef`&&this.hasJoins(t.from.query))}getConfig(){return{id:this.id,getKey:this.config.getKey||(t=>this.resultKeys.get(t)),sync:this.getSyncConfig(),compare:this.compare,defaultStringCollation:this.compareOptions,gcTime:this.config.gcTime||5e3,schema:this.config.schema,onInsert:this.config.onInsert,onUpdate:this.config.onUpdate,onDelete:this.config.onDelete,startSync:this.config.startSync,singleResult:this.query.singleResult,utils:{getRunCount:this.getRunCount.bind(this),setWindow:this.setWindow.bind(this),getWindow:this.getWindow.bind(this),[ap]:{getBuilder:()=>this,hasCustomGetKey:!!this.config.getKey,hasJoins:this.hasJoins(this.query),hasDistinct:!!this.query.distinct}}}}setWindow(t){if(!this.windowFn)throw new l_;return this.currentWindow=t,this.windowFn(t),this.maybeRunGraphFn?.(),this.liveQueryCollection?.isLoadingSubset?new Promise(i=>{const r=this.liveQueryCollection.on(`loadingSubset:change`,l=>{l.isLoadingSubset||(r(),i())})}):!0}getWindow(){if(!(!this.windowFn||!this.currentWindow))return{offset:this.currentWindow.offset??0,limit:this.currentWindow.limit??0}}getCollectionIdForAlias(t){const i=this.compiledAliasToCollectionId[t];if(i)return i;const r=this.collectionByAlias[t];if(r)return r.id;throw new Error(`Unknown source alias "${t}"`)}isLazyAlias(t){return this.lazySources.has(t)}maybeRunGraph(t){if(!this.isGraphRunning){if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`maybeRunGraph called without active sync session. This should not happen.`);this.isGraphRunning=!0;try{const{begin:i,commit:r}=this.currentSyncConfig,l=this.currentSyncState;if(this.isInErrorState)return;if(l.subscribedToAllCollections){let o=!1;for(;l.graph.pendingWork();)l.graph.run(),l.flushPendingChanges?.(),t?.(),o=!0;o||t?.(),l.messagesCount===0&&(i(),r()),this.updateLiveQueryStatus(this.currentSyncConfig)}}finally{this.isGraphRunning=!1}}}scheduleGraphRun(t,i){const r=i?.contextId??cc()?.id,l=i?.jobId??this,o=(()=>{if(i?.dependencies)return i.dependencies;const p=new Set(this.builderDependencies);if(i?.alias){const g=this.aliasDependencies[i.alias];if(g)for(const m of g)p.add(m)}return p.delete(this),Array.from(p)})();if(r)for(const p of o)typeof p.scheduleGraphRun==`function`&&p.scheduleGraphRun(void 0,{contextId:r});if(!this.currentSyncConfig||!this.currentSyncState)throw new Error(`scheduleGraphRun called without active sync session. This should not happen.`);let u=r?this.pendingGraphRuns.get(r):void 0;u||(u={loadCallbacks:new Set},r&&this.pendingGraphRuns.set(r,u)),t&&u.loadCallbacks.add(t);const d=r?void 0:u;Ec.schedule({contextId:r,jobId:l,dependencies:o,run:()=>this.executeGraphRun(r,d)})}clearPendingGraphRun(t){this.pendingGraphRuns.delete(t)}hasPendingGraphRun(t){return this.pendingGraphRuns.has(t)}executeGraphRun(t,i){const r=i??(t?this.pendingGraphRuns.get(t):void 0);if(t&&this.pendingGraphRuns.delete(t),!r||!this.currentSyncConfig||!this.currentSyncState)return;this.incrementRunCount();const l=()=>{let o=!0,u;if(r.loadCallbacks.forEach(d=>{try{o=d()&&o}catch(p){o=!1,u??=p}}),u)throw u;return o};this.maybeRunGraph(l)}getSyncConfig(){return{rowUpdateMode:`full`,sync:this.syncFn.bind(this)}}incrementRunCount(){this.runCount++}getRunCount(){return this.runCount}syncFn(t){this.liveQueryCollection=t.collection,this.currentSyncConfig=t;const i={messagesCount:0,subscribedToAllCollections:!1,unsubscribeCallbacks:new Set},r=this.extendPipelineWithChangeProcessing(t,i);this.currentSyncState=r,this.unsubscribeFromSchedulerClears=Ec.onClear(u=>{this.clearPendingGraphRun(u)});const l=t.collection.on(`loadingSubset:change`,u=>{u.isLoadingSubset||this.updateLiveQueryStatus(t)});i.unsubscribeCallbacks.add(l);const o=this.subscribeToAllCollections(t,r);return this.maybeRunGraphFn=()=>this.scheduleGraphRun(o),this.scheduleGraphRun(o),()=>{i.unsubscribeCallbacks.forEach(u=>u()),this.currentSyncConfig=void 0,this.currentSyncState=void 0,this.pendingGraphRuns.clear(),this.graphCache=void 0,this.inputsCache=void 0,this.pipelineCache=void 0,this.sourceWhereClausesCache=void 0,this.includesCache=void 0,this.lazySources.clear(),this.optimizableOrderByCollections={},this.lazySourcesCallbacks={},Object.keys(this.subscriptions).forEach(u=>delete this.subscriptions[u]),this.compiledAliasToCollectionId={},this.unsubscribeFromSchedulerClears?.(),this.unsubscribeFromSchedulerClears=void 0}}compileBasePipeline(){this.graphCache=new hT,this.inputsCache=Object.fromEntries(Object.keys(this.collectionByAlias).map(r=>[r,this.graphCache.newInput()]));const t=_c(this.query,this.inputsCache,this.collections,this.subscriptions,this.lazySourcesCallbacks,this.lazySources,this.optimizableOrderByCollections,r=>{this.windowFn=r});this.pipelineCache=t.pipeline,this.sourceWhereClausesCache=t.sourceWhereClauses,this.compiledAliasToCollectionId=t.aliasToCollectionId,this.includesCache=t.includes;const i=Object.keys(this.compiledAliasToCollectionId).filter(r=>!Object.hasOwn(this.inputsCache,r));if(i.length>0)throw new a_(i)}maybeCompileBasePipeline(){return(!this.graphCache||!this.inputsCache||!this.pipelineCache)&&this.compileBasePipeline(),{graph:this.graphCache,inputs:this.inputsCache,pipeline:this.pipelineCache}}extendPipelineWithChangeProcessing(t,i){const{begin:r,commit:l}=t,{graph:o,inputs:u,pipeline:d}=this.maybeCompileBasePipeline();let p=new Map;d.pipe(Sd(m=>{const y=m.getInner();i.messagesCount+=y.length,y.reduce($O,p)}));const g=this.setupIncludesOutput(this.includesCache,i);return i.flushPendingChanges=()=>{const m=p.size>0,y=KO(g);if(!m&&!y)return;let v=p;if(this.config.getKey){const b=new Map;for(const[,w]of p){const E=this.config.getKey(w.value),T=b.get(E);T?(T.inserts+=w.inserts,T.deletes+=w.deletes,w.inserts>0&&(T.value=w.value,w.orderByIndex!==void 0&&(T.orderByIndex=w.orderByIndex))):b.set(E,{...w})}v=b}m&&(r(),v.forEach(this.applyChanges.bind(this,t)),l()),p=new Map,Ud(g,t.collection,this.id,m?v:null,t)},o.finalize(),i.graph=o,i.inputs=u,i.pipeline=d,i}setupIncludesOutput(t,i){return!t||t.length===0?[]:t.map(r=>{const l={fieldName:r.fieldName,childCorrelationField:r.childCorrelationField,hasOrderBy:r.hasOrderBy,materialization:r.materialization,scalarField:r.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return r.pipeline.pipe(Sd(o=>{const u=o.getInner();i.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Lr(v,b);let E=l.pendingChildChanges.get(w);E||(E=new Map,l.pendingChildChanges.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}})),r.childCompilationResult.includes&&(l.nestedSetups=ww(r.childCompilationResult.includes,i),l.nestedRoutingIndex=new Map,l.nestedRoutingReverseIndex=new Map),l})}applyChanges(t,i,r){const{write:l,collection:o}=t,{deletes:u,inserts:d,value:p,orderByIndex:g}=i;if(this.resultKeys.set(p,r),g!==void 0&&this.orderByIndices.set(p,g),d&&u===0)l({value:p,type:`insert`});else if(d>u||d===u&&o.has(o.getKeyFromItem(p)))l({value:p,type:`update`});else if(u>0)l({value:p,type:`delete`});else throw new Error(`Could not apply changes: ${JSON.stringify(i)}. This should never happen.`)}handleSourceStatusChange(t,i,r){const{status:l}=r;if(l===`error`){this.transitionToError(`Source collection '${i}' entered error state`);return}if(l===`cleaned-up`){this.transitionToError(`Source collection '${i}' was manually cleaned up while live query '${this.id}' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call.`);return}this.updateLiveQueryStatus(t)}updateLiveQueryStatus(t){const{markReady:i}=t;if(this.isInErrorState)return;const r=this.currentSyncState?.subscribedToAllCollections,l=this.allCollectionsReady(),o=this.liveQueryCollection?.isLoadingSubset;r&&l&&!o&&i()}transitionToError(t){this.isInErrorState=!0,console.error(`[Live Query Error] ${t}`),this.liveQueryCollection?._lifecycle.setStatus(`error`)}allCollectionsReady(){return Object.values(this.collections).every(t=>t.isReady())}subscribeToAllCollections(t,i){const r=Object.entries(this.compiledAliasToCollectionId);if(r.length===0)throw new Error(`Compiler returned no alias metadata for query '${this.id}'. This should not happen; please report.`);const l=r.map(([u,d])=>{const p=this.collectionByAlias[u]??this.collections[d],g=EO(p);g&&g!==this?(this.aliasDependencies[u]=[g],this.builderDependencies.add(g)):this.aliasDependencies[u]=[];const m=new jO(u,d,p,this),y=p.on(`status:change`,w=>{this.handleSourceStatusChange(t,d,w)});i.unsubscribeCallbacks.add(y);const v=m.subscribe();return this.subscriptions[u]=v,m.loadMoreIfNeeded.bind(m,v)}),o=()=>(l.map(u=>u()),!0);return i.subscribedToAllCollections=!0,o}}function vw(n){return(t,i)=>{const r=n.get(t),l=n.get(i);return r&&l?rl?1:0:0}}function LS(n){return n.materialization!==`collection`}function IS(n,t){if(!t)return n.materialization===`array`?[]:n.materialization===`concat`?``:void 0;if(n.materialization===`collection`)return t.collection;const i=[...t.collection.toArray],r=n.scalarField?i.map(l=>l?.[n.scalarField]):i;return n.materialization===`array`?r:r.map(l=>String(l??``)).join(``)}function ww(n,t){return n.map(i=>{const r=new Map;i.pipeline.pipe(Sd(o=>{const u=o.getInner();t.messagesCount+=u.length;for(const[[d,p],g]of u){const[m,y,v,b]=p,w=Lr(v,b);let E=r.get(w);E||(E=new Map,r.set(w,E));const T=E.get(d)||{deletes:0,inserts:0,value:m,orderByIndex:y};g<0?T.deletes+=Math.abs(g):g>0&&(T.inserts+=g,T.value=m),E.set(d,T)}}));const l={compilationResult:i,buffer:r};return i.childCompilationResult.includes&&(l.nestedSetups=ww(i.childCompilationResult.includes,t)),l})}function LO(n){return n.map(t=>{const i={fieldName:t.compilationResult.fieldName,childCorrelationField:t.compilationResult.childCorrelationField,hasOrderBy:t.compilationResult.hasOrderBy,materialization:t.compilationResult.materialization,scalarField:t.compilationResult.scalarField,childRegistry:new Map,pendingChildChanges:new Map,correlationToParentKeys:new Map};return t.nestedSetups&&(i.nestedSetups=t.nestedSetups,i.nestedRoutingIndex=new Map,i.nestedRoutingReverseIndex=new Map),i})}function IO(n){const t=new Set;if(!n.nestedSetups)return t;for(let i=0;i0&&(b.value=y.value,y.orderByIndex!==void 0&&(b.orderByIndex=y.orderByIndex))):v.set(m,{...y})}t.add(d),l.push(o)}for(const o of l)r.buffer.delete(o)}return t}function HO(n,t,i){if(n.nestedSetups){for(const r of n.nestedSetups)for(const[,l]of i)if(l.inserts>0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Lr(u,d);if(u!=null){n.nestedRoutingIndex.set(p,t);let g=n.nestedRoutingReverseIndex.get(t);g||(g=new Set,n.nestedRoutingReverseIndex.set(t,g)),g.add(p)}}else if(l.deletes>0&&l.inserts===0){const o=l.value[Ar]?.[r.compilationResult.fieldName],u=o?.correlationKey,d=o?.parentContext??null,p=Lr(u,d);if(u!=null){n.nestedRoutingIndex.delete(p);const g=n.nestedRoutingReverseIndex.get(t);g&&(g.delete(p),g.size===0&&n.nestedRoutingReverseIndex.delete(t))}}}}function qO(n,t){if(!n.nestedRoutingReverseIndex)return;const i=n.nestedRoutingReverseIndex.get(t);if(i){for(const r of i)n.nestedRoutingIndex.delete(r);n.nestedRoutingReverseIndex.delete(t)}}function bw(n){for(const t of n)if(t.buffer.size>0||t.nestedSetups&&bw(t.nestedSetups))return!0;return!1}function Lr(n,t){return t==null?n:JSON.stringify([n,t])}function HS(n,t,i,r,l){const o=new WeakMap,u=r?new WeakMap:null;let d=null;const p=u?vw(u):void 0,m={collection:cp({id:`__child-collection:${n}-${t}-${ll(i)}`,getKey:y=>o.get(y),compare:p,sync:{rowUpdateMode:`full`,sync:y=>(d=y,()=>{d=null})},startSync:!0}),get syncMethods(){return d},resultKeys:o,orderByIndices:u};return l&&(m.includesStates=LO(l)),m}function Ud(n,t,i,r,l){for(const o of n){if(r){for(const[m,y]of r)if(y.inserts>0){const v=y.value,b=v[Ar]?.[o.fieldName],w=b?.correlationKey,E=b?.parentContext??null,T=Lr(w,E);if(w!=null){if(!o.childRegistry.has(T)){const A=HS(i,o.fieldName,T,o.hasOrderBy,o.nestedSetups);o.childRegistry.set(T,A)}let N=o.correlationToParentKeys.get(T);N||(N=new Set,o.correlationToParentKeys.set(T,N)),N.add(m);const M=IS(o,o.childRegistry.get(T));v[o.fieldName]=M;const R=t.get(m);R&&R!==v&&(R[o.fieldName]=M)}}}const u=LS(o)?new Set(o.pendingChildChanges.keys()):null,d=new Map;if(o.pendingChildChanges.size>0){for(const[m,y]of o.pendingChildChanges){let v=o.childRegistry.get(m);if(v||(v=HS(i,o.fieldName,m,o.hasOrderBy,o.nestedSetups),o.childRegistry.set(m,v)),o.materialization===`collection`&&VO(t,o.fieldName,m,o.correlationToParentKeys,v.collection),v.syncMethods){v.syncMethods.begin();for(const[b,w]of y)v.resultKeys.set(w.value,b),v.orderByIndices&&w.orderByIndex!==void 0&&v.orderByIndices.set(w.value,w.orderByIndex),w.inserts>0&&w.deletes===0?v.syncMethods.write({value:w.value,type:`insert`}):w.inserts>w.deletes||w.inserts===w.deletes&&v.syncMethods.collection.has(v.syncMethods.collection.getKeyFromItem(w.value))?v.syncMethods.write({value:w.value,type:`update`}):w.deletes>0&&v.syncMethods.write({value:w.value,type:`delete`});v.syncMethods.commit()}HO(o,m,y),d.set(m,{entry:v,childChanges:y})}o.pendingChildChanges.clear()}const p=IO(o);for(const[,{entry:m,childChanges:y}]of d)m.includesStates&&Ud(m.includesStates,m.collection,m.collection.id,y,m.syncMethods);for(const m of p){if(d.has(m))continue;const y=o.childRegistry.get(m);y?.includesStates&&Ud(y.includesStates,y.collection,y.collection.id,null,y.syncMethods)}const g=LS(o)?new Set([...u||[],...p]):null;if(l&&g&&g.size>0){const m=[];for(const y of g){const v=o.correlationToParentKeys.get(y);if(!v)continue;const b=o.childRegistry.get(y);for(const w of v){const E=t.get(w);if(E){const T=l.collection.getKeyFromItem(E),N={...E};E[o.fieldName]=IS(o,b),m.push({type:`update`,key:T,value:E,previousValue:N})}}}m.length>0&&t._changes.emitEvents(m,!0)}if(r){for(const[m,y]of r)if(y.deletes>0&&y.inserts===0){const v=y.value[Ar]?.[o.fieldName],b=v?.correlationKey,w=v?.parentContext??null,E=Lr(b,w);if(b!=null){const T=o.correlationToParentKeys.get(E);T&&(T.delete(m),T.size===0&&(qO(o,E),o.childRegistry.delete(E),o.correlationToParentKeys.delete(E)))}}}}if(r)for(const[,o]of r)delete o.value[Ar]}function KO(n){for(const t of n)if(t.pendingChildChanges.size>0||t.nestedSetups&&bw(t.nestedSetups))return!0;return!1}function VO(n,t,i,r,l){const o=r.get(i);if(o)for(const u of o){const d=n.get(u);d&&(d[t]=l)}}function $O(n,[[t,i],r]){const[l,o]=i,u=n.get(t)||{deletes:0,inserts:0,value:l,orderByIndex:o};return r<0?u.deletes+=Math.abs(r):r>0&&(u.inserts+=r,u.value=l,o!==void 0&&(u.orderByIndex=o)),n.set(t,u),n}function qS(n){return new BO(n).getConfig()}function Yh(n){if(typeof n==`function`){const i=qS({query:n});return KS(i)}else{const t=n,i=qS(t);return t.utils&&(i.utils={...i.utils,...t.utils}),KS(i)}}function KS(n){const t=cp(n),i=wO(n);return i&&bO(t,i),t}function Ew(n){return n!=null&&`operation`in n.headers}function Cw(n){return n!=null&&`control`in n.headers}var GO=class{handlers=new Map;pendingHandlers=new Set;isUpToDate=!1;preloadResolvers=[];preloadRejecters=[];seenTxids=new Set;pendingTxids=new Set;txidResolvers=new Map;existingKeys=new Map;registerHandler(n,t){this.handlers.set(n,t),this.existingKeys.has(n)||this.existingKeys.set(n,new Set)}dispatchChange(n){if(!Ew(n))return;n.headers.txid&&typeof n.headers.txid==`string`&&this.pendingTxids.add(n.headers.txid);const t=this.handlers.get(n.type);if(!t)return;let i=n.headers.operation;if(i!==`delete`&&(typeof n.value!=`object`||n.value===null))throw new Error(`StreamDB collections require object values; got ${typeof n.value} for type=${n.type}, key=${n.key}`);const l={...n.value??{}};l[t.primaryKey]=n.key,this.pendingHandlers.has(t)||(t.begin(),this.pendingHandlers.add(t)),i===`upsert`&&(i=this.existingKeys.get(n.type)?.has(n.key)?`update`:`insert`);const o=this.existingKeys.get(n.type);i===`insert`||i===`update`?o?.add(n.key):o?.delete(n.key);try{t.write(l,i)}catch(u){throw console.error(`[StreamDB] Error in handler.write():`,u),console.error(`[StreamDB] Event that caused error:`,{type:n.type,key:n.key,operation:i}),u}}dispatchControl(n){if(Cw(n))switch(n.headers.control){case`reset`:for(const t of this.handlers.values())t.truncate();for(const t of this.existingKeys.values())t.clear();this.pendingHandlers.clear(),this.isUpToDate=!1;break}}markUpToDate(){for(const n of this.pendingHandlers)try{n.commit()}catch(t){if(console.error(`[StreamDB] Error in handler.commit():`,t),t instanceof Error&&t.message.includes(`already exists in the collection`)&&t.message.includes(`live-query`)){console.warn(`[StreamDB] Known TanStack DB groupBy bug detected - continuing despite error`),console.warn(`[StreamDB] Queries with groupBy may show stale data until fixed`);continue}throw t}this.pendingHandlers.clear();for(const n of this.pendingTxids){this.seenTxids.add(n);const t=this.txidResolvers.get(n);if(t){for(const{resolve:i,timeoutId:r}of t)clearTimeout(r),i();this.txidResolvers.delete(n)}}if(this.pendingTxids.clear(),!this.isUpToDate){this.isUpToDate=!0;for(const n of this.handlers.values())n.markReady();for(const n of this.preloadResolvers)n();this.preloadResolvers=[]}}waitForUpToDate(){return this.isUpToDate?Promise.resolve():new Promise((n,t)=>{this.preloadResolvers.push(n),this.preloadRejecters.push(t)})}rejectAll(n){for(const t of this.preloadRejecters)t(n);this.preloadResolvers=[],this.preloadRejecters=[];for(const t of this.txidResolvers.values())for(const{reject:i,timeoutId:r}of t)clearTimeout(r),i(n);this.txidResolvers.clear()}get ready(){return this.isUpToDate}awaitTxId(n,t=5e3){return this.seenTxids.has(n)?Promise.resolve():new Promise((i,r)=>{const l=setTimeout(()=>{const o=this.txidResolvers.get(n);if(o){const u=o.findIndex(d=>d.timeoutId===l);u!==-1&&o.splice(u,1),o.length===0&&this.txidResolvers.delete(n)}r(new Error(`Timeout waiting for txid: ${n}`))},t);this.txidResolvers.has(n)||this.txidResolvers.set(n,[]),this.txidResolvers.get(n).push({resolve:i,reject:r,timeoutId:l})})}};function YO(n,t,i){return{sync:({begin:r,write:l,commit:o,markReady:u,truncate:d})=>(t.registerHandler(n,{begin:r,write:(p,g)=>{l({value:p,type:g})},commit:o,markReady:u,truncate:d,primaryKey:i}),t.ready&&u(),()=>{})}}const VS=new Set([`collections`,`preload`,`close`,`utils`,`actions`]);function FO(n,t,i){return{insert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} insert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} insert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`insert`}}},update:({key:r,value:l,oldValue:o,headers:u})=>{const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} update: ${d.issues?.map(m=>m.message).join(`, `)??`Unknown validation error`}`);if(o!==void 0){const m=i[`~standard`].validate(o);if(`issues`in m)throw new Error(`Validation failed for ${n} update (oldValue): ${m.issues?.map(y=>y.message).join(`, `)??`Unknown validation error`}`)}const p=l[t],g=r??(p!=null&&p!==``?String(p):void 0);if(g==null||g===``)throw new Error(`Cannot create ${n} update event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:g,value:l,old_value:o,headers:{...u,operation:`update`}}},delete:({key:r,oldValue:l,headers:o})=>{if(l!==void 0){const d=i[`~standard`].validate(l);if(`issues`in d)throw new Error(`Validation failed for ${n} delete (oldValue): ${d.issues?.map(p=>p.message).join(`, `)??`Unknown validation error`}`)}const u=r??(l?String(l[t]):void 0);if(!u)throw new Error(`Cannot create ${n} delete event: must provide either 'key' or 'oldValue' with a ${t} field`);return{type:n,key:u,old_value:l,headers:{...o,operation:`delete`}}},upsert:({key:r,value:l,headers:o})=>{const u=i[`~standard`].validate(l);if(`issues`in u)throw new Error(`Validation failed for ${n} upsert: ${u.issues?.map(g=>g.message).join(`, `)??`Unknown validation error`}`);const d=l[t],p=r??(d!=null&&d!==``?String(d):void 0);if(p==null||p===``)throw new Error(`Cannot create ${n} upsert event: must provide either 'key' or a value with a non-empty '${t}' field`);return{type:n,key:p,value:l,headers:{...o,operation:`upsert`}}}}}function xw(n){for(const r of Object.keys(n))if(VS.has(r))throw new Error(`Reserved collection name "${r}" - this would collide with StreamDB properties (${Array.from(VS).join(`, `)})`);const t=new Map;for(const[r,l]of Object.entries(n)){const o=t.get(l.type);if(o)throw new Error(`Duplicate event type "${l.type}" - used by both "${o}" and "${r}" collections`);t.set(l.type,r)}const i={};for(const[r,l]of Object.entries(n))i[r]={...l,...FO(l.type,l.primaryKey,l.schema)};return i}function _w(n){const{streamOptions:t,state:i,actions:r}=n,l=new Ln(t),o=new GO,u={};for(const[b,w]of Object.entries(i)){const E=cp({id:`stream-db:${b}`,schema:w.schema,getKey:T=>String(T[w.primaryKey]),sync:YO(w.type,o,w.primaryKey),startSync:!0,gcTime:0});console.log(`[StreamDB] Created collection "${b}":`,{type:typeof E,constructor:E.constructor.name,isCollection:E instanceof Object,hasSize:`size`in E}),u[b]=E}let d=null;const p=new AbortController;let g=!1;const m=async()=>{if(g)return;g=!0,d=await l.stream({live:!0,signal:p.signal});let b=0,w=Date.now();d.subscribeJson(T=>{try{b++,w=Date.now(),T.items.length>0&&console.log(`[StreamDB] Processing batch #${b}: ${T.items.length} items, upToDate=${T.upToDate}`);for(const N of T.items)Ew(N)?o.dispatchChange(N):Cw(N)&&o.dispatchControl(N);T.upToDate&&(console.log(`[StreamDB] Marking up-to-date after batch #${b}`),o.markUpToDate(),console.log(`[StreamDB] Successfully marked up-to-date`)),T.items.length>0&&console.log(`[StreamDB] Successfully processed batch #${b}`)}catch(N){console.error(`[StreamDB] Error processing batch:`,N),console.error(`[StreamDB] Failed batch:`,T),o.rejectAll(N),p.abort()}return Promise.resolve()});const E=setInterval(()=>{const T=Date.now()-w;console.log(`[StreamDB] Health: ${b} batches processed, last batch ${(T/1e3).toFixed(1)}s ago`)},15e3);p.signal.addEventListener(`abort`,()=>{clearInterval(E),console.log(`[StreamDB] Aborted - cleaning up health check`)})},y={stream:l,preload:async()=>{await m(),await o.waitForUpToDate()},close:()=>{o.rejectAll(new Error(`StreamDB closed`)),p.abort()},utils:{awaitTxId:(b,w)=>o.awaitTxId(b,w)}};console.log(`[StreamDB] Creating db object with collections:`,Object.keys(u));const v={collections:u,...y};if(console.log(`[StreamDB] db.collections:`,Object.keys(v.collections)),console.log(`[StreamDB] db.collections.events:`,v.collections.events),r){const b=r({db:v,stream:l}),w={};for(const[E,T]of Object.entries(b))w[E]=qA({onMutate:T.onMutate,mutationFn:T.mutationFn});return{...v,actions:w}}return v}const mp=600,QO=mp/2*1e3,XO=3600*24,JO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.roomId!=`string`||t.roomId.length===0?{issues:[{message:`roomId must be a non-empty string`}]}:typeof t.name!=`string`||t.name.length===0?{issues:[{message:`name must be a non-empty string`}]}:typeof t.boardSize!=`string`?{issues:[{message:`boardSize must be a string`}]}:typeof t.createdAt!=`number`?{issues:[{message:`createdAt must be a number`}]}:typeof t.expiresAt!=`number`?{issues:[{message:`expiresAt must be a number`}]}:t.playerCount!==void 0&&typeof t.playerCount!=`number`?{issues:[{message:`playerCount must be a number`}]}:{value:t}}}},Fh=xw({rooms:{schema:JO,type:`stream`,primaryKey:`roomId`}}),ZO={"~standard":{version:1,vendor:`durable-streams`,validate:n=>{const t=n;return typeof t.playerName!=`string`||t.playerName.length===0?{issues:[{message:`playerName must be a non-empty string`}]}:typeof t.score!=`number`?{issues:[{message:`score must be a number`}]}:typeof t.timestamp!=`number`?{issues:[{message:`timestamp must be a number`}]}:{value:t}}}},$S=xw({scores:{schema:ZO,type:`stream`,primaryKey:`playerName`}});function WO(n,t){return _w({streamOptions:{url:n,headers:t,contentType:`application/json`},state:Fh,actions:({db:i,stream:r})=>({addRoom:{onMutate:l=>{i.collections.rooms.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Fh.rooms.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}},deleteRoom:{onMutate:l=>{i.collections.rooms.delete(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify(Fh.rooms.delete({key:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Tw=J.createContext(null);function Aw(){const n=J.useContext(Tw);if(!n)throw new Error(`useRegistryContext must be used within RegistryProvider`);return n}function PO({children:n}){const{dsEndpoint:t,dsHeaders:i}=Qd(),[r,l]=J.useState({registryDB:null,error:null,isLoading:!0});return J.useEffect(()=>{let o=null,u=!1;const d=()=>u;return(async()=>{l({registryDB:null,error:null,isLoading:!0});try{const g=`${t}/__snake_rooms`,y=await new Ln({url:g,headers:i,contentType:`application/json`}).head();if(d()||(y.exists||await Ln.create({url:g,headers:i,contentType:`application/json`,ttlSeconds:XO}),o=await WO(g,i),await o.preload(),d()))return;l({registryDB:o,error:null,isLoading:!1})}catch(g){if(d())return;console.error(`[Registry] Failed to initialize:`,g),l({registryDB:null,error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}})(),()=>{u=!0,o&&o.close()}},[t,i]),r.isLoading?F.jsxs(`div`,{style:GS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`LOADING...`})]}):r.error||!r.registryDB?F.jsxs(`div`,{style:GS.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Registry Error: `,r.error?.message||`Failed to load`]})]}):F.jsx(Tw.Provider,{value:{registryDB:r.registryDB},children:n})}const GS={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`}},Qh=1;function tR(n,t=[]){const i=n&&typeof n==`object`&&typeof n.subscribeChanges==`function`&&typeof n.startSyncImmediate==`function`&&typeof n.id==`string`,r=J.useRef(null),l=J.useRef(null),o=J.useRef(null),u=J.useRef(0),d=J.useRef(null),p=!r.current||i&&o.current!==n||!i&&(l.current===null||l.current.length!==t.length||l.current.some((w,E)=>w!==t[E]));if(p)if(i)n.config?.syncMode===`on-demand`&&console.warn(`[useLiveQuery] Warning: Passing a collection with syncMode "on-demand" directly to useLiveQuery will not load any data. In on-demand mode, data is only loaded when queries with predicates request it. - -Instead, use a query builder function: - const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c)) - -Or switch to syncMode "eager" if you want all data to sync automatically.`),n.startSyncImmediate(),r.current=n,o.current=n;else if(typeof n==`function`){const w=new Wt,E=n(w);if(E==null)r.current=null;else if(E instanceof up)E.startSyncImmediate(),r.current=E;else if(E instanceof Wt)r.current=Yh({query:n,startSync:!0,gcTime:Qh});else if(E&&typeof E==`object`)r.current=Yh({startSync:!0,gcTime:Qh,...E});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof E}`);l.current=[...t]}else r.current=Yh({startSync:!0,gcTime:Qh,...n}),l.current=[...t];p&&(u.current=0,d.current=null);const g=J.useRef(null);(!g.current||p)&&(g.current=w=>{if(!r.current)return()=>{};const E=r.current.subscribeChanges(()=>{u.current+=1,w()});return r.current.status===`ready`&&(u.current+=1,w()),()=>{E.unsubscribe()}});const m=J.useRef(null);(!m.current||p)&&(m.current=()=>{const w=u.current,E=r.current;return(!d.current||d.current.version!==w||d.current.collection!==E)&&(d.current={collection:E,version:w}),d.current});const y=J.useSyncExternalStore(g.current,m.current),v=J.useRef(null),b=J.useRef(null);if(!v.current||v.current.version!==y.version||v.current.collection!==y.collection){if(!y.collection)b.current={state:void 0,data:void 0,collection:void 0,status:`disabled`,isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{const w=Array.from(y.collection.entries()),T=y.collection.config.singleResult;let N=null,M=null;b.current={get state(){return N||(N=new Map(w)),N},get data(){return M||(M=w.map(([,R])=>R)),T?M[0]:M},collection:y.collection,status:y.collection.status,isLoading:y.collection.status===`loading`,isReady:y.collection.status===`ready`,isIdle:y.collection.status===`idle`,isError:y.collection.status===`error`,isCleanedUp:y.collection.status===`cleaned-up`,isEnabled:!0}}v.current=y}return b.current}const jt={bg:`#1b1b1f`,card:`#161618`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},Wo=[{label:`32x32`,cols:32,rows:32},{label:`64x64`,cols:64,rows:64},{label:`128x128`,cols:128,rows:128}];function Xh(n,t){return`${n}__${t.cols}x${t.rows}`}function eR(){const n=[`neon`,`cyber`,`pixel`,`hyper`,`turbo`,`mega`,`ultra`,`nova`],t=n[Math.floor(Math.random()*n.length)],i=Math.floor(Math.random()*900)+100;return`${t}-${i}`}function nR({playerName:n,onPlayerNameChange:t,onJoinRoom:i}){const{registryDB:r}=Aw(),[l,o]=J.useState(eR),[u,d]=J.useState(1),[p,g]=J.useState(!1),[m,y]=J.useState(0),[v,b]=J.useState(``),[,w]=J.useState(0);J.useEffect(()=>{const A=setInterval(()=>w(V=>V+1),1e3);return()=>clearInterval(A)},[]);const{data:E=[]}=tR(A=>A.from({rooms:r.collections.rooms})),T=Date.now(),M=[...E.filter(A=>A.expiresAt>T)].sort((A,V)=>V.createdAt-A.createdAt),R=async()=>{if(!p){g(!0);try{const A=l.trim()||`room-${Math.random().toString(36).slice(2,7)}`,V=Wo[u],I=Xh(A,V),H=Date.now(),W={roomId:I,name:A,boardSize:`${V.cols}x${V.rows}`,createdAt:H,expiresAt:H+mp*1e3};await r.actions.addRoom(W),o(``),i(I)}catch(A){console.error(`Failed to create room:`,A)}finally{g(!1)}}};return F.jsxs(`div`,{style:gn.container,children:[F.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - .lobby-btn:active { opacity: 0.7; } - `}),F.jsx(`div`,{style:gn.title,children:`TERRITORY WARS`}),F.jsx(`div`,{style:{fontSize:7,color:jt.dim,marginBottom:20,textAlign:`center`,maxWidth:340,lineHeight:1.6},children:`Claim 30% territory or lead when time runs out.`}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`NAME`}),F.jsx(`input`,{style:gn.input,value:n,onChange:A=>t(A.target.value),placeholder:`Enter your name...`,maxLength:20})]}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`ROOM`}),F.jsx(`input`,{style:gn.input,value:l,onChange:A=>o(A.target.value),placeholder:`room name`,onKeyDown:A=>A.key===`Enter`&&R()}),F.jsx(`div`,{style:gn.cardTitle,children:`BOARD SIZE`}),F.jsx(`div`,{style:{display:`flex`,gap:6,marginBottom:10},children:Wo.map((A,V)=>F.jsx(`button`,{className:`lobby-btn`,style:{flex:1,padding:`6px 0`,fontSize:7,fontFamily:`inherit`,background:V===u?jt.accent:`transparent`,color:V===u?`#000`:jt.accent,border:`1px solid ${jt.accent}`,cursor:`pointer`,letterSpacing:1},onClick:()=>d(V),children:A.label},A.label))}),F.jsx(`button`,{className:`lobby-btn`,style:{...gn.createBtn,opacity:p?.6:1},onClick:R,disabled:p,children:p?`STARTING...`:`START`})]}),F.jsxs(`div`,{style:gn.card,children:[F.jsx(`div`,{style:gn.cardTitle,children:`ROOMS`}),F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[M.slice(m*3,m*3+3).map(A=>F.jsx(sR,{room:A,onJoin:()=>i(A.roomId)},A.roomId)),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 12px`},children:[F.jsx(`input`,{style:{fontSize:8,color:jt.text,fontFamily:`inherit`,background:`transparent`,border:`none`,outline:`none`,flex:1,padding:0},value:v,onChange:A=>b(A.target.value),placeholder:`room-id`,onKeyDown:A=>{if(A.key===`Enter`&&v.trim()){const V=M.find(I=>I.name===v.trim());i(V?V.roomId:Xh(v.trim(),Wo[u]))}}}),v.trim()&&F.jsx(`button`,{className:`lobby-btn`,style:{background:jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1,flexShrink:0},onClick:()=>{const A=M.find(V=>V.name===v.trim());i(A?A.roomId:Xh(v.trim(),Wo[u]))},children:`JOIN`})]})]}),M.length>3&&F.jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:8,marginTop:10},children:[F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:jt.bg,color:jt.dim,border:`1px solid ${jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:m===0?.3:1},disabled:m===0,onClick:()=>y(A=>A-1),children:`<`}),F.jsxs(`span`,{style:{fontSize:7,color:jt.dim,lineHeight:`24px`},children:[m+1,`/`,Math.ceil(M.length/3)]}),F.jsx(`button`,{className:`lobby-btn`,style:{fontFamily:`inherit`,fontSize:6,background:jt.bg,color:jt.dim,border:`1px solid ${jt.border}`,cursor:`pointer`,width:28,padding:`4px 0`,opacity:m>=Math.ceil(M.length/3)-1?.3:1},disabled:m>=Math.ceil(M.length/3)-1,onClick:()=>y(A=>A+1),children:`>`})]})]})]})}function sR({room:n,onJoin:t}){const[i,r]=J.useState(!1),l=o=>{o.stopPropagation(),navigator.clipboard.writeText(n.name).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1200)};return F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 12px`,cursor:`pointer`},onClick:t,children:[F.jsx(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},onClick:l,title:`Click to copy room name`,children:F.jsx(`span`,{style:{fontSize:8,color:i?jt.accent:jt.text,cursor:`pointer`},children:i?`COPIED`:n.name})}),F.jsx(`button`,{className:`lobby-btn`,style:{background:jt.accent,color:`#000`,border:`none`,fontFamily:`inherit`,fontSize:7,padding:`4px 12px`,cursor:`pointer`,letterSpacing:1},onClick:o=>{o.stopPropagation(),t()},children:`JOIN`})]})}const gn={container:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`'Press Start 2P', monospace`,background:jt.bg,color:jt.text,padding:20},title:{fontSize:16,letterSpacing:4,color:jt.accent,marginBottom:6},card:{background:jt.card,border:`1px solid ${jt.border}`,padding:16,width:`100%`,maxWidth:340,marginBottom:12},cardTitle:{fontSize:7,color:jt.accent,letterSpacing:2,marginBottom:10},input:{width:`100%`,background:jt.bg,border:`1px solid ${jt.border}`,padding:`8px 10px`,color:jt.text,fontFamily:`inherit`,fontSize:8,marginBottom:10,outline:`none`,boxSizing:`border-box`},createBtn:{width:`100%`,padding:`10px 0`,fontSize:8,fontFamily:`inherit`,background:jt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2}},Tn=()=>new Map,zd=n=>{const t=Tn();return n.forEach((i,r)=>{t.set(r,i)}),t},ti=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r},iR=(n,t)=>{const i=[];for(const[r,l]of n)i.push(t(l,r));return i},rR=(n,t)=>{for(const[i,r]of n)if(t(r,i))return!0;return!1},Ir=()=>new Set,Jh=n=>n[n.length-1],aR=(n,t)=>{for(let i=0;i{for(let i=0;i{for(let i=0;i{const i=new Array(n);for(let r=0;r{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Ci((this._observers.get(t)||Tn()).values()).forEach(r=>r(...i))}destroy(){this._observers=Tn()}};const Kn=Math.floor,uc=Math.abs,Rw=(n,t)=>nn>t?n:t,Dw=n=>n!==0?n<0:1/n<0,YS=1,FS=2,Zh=4,Wh=8,ul=32,ms=64,sn=128,Yc=31,jd=63,Ei=127,cR=2147483647,Tc=Number.MAX_SAFE_INTEGER,QS=Number.MIN_SAFE_INTEGER,uR=Number.isInteger||(n=>typeof n==`number`&&isFinite(n)&&Kn(n)===n),fR=String.fromCharCode,hR=n=>n.toLowerCase(),dR=/^\s*/g,pR=n=>n.replace(dR,``),gR=/([A-Z])/g,XS=(n,t)=>pR(n.replace(gR,i=>`${t}${hR(i)}`)),yR=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lfl.encode(n),SR=fl?mR:yR;let el=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});el&&el.decode(new Uint8Array).length===1&&(el=null);const vR=(n,t)=>lR(t,()=>n).join(``);let xl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}};const Fc=()=>new xl,wR=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(wR(n));let i=0;for(let r=0;r{const i=n.cbuf.length;i-n.cpos{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Nd=me,Mt=(n,t)=>{for(;t>Ei;)me(n,sn|Ei&t),t=Kn(t/128);me(n,Ei&t)},vp=(n,t)=>{const i=Dw(t);for(i&&(t=-t),me(n,(t>jd?sn:0)|(i?ms:0)|jd&t),t=Kn(t/64);t>0;)me(n,(t>Ei?sn:0)|Ei&t),t=Kn(t/128)},Bd=new Uint8Array(3e4),ER=Bd.length/3,CR=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Mt(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=Rw(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(Gr(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},en=(n,t)=>{Mt(n,t.byteLength),Qc(n,t)},wp=(n,t)=>{bR(n,t);const i=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,i},_R=(n,t)=>wp(n,4).setFloat32(0,t,!1),TR=(n,t)=>wp(n,8).setFloat64(0,t,!1),AR=(n,t)=>wp(n,8).setBigInt64(0,t,!1),JS=new DataView(new ArrayBuffer(4)),OR=n=>(JS.setFloat32(0,n),JS.getFloat32(0)===n),hl=(n,t)=>{switch(typeof t){case`string`:me(n,119),Or(n,t);break;case`number`:uR(t)&&uc(t)<=cR?(me(n,125),vp(n,t)):OR(t)?(me(n,124),_R(n,t)):(me(n,123),TR(n,t));break;case`bigint`:me(n,122),AR(n,t);break;case`object`:if(t===null)me(n,126);else if(Gc(t)){me(n,117),Mt(n,t.length);for(let i=0;i0&&Mt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const WS=n=>{n.count>0&&(vp(n.encoder,n.count===1?n.s:-n.s),n.count>1&&Mt(n.encoder,n.count-2))};class fc{constructor(){this.encoder=new xl,this.s=0,this.count=0}write(t){this.s===t?this.count++:(WS(this),this.count=1,this.s=t)}toUint8Array(){return WS(this),qn(this.encoder)}}const PS=n=>{if(n.count>0){const t=n.diff*2+(n.count===1?0:1);vp(n.encoder,t),n.count>1&&Mt(n.encoder,n.count-2)}};class Ph{constructor(){this.encoder=new xl,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(PS(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return PS(this),qn(this.encoder)}}class RR{constructor(){this.sarr=[],this.s=``,this.lensE=new fc}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(t.length)}toUint8Array(){const t=new xl;return this.sarr.push(this.s),this.s=``,Or(t,this.sarr.join(``)),Qc(t,this.lensE.toUint8Array()),qn(t)}}const Vn=n=>new Error(n),An=()=>{throw Vn(`Method unimplemented`)},Sn=()=>{throw Vn(`Unexpected case`)},Mw=Vn(`Unexpected end of array`),kw=Vn(`Integer out of Range`);let Xc=class{constructor(t){this.arr=t,this.pos=0}};const bp=n=>new Xc(n),DR=n=>n.pos!==n.arr.length,MR=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},nn=n=>MR(n,Rt(n)),Hr=n=>n.arr[n.pos++],Rt=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posTc)throw kw}throw Mw},Ep=n=>{let t=n.arr[n.pos++],i=t&jd,r=64;const l=(t&ms)>0?-1:1;if((t&sn)===0)return l*i;const o=n.arr.length;for(;n.posTc)throw kw}throw Mw},kR=n=>{let t=Rt(n);if(t===0)return``;{let i=String.fromCodePoint(Hr(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(Hr(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},UR=n=>el.decode(nn(n)),Rr=el?UR:kR,Cp=(n,t)=>{const i=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,i},zR=n=>Cp(n,4).getFloat32(0,!1),jR=n=>Cp(n,8).getFloat64(0,!1),NR=n=>Cp(n,8).getBigInt64(0,!1),BR=[n=>{},n=>null,Ep,zR,jR,NR,n=>!1,n=>!0,Rr,n=>{const t=Rt(n),i={};for(let r=0;r{const t=Rt(n),i=[];for(let r=0;rBR[127-Hr(n)](n);class tv extends Xc{constructor(t,i){super(t),this.reader=i,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),DR(this)?this.count=Rt(this)+1:this.count=-1),this.count--,this.s}}class hc extends Xc{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=Ep(this);const t=Dw(this.s);this.count=1,t&&(this.s=-this.s,this.count=Rt(this)+2)}return this.count--,this.s}}class td extends Xc{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=Ep(this),i=t&1;this.diff=Kn(t/2),this.count=1,i&&(this.count=Rt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class LR{constructor(t){this.decoder=new hc(t),this.str=Rr(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),i=this.str.slice(this.spos,t);return this.spos=t,i}}const IR=crypto.getRandomValues.bind(crypto),Uw=()=>IR(new Uint32Array(1))[0],HR=`10000000-1000-4000-8000`+-1e11,qR=()=>HR.replace(/[018]/g,n=>(n^Uw()&15>>n/4).toString(16)),ev=n=>new Promise(n);Promise.all.bind(Promise);const nv=n=>n===void 0?null:n;class KR{constructor(){this.map=new Map}setItem(t,i){this.map.set(t,i)}getItem(t){return this.map.get(t)}}let zw=new KR,VR=!0;try{typeof localStorage<`u`&&localStorage&&(zw=localStorage,VR=!1)}catch{}const $R=zw,pl=Symbol(`Equality`),jw=(n,t)=>n===t||!!n?.[pl]?.(t)||!1,GR=n=>typeof n==`object`,YR=Object.assign,FR=Object.keys,QR=(n,t)=>{for(const i in n)t(n[i],i)},Ac=n=>FR(n).length,XR=n=>{for(const t in n)return!1;return!0},_l=(n,t)=>{for(const i in n)if(!t(n[i],i))return!1;return!0},xp=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),JR=(n,t)=>n===t||Ac(n)===Ac(t)&&_l(n,(i,r)=>(i!==void 0||xp(t,r))&&jw(t[r],i)),ZR=Object.freeze,Nw=n=>{for(const t in n){const i=n[t];(typeof i==`object`||typeof i==`function`)&&Nw(n[t])}return ZR(n)},_p=(n,t,i=0)=>{try{for(;i{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[pl]!=null)return n[pl](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;it.includes(n);var Bw={};const gl=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`;let Nn;const PR=()=>{if(Nn===void 0)if(gl){Nn=Tn();const n=process.argv;let t=null;for(let i=0;i{if(n.length!==0){const[t,i]=n.split(`=`);Nn.set(`--${XS(t,`-`)}`,i),Nn.set(`-${XS(t,`-`)}`,i)}})):Nn=Tn();return Nn},Ld=n=>PR().has(n),Oc=n=>nv(gl?Bw[n.toUpperCase().replaceAll(`-`,`_`)]:$R.getItem(n)),Lw=n=>Ld(`--`+n)||Oc(n)!==null,tD=Lw(`production`),eD=gl&&WR(Bw.FORCE_COLOR,[`true`,`1`,`2`]),nD=eD||!Ld(`--no-colors`)&&!Lw(`no-color`)&&(!gl||process.stdout.isTTY)&&(!gl||Ld(`--color`)||Oc(`COLORTERM`)!==null||(Oc(`TERM`)||``).includes(`color`)),sD=n=>new Uint8Array(n),iD=n=>{const t=sD(n.byteLength);return t.set(n),t};class rD{constructor(t,i){this.left=t,this.right=i}}const hs=(n,t)=>new rD(n,t),sv=n=>n.next()>=.5,ed=(n,t,i)=>Kn(n.next()*(i+1-t)+t),Iw=(n,t,i)=>Kn(n.next()*(i+1-t)+t),Tp=(n,t,i)=>Iw(n,t,i),aD=n=>fR(Tp(n,97,122)),lD=(n,t=0,i=20)=>{const r=Tp(n,t,i);let l=``;for(let o=0;ot[Tp(n,0,t.length-1)],oD=Symbol(`0schema`);class cD{constructor(){this._rerrs=[]}extend(t,i,r,l=null){this._rerrs.push({path:t,expected:i,has:r,message:l})}toString(){const t=[];for(let i=this._rerrs.length-1;i>0;i--){const r=this._rerrs[i];t.push(vR(` `,(this._rerrs.length-i)*2)+`${r.path!=null?`[${r.path}] `:``}${r.has} doesn't match ${r.expected}. ${r.message}`)}return t.join(` -`)}}const Id=(n,t)=>n===t?!0:n==null||t==null||n.constructor!==t.constructor?!1:n[pl]?jw(n,t):Gc(n)?Sp(n,i=>Ow(t,r=>Id(i,r))):GR(n)?_l(n,(i,r)=>Id(i,t[r])):!1;class ze{static _dilutes=!1;extends(t){let[i,r]=[this.shape,t.shape];return this.constructor._dilutes&&([r,i]=[i,r]),Id(i,r)}equals(t){return this.constructor===t.constructor&&dc(this.shape,t.shape)}[oD](){return!0}[pl](t){return this.equals(t)}validate(t){return this.check(t)}check(t,i){An()}get nullable(){return Yr(this,tu)}get optional(){return new Kw(this)}cast(t){return iv(t,this),t}expect(t){return iv(t,this),t}}class Ap extends ze{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i=void 0){const r=t?.constructor===this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name,t?.constructor!==this.shape?`Constructor match failed`:`Check failed`),r}}const ce=(n,t=null)=>new Ap(n,t);ce(Ap);class Op extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape(t);return!r&&i?.extend(null,`custom prop`,t?.constructor.name,`failed to check custom prop`),r}}const we=n=>new Op(n);ce(Op);class Jc extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=this.shape.some(l=>l===t);return!r&&i?.extend(null,this.shape.join(` | `),t.toString()),r}}const Zc=(...n)=>new Jc(n),Hw=ce(Jc),uD=RegExp.escape||(n=>n.replace(/[().|&,$^[\]]/g,t=>`\\`+t)),qw=n=>{if(qr.check(n))return[uD(n)];if(Hw.check(n))return n.shape.map(t=>t+``);if(Zw.check(n))return[`[+-]?\\d+.?\\d*`];if(Ww.check(n))return[`.*`];if(Rc.check(n))return n.shape.map(qw).flat(1);Sn()};class fD extends ze{constructor(t){super(),this.shape=t,this._r=new RegExp(`^`+t.map(qw).map(i=>`(${i.join(`|`)})`).join(``)+`$`)}check(t,i){const r=this._r.exec(t)!=null;return!r&&i?.extend(null,this._r.toString(),t.toString(),`String doesn't match string template.`),r}}ce(fD);const hD=Symbol(`optional`);class Kw extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=t===void 0||this.shape.check(t);return!r&&i?.extend(null,`undefined (optional)`,`()`),r}get[hD](){return!0}}const dD=ce(Kw);class pD extends ze{check(t,i){return i?.extend(null,`never`,typeof t),!1}}ce(pD);class Wc extends ze{constructor(t,i=!1){super(),this.shape=t,this._isPartial=i}static _dilutes=!0;get partial(){return new Wc(this.shape,!0)}check(t,i){return t==null?(i?.extend(null,`object`,`null`),!1):_l(this.shape,(r,l)=>{const o=this._isPartial&&!xp(t,l)||r.check(t[l],i);return!o&&i?.extend(l.toString(),r.toString(),typeof t[l],`Object property does not match`),o})}}const gD=n=>new Wc(n),yD=ce(Wc),mD=we(n=>n!=null&&(n.constructor===Object||n.constructor==null));class Vw extends ze{constructor(t,i){super(),this.shape={keys:t,values:i}}check(t,i){return t!=null&&_l(t,(r,l)=>{const o=this.shape.keys.check(l,i);return!o&&i?.extend(l+``,`Record`,typeof t,o?`Key doesn't match schema`:`Value doesn't match value`),o&&this.shape.values.check(r,i)})}}const $w=(n,t)=>new Vw(n,t),SD=ce(Vw);class Gw extends ze{constructor(t){super(),this.shape=t}check(t,i){return t!=null&&_l(this.shape,(r,l)=>{const o=r.check(t[l],i);return!o&&i?.extend(l.toString(),`Tuple`,typeof r),o})}}const vD=(...n)=>new Gw(n);ce(Gw);class Yw extends ze{constructor(t){super(),this.shape=t.length===1?t[0]:new Rp(t)}check(t,i){const r=Gc(t)&&Sp(t,l=>this.shape.check(l));return!r&&i?.extend(null,`Array`,``),r}}const Fw=(...n)=>new Yw(n),wD=ce(Yw),bD=we(n=>Gc(n));class Qw extends ze{constructor(t,i){super(),this.shape=t,this._c=i}check(t,i){const r=t instanceof this.shape&&(this._c==null||this._c(t));return!r&&i?.extend(null,this.shape.name,t?.constructor.name),r}}const ED=(n,t=null)=>new Qw(n,t);ce(Qw);const CD=ED(ze);class xD extends ze{constructor(t){super(),this.len=t.length-1,this.args=vD(...t.slice(-1)),this.res=t[this.len]}check(t,i){const r=t.constructor===Function&&t.length<=this.len;return!r&&i?.extend(null,`function`,typeof t),r}}const _D=ce(xD),TD=we(n=>typeof n==`function`);class AD extends ze{constructor(t){super(),this.shape=t}check(t,i){const r=Sp(this.shape,l=>l.check(t,i));return!r&&i?.extend(null,`Intersectinon`,typeof t),r}}ce(AD,n=>n.shape.length>0);class Rp extends ze{static _dilutes=!0;constructor(t){super(),this.shape=t}check(t,i){const r=Ow(this.shape,l=>l.check(t,i));return i?.extend(null,`Union`,typeof t),r}}const Yr=(...n)=>n.findIndex(t=>Rc.check(t))>=0?Yr(...n.map(t=>yl(t)).map(t=>Rc.check(t)?t.shape:[t]).flat(1)):n.length===1?n[0]:new Rp(n),Rc=ce(Rp),Xw=()=>!0,Dc=we(Xw),OD=ce(Op,n=>n.shape===Xw),Dp=we(n=>typeof n==`bigint`),RD=we(n=>n===Dp),Jw=we(n=>typeof n==`symbol`);we(n=>n===Jw);const Dr=we(n=>typeof n==`number`),Zw=we(n=>n===Dr),qr=we(n=>typeof n==`string`),Ww=we(n=>n===qr),Pc=we(n=>typeof n==`boolean`),DD=we(n=>n===Pc),Pw=Zc(void 0);ce(Jc,n=>n.shape.length===1&&n.shape[0]===void 0);Zc(void 0);const tu=Zc(null),MD=ce(Jc,n=>n.shape.length===1&&n.shape[0]===null);ce(Uint8Array);ce(Ap,n=>n.shape===Uint8Array);const kD=Yr(Dr,qr,tu,Pw,Dp,Pc,Jw);(()=>{const n=Fw(Dc),t=$w(qr,Dc),i=Yr(Dr,qr,tu,Pc,n,t);return n.shape=i,t.shape.values=i,i})();const yl=n=>{if(CD.check(n))return n;if(mD.check(n)){const t={};for(const i in n)t[i]=yl(n[i]);return gD(t)}else{if(bD.check(n))return Yr(...n.map(yl));if(kD.check(n))return Zc(n);if(TD.check(n))return ce(n)}Sn()},iv=tD?()=>{}:(n,t)=>{const i=new cD;if(!t.check(n,i))throw Vn(`Expected value to be of type ${t.constructor.name}. -${i.toString()}`)};class UD{constructor(t){this.patterns=[],this.$state=t}if(t,i){return this.patterns.push({if:yl(t),h:i}),this}else(t){return this.if(Dc,t)}done(){return(t,i)=>{for(let r=0;rnew UD(n),tb=zD(Dc).if(Zw,(n,t)=>ed(t,QS,Tc)).if(Ww,(n,t)=>lD(t)).if(DD,(n,t)=>sv(t)).if(RD,(n,t)=>BigInt(ed(t,QS,Tc))).if(Rc,(n,t)=>Sr(t,nd(t,n.shape))).if(yD,(n,t)=>{const i={};for(const r in n.shape){let l=n.shape[r];if(dD.check(l)){if(sv(t))continue;l=l.shape}i[r]=tb(l,t)}return i}).if(wD,(n,t)=>{const i=[],r=Iw(t,0,42);for(let l=0;lnd(t,n.shape)).if(MD,(n,t)=>null).if(_D,(n,t)=>{const i=Sr(t,n.res);return()=>i}).if(OD,(n,t)=>Sr(t,nd(t,[Dr,qr,tu,Pw,Dp,Pc,Fw(Dr),$w(Yr(`a`,`b`,`c`),Dr)]))).if(SD,(n,t)=>{const i={},r=ed(t,0,3);for(let l=0;ltb(yl(t),n),eu=typeof document<`u`?document:{};we(n=>n.nodeType===ID);typeof DOMParser<`u`&&new DOMParser;we(n=>n.nodeType===ND);we(n=>n.nodeType===BD);const jD=n=>iR(n,(t,i)=>`${i}:${t};`).join(``),ND=eu.ELEMENT_NODE,BD=eu.TEXT_NODE,LD=eu.DOCUMENT_NODE,ID=eu.DOCUMENT_FRAGMENT_NODE;we(n=>n.nodeType===LD);const vs=Symbol,eb=vs(),nb=vs(),HD=vs(),qD=vs(),KD=vs(),sb=vs(),VD=vs(),Mp=vs(),$D=vs(),GD=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[];let r=0;for(;r0&&i.push(t.join(``));r{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());const t=[],i=[],r=Tn();let l=[],o=0;for(;o0||p.length>0?(t.push(`%c`+u),i.push(p)):t.push(u)}else break}}for(o>0&&(l=i,l.unshift(t.join(``)));o{console.log(...ib(n)),rb.forEach(t=>t.print(n))},XD=(...n)=>{console.warn(...ib(n)),n.unshift(Mp),rb.forEach(t=>t.print(n))},rb=Ir(),ab=n=>({[Symbol.iterator](){return this},next:n}),JD=(n,t)=>ab(()=>{let i;do i=n.next();while(!i.done&&!t(i.value));return i}),sd=(n,t)=>ab(()=>{const{done:i,value:r}=n.next();return{done:i,value:i?void 0:t(r)}});class kp{constructor(t,i){this.clock=t,this.len=i}}class nu{constructor(){this.clients=new Map}}const lb=(n,t,i)=>t.clients.forEach((r,l)=>{const o=n.doc.store.clients.get(l);if(o!=null){const u=o[o.length-1],d=u.id.clock+u.length;for(let p=0,g=r[p];p{let i=0,r=n.length-1;for(;i<=r;){const l=Kn((i+r)/2),o=n[l],u=o.clock;if(u<=t){if(t{const i=n.clients.get(t.client);return i!==void 0&&ZD(i,t.clock)!==null},Up=n=>{n.clients.forEach(t=>{t.sort((l,o)=>l.clock-o.clock);let i,r;for(i=1,r=1;i=o.clock?t[r-1]=new kp(l.clock,Gr(l.len,o.clock+o.len-l.clock)):(r{const t=new nu;for(let i=0;i{if(!t.clients.has(l)){const o=r.slice();for(let u=i+1;u{ti(n.clients,t,()=>[]).push(new kp(i,r))},zp=(n,t)=>{Mt(n.restEncoder,t.clients.size),Ci(t.clients.entries()).sort((i,r)=>r[0]-i[0]).forEach(([i,r])=>{n.resetDsCurVal(),Mt(n.restEncoder,i);const l=r.length;Mt(n.restEncoder,l);for(let o=0;o{const t=new nu,i=Rt(n.restDecoder);for(let r=0;r0){const u=ti(t.clients,l,()=>[]);for(let d=0;d{const r=new nu,l=Rt(n.restDecoder);for(let o=0;o0){const o=new su;return Mt(o.restEncoder,0),zp(o,r),o.toUint8Array()}return null},cb=Uw;class Fr extends oR{constructor({guid:t=qR(),collectionid:i=null,gc:r=!0,gcFilter:l=()=>!0,meta:o=null,autoLoad:u=!1,shouldLoad:d=!0}={}){super(),this.gc=r,this.gcFilter=l,this.clientID=cb(),this.guid=t,this.collectionid=i,this.share=new Map,this.store=new db,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=d,this.autoLoad=u,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=ev(g=>{this.on(`load`,()=>{this.isLoaded=!0,g(this)})});const p=()=>ev(g=>{const m=y=>{(y===void 0||y===!0)&&(this.off(`sync`,m),g())};this.on(`sync`,m)});this.on(`sync`,g=>{g===!1&&this.isSynced&&(this.whenSynced=p()),this.isSynced=g===void 0||g===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=p()}load(){const t=this._item;t!==null&&!this.shouldLoad&&$t(t.parent.doc,i=>{i.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ci(this.subdocs).map(t=>t.guid))}transact(t,i=null){return $t(this,t,i)}get(t,i=Te){const r=ti(this.share,t,()=>{const o=new i;return o._integrate(this,null),o}),l=r.constructor;if(i!==Te&&l!==i)if(l===Te){const o=new i;o._map=r._map,r._map.forEach(u=>{for(;u!==null;u=u.left)u.parent=o}),o._start=r._start;for(let u=o._start;u!==null;u=u.right)u.parent=o;return o._length=r._length,this.share.set(t,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=``){return this.get(t,kr)}getText(t=``){return this.get(t,Vr)}getMap(t=``){return this.get(t,Kr)}getXmlElement(t=``){return this.get(t,$r)}getXmlFragment(t=``){return this.get(t,xi)}toJSON(){const t={};return this.share.forEach((i,r)=>{t[r]=i.toJSON()}),t}destroy(){this.isDestroyed=!0,Ci(this.subdocs).forEach(i=>i.destroy());const t=this._item;if(t!==null){this._item=null;const i=t.content;i.doc=new Fr({guid:this.guid,...i.opts,shouldLoad:!1}),i.doc._item=t,$t(t.parent.doc,r=>{const l=i.doc;t.deleted||r.subdocsAdded.add(l),r.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}}class tM{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Rt(this.restDecoder)}readDsLen(){return Rt(this.restDecoder)}}class eM extends tM{readLeftID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readRightID(){return Dt(Rt(this.restDecoder),Rt(this.restDecoder))}readClient(){return Rt(this.restDecoder)}readInfo(){return Hr(this.restDecoder)}readString(){return Rr(this.restDecoder)}readParentInfo(){return Rt(this.restDecoder)===1}readTypeRef(){return Rt(this.restDecoder)}readLen(){return Rt(this.restDecoder)}readAny(){return dl(this.restDecoder)}readBuf(){return iD(nn(this.restDecoder))}readJSON(){return JSON.parse(Rr(this.restDecoder))}readKey(){return Rr(this.restDecoder)}}class nM{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Rt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Rt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class kc extends nM{constructor(t){super(t),this.keys=[],Rt(t),this.keyClockDecoder=new td(nn(t)),this.clientDecoder=new hc(nn(t)),this.leftClockDecoder=new td(nn(t)),this.rightClockDecoder=new td(nn(t)),this.infoDecoder=new tv(nn(t),Hr),this.stringDecoder=new LR(nn(t)),this.parentInfoDecoder=new tv(nn(t),Hr),this.typeRefDecoder=new hc(nn(t)),this.lenDecoder=new hc(nn(t))}readLeftID(){return new Mr(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Mr(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return dl(this.restDecoder)}readBuf(){return nn(this.restDecoder)}readJSON(){return dl(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{r=Gr(r,t[0].id.clock);const l=$n(t,r);Mt(n.restEncoder,t.length-l),n.writeClient(i),Mt(n.restEncoder,r);const o=t[l];o.write(n,r-o.id.clock);for(let u=l+1;u{const r=new Map;i.forEach((l,o)=>{Se(t,o)>l&&r.set(o,l)}),jp(t).forEach((l,o)=>{i.has(o)||r.set(o,0)}),Mt(n.restEncoder,r.size),Ci(r.entries()).sort((l,o)=>o[0]-l[0]).forEach(([l,o])=>{aM(n,t.clients.get(l),l,o)})},lM=(n,t)=>{const i=Tn(),r=Rt(n.restDecoder);for(let l=0;l{const r=[];let l=Ci(i.keys()).sort((b,w)=>b-w);if(l.length===0)return null;const o=()=>{if(l.length===0)return null;let b=i.get(l[l.length-1]);for(;b.refs.length===b.i;)if(l.pop(),l.length>0)b=i.get(l[l.length-1]);else return null;return b};let u=o();if(u===null)return null;const d=new db,p=new Map,g=(b,w)=>{const E=p.get(b);(E==null||E>w)&&p.set(b,w)};let m=u.refs[u.i++];const y=new Map,v=()=>{for(const b of r){const w=b.id.client,E=i.get(w);E?(E.i--,d.clients.set(w,E.refs.slice(E.i)),i.delete(w),E.i=0,E.refs=[]):d.clients.set(w,[b]),l=l.filter(T=>T!==w)}r.length=0};for(;;){if(m.constructor!==xn){const w=ti(y,m.id.client,()=>Se(t,m.id.client))-m.id.clock;if(w<0)r.push(m),g(m.id.client,m.id.clock-1),v();else{const E=m.getMissing(n,t);if(E!==null){r.push(m);const T=i.get(E)||{refs:[],i:0};if(T.refs.length===T.i)g(E,Se(t,E)),v();else{m=T.refs[T.i++];continue}}else(w===0||w0)m=r.pop();else if(u!==null&&u.i0){const b=new su;return ub(b,d,new Map),Mt(b.restEncoder,0),{missing:p,update:b.toUint8Array()}}return null},cM=(n,t)=>ub(n,t.doc.store,t.beforeState),uM=(n,t,i,r=new kc(n))=>$t(t,l=>{l.local=!1;let o=!1;const u=l.doc,d=u.store,p=lM(r,u),g=oM(l,d,p),m=d.pendingStructs;if(m){for(const[v,b]of m.missing)if(bb)&&m.missing.set(v,b)}m.update=dv([m.update,g.update])}}else d.pendingStructs=g;const y=rv(r,l,d);if(d.pendingDs){const v=new kc(bp(d.pendingDs));Rt(v.restDecoder);const b=rv(v,l,d);y&&b?d.pendingDs=dv([y,b]):d.pendingDs=y||b}else d.pendingDs=y;if(o){const v=d.pendingStructs.update;d.pendingStructs=null,fb(l.doc,v)}},i,!1),fb=(n,t,i,r=kc)=>{const l=bp(t);uM(l,n,i,new r(l))},av=(n,t,i)=>fb(n,t,i,eM);class fM{constructor(){this.l=[]}}const lv=()=>new fM,ov=(n,t)=>n.l.push(t),cv=(n,t)=>{const i=n.l,r=i.length;n.l=i.filter(l=>t!==l),r===n.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},hb=(n,t,i)=>_p(n.l,[t,i]);class Mr{constructor(t,i){this.client=t,this.clock=i}}const Po=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,Dt=(n,t)=>new Mr(n,t),hM=n=>{for(const[t,i]of n.doc.share.entries())if(i===n)return t;throw Sn()},Er=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ob(t.ds,n.id),Hd=(n,t)=>{const i=ti(n.meta,Hd,Ir),r=n.doc.store;i.has(t)||(t.sv.forEach((l,o)=>{l{}),i.add(t))};class db{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const jp=n=>{const t=new Map;return n.clients.forEach((i,r)=>{const l=i[i.length-1];t.set(r,l.id.clock+l.length)}),t},Se=(n,t)=>{const i=n.clients.get(t);if(i===void 0)return 0;const r=i[i.length-1];return r.id.clock+r.length},pb=(n,t)=>{let i=n.clients.get(t.id.client);if(i===void 0)i=[],n.clients.set(t.id.client,i);else{const r=i[i.length-1];if(r.id.clock+r.length!==t.id.clock)throw Sn()}i.push(t)},$n=(n,t)=>{let i=0,r=n.length-1,l=n[r],o=l.id.clock;if(o===t)return r;let u=Kn(t/(o+l.length-1)*r);for(;i<=r;){if(l=n[u],o=l.id.clock,o<=t){if(t{const i=n.clients.get(t.client);return i[$n(i,t.clock)]},id=dM,qd=(n,t,i)=>{const r=$n(t,i),l=t[r];return l.id.clock{const i=n.doc.store.clients.get(t.client);return i[qd(n,i,t.clock)]},uv=(n,t,i)=>{const r=t.clients.get(i.client),l=$n(r,i.clock),o=r[l];return i.clock!==o.id.clock+o.length-1&&o.constructor!==mn&&r.splice(l+1,0,Lc(n,o,i.clock-o.id.clock+1)),o},pM=(n,t,i)=>{const r=n.clients.get(t.id.client);r[$n(r,t.id.clock)]=i},gb=(n,t,i,r,l)=>{if(r===0)return;const o=i+r;let u=qd(n,t,i),d;do d=t[u++],ot.deleteSet.clients.size===0&&!rR(t.afterState,(i,r)=>t.beforeState.get(r)!==i)?!1:(Up(t.deleteSet),cM(n,t),zp(n,t.deleteSet),!0),hv=(n,t,i)=>{const r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&ti(n.changed,t,Ir).add(i)},pc=(n,t)=>{let i=n[t],r=n[t-1],l=t;for(;l>0;i=r,r=n[--l-1]){if(r.deleted===i.deleted&&r.constructor===i.constructor&&r.mergeWith(i)){i instanceof he&&i.parentSub!==null&&i.parent._map.get(i.parentSub)===i&&i.parent._map.set(i.parentSub,r);continue}break}const o=t-l;return o&&n.splice(t+1-o,o),o},yM=(n,t,i)=>{for(const[r,l]of n.clients.entries()){const o=t.clients.get(r);for(let u=l.length-1;u>=0;u--){const d=l[u],p=d.clock+d.len;for(let g=$n(o,d.clock),m=o[g];g{n.clients.forEach((i,r)=>{const l=t.clients.get(r);for(let o=i.length-1;o>=0;o--){const u=i[o],d=Rw(l.length-1,1+$n(l,u.clock+u.len-1));for(let p=d,g=l[p];p>0&&g.id.clock>=u.clock;g=l[p])p-=1+pc(l,p)}})},yb=(n,t)=>{if(td.push(()=>{(g._item===null||!g._item.deleted)&&g._callObserver(i,p)})),d.push(()=>{i.changedParentTypes.forEach((p,g)=>{g._dEH.l.length>0&&(g._item===null||!g._item.deleted)&&(p=p.filter(m=>m.target._item===null||!m.target._item.deleted),p.forEach(m=>{m.currentTarget=g,m._path=null}),p.sort((m,y)=>m.path.length-y.path.length),d.push(()=>{hb(g._dEH,p,i)}))}),d.push(()=>r.emit(`afterTransaction`,[i,r])),d.push(()=>{i._needFormattingCleanup&&NM(i)})}),_p(d,[])}finally{r.gc&&yM(o,l,r.gcFilter),mM(o,l),i.afterState.forEach((m,y)=>{const v=i.beforeState.get(y)||0;if(v!==m){const b=l.clients.get(y),w=Gr($n(b,v),1);for(let E=b.length-1;E>=w;)E-=1+pc(b,E)}});for(let m=u.length-1;m>=0;m--){const{client:y,clock:v}=u[m].id,b=l.clients.get(y),w=$n(b,v);w+11||w>0&&pc(b,w)}if(!i.local&&i.afterState.get(r.clientID)!==i.beforeState.get(r.clientID)&&(QD(Mp,eb,`[yjs] `,nb,sb,`Changed the client-id because another client seems to be using it.`),r.clientID=cb()),r.emit(`afterTransactionCleanup`,[i,r]),r._observers.has(`update`)){const m=new iM;fv(m,i)&&r.emit(`update`,[m.toUint8Array(),i.origin,r,i])}if(r._observers.has(`updateV2`)){const m=new su;fv(m,i)&&r.emit(`updateV2`,[m.toUint8Array(),i.origin,r,i])}const{subdocsAdded:d,subdocsLoaded:p,subdocsRemoved:g}=i;(d.size>0||g.size>0||p.size>0)&&(d.forEach(m=>{m.clientID=r.clientID,m.collectionid==null&&(m.collectionid=r.collectionid),r.subdocs.add(m)}),g.forEach(m=>r.subdocs.delete(m)),r.emit(`subdocs`,[{loaded:p,added:d,removed:g},r,i]),g.forEach(m=>m.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,n])):yb(n,t+1)}}},$t=(n,t,i=null,r=!0)=>{const l=n._transactionCleanups;let o=!1,u=null;n._transaction===null&&(o=!0,n._transaction=new gM(n,i,r),l.push(n._transaction),l.length===1&&n.emit(`beforeAllTransactions`,[n]),n.emit(`beforeTransaction`,[n._transaction,n]));try{u=t(n._transaction)}finally{if(o){const d=n._transaction===l[0];n._transaction=null,d&&yb(l,0)}}return u};function*SM(n){const t=Rt(n.restDecoder);for(let i=0;i{if(n.constructor===mn){const{client:i,clock:r}=n.id;return new mn(Dt(i,r+t),n.length-t)}else if(n.constructor===xn){const{client:i,clock:r}=n.id;return new xn(Dt(i,r+t),n.length-t)}else{const i=n,{client:r,clock:l}=i.id;return new he(Dt(r,l+t),null,Dt(r,l+t-1),null,i.rightOrigin,i.parent,i.parentSub,i.content.splice(t))}},dv=(n,t=kc,i=su)=>{if(n.length===1)return n[0];const r=n.map(m=>new t(bp(m)));let l=r.map(m=>new vM(m,!0)),o=null;const u=new i,d=new wM(u);for(;l=l.filter(v=>v.curr!==null),l.sort((v,b)=>{if(v.curr.id.client===b.curr.id.client){const w=v.curr.id.clock-b.curr.id.clock;return w===0?v.curr.constructor===b.curr.constructor?0:v.curr.constructor===xn?1:-1:w}else return b.curr.id.client-v.curr.id.client}),l.length!==0;){const m=l[0],y=m.curr.id.client;if(o!==null){let v=m.curr,b=!1;for(;v!==null&&v.id.clock+v.length<=o.struct.id.clock+o.struct.length&&v.id.client>=o.struct.id.client;)v=m.next(),b=!0;if(v===null||v.id.client!==y||b&&v.id.clock>o.struct.id.clock+o.struct.length)continue;if(y!==o.struct.id.client)Ga(d,o.struct,o.offset),o={struct:v,offset:0},m.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===xn?o.struct.length-=w:v=bM(v,w)),o.struct.mergeWith(v)||(Ga(d,o.struct,o.offset),o={struct:v,offset:0},m.next())}}else o={struct:m.curr,offset:0},m.next();for(let v=m.curr;v!==null&&v.id.client===y&&v.id.clock===o.struct.id.clock+o.struct.length&&v.constructor!==xn;v=m.next())Ga(d,o.struct,o.offset),o={struct:v,offset:0}}o!==null&&(Ga(d,o.struct,o.offset),o=null),EM(d);const p=r.map(m=>PD(m)),g=WD(p);return zp(u,g),u.toUint8Array()},mb=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:qn(n.encoder.restEncoder)}),n.encoder.restEncoder=Fc(),n.written=0)},Ga=(n,t,i)=>{n.written>0&&n.currClient!==t.id.client&&mb(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),Mt(n.encoder.restEncoder,t.id.clock+i)),t.write(n.encoder,i),n.written++},EM=n=>{mb(n);const t=n.encoder.restEncoder;Mt(t,n.clientStructs.length);for(let i=0;i{if(l!==null){const o=i._map.get(l);let u,d;if(this.adds(o)){let p=o.left;for(;p!==null&&this.adds(p);)p=p.left;if(this.deletes(o))if(p!==null&&this.deletes(p))u=`delete`,d=Jh(p.content.getContent());else return;else p!==null&&this.deletes(p)?(u=`update`,d=Jh(p.content.getContent())):(u=`add`,d=void 0)}else if(this.deletes(o))u=`delete`,d=Jh(o.content.getContent());else return;t.set(l,{action:u,oldValue:d})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Vn(pv);const i=this.target,r=Ir(),l=Ir(),o=[];if(t={added:r,deleted:l,delta:o,keys:this.keys},this.transaction.changed.get(i).has(null)){let d=null;const p=()=>{d&&o.push(d)};for(let g=i._start;g!==null;g=g.right)g.deleted?this.deletes(g)&&!this.adds(g)&&((d===null||d.delete===void 0)&&(p(),d={delete:0}),d.delete+=g.length,l.add(g)):this.adds(g)?((d===null||d.insert===void 0)&&(p(),d={insert:[]}),d.insert=d.insert.concat(g.content.getContent()),r.add(g)):((d===null||d.retain===void 0)&&(p(),d={retain:0}),d.retain+=g.length);d!==null&&d.retain===void 0&&p()}this._changes=t}return t}}const CM=(n,t)=>{const i=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)i.unshift(t._item.parentSub);else{let r=0,l=t._item.parent._start;for(;l!==t._item&&l!==null;)!l.deleted&&l.countable&&(r+=l.length),l=l.right;i.unshift(r)}t=t._item.parent}return i},Re=()=>{XD(`Invalid access: Add Yjs type to a document before reading data.`)},Sb=80;let Np=0;class xM{constructor(t,i){t.marker=!0,this.p=t,this.index=i,this.timestamp=Np++}}const _M=n=>{n.timestamp=Np++},vb=(n,t,i)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=i,n.timestamp=Np++},TM=(n,t,i)=>{if(n.length>=Sb){const r=n.reduce((l,o)=>l.timestamp{if(n._start===null||t===0||n._searchMarker===null)return null;const i=n._searchMarker.length===0?null:n._searchMarker.reduce((o,u)=>uc(t-o.index)t;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(l-=r.length);return i!==null&&uc(i.index-l){for(let r=n.length-1;r>=0;r--){const l=n[r];if(i>0){let o=l.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(l.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}l.p=o,o.marker=!0}(t0&&t===l.index)&&(l.index=Gr(t,l.index+i))}},au=(n,t,i)=>{const r=n,l=t.changedParentTypes;for(;ti(l,n,()=>[]).push(i),n._item!==null;)n=n._item.parent;hb(r._eH,i,t)};class Te{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=lv(),this._dEH=lv(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,i){this.doc=t,this._item=i}_copy(){throw An()}clone(){throw An()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,i){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){ov(this._eH,t)}observeDeep(t){ov(this._dEH,t)}unobserve(t){cv(this._eH,t)}unobserveDeep(t){cv(this._dEH,t)}toJSON(){}}const wb=(n,t,i)=>{n.doc??Re(),t<0&&(t=n._length+t),i<0&&(i=n._length+i);let r=i-t;const l=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const u=o.content.getContent();if(u.length<=t)t-=u.length;else{for(let d=t;d0;d++)l.push(u[d]),r--;t=0}}o=o.right}return l},bb=n=>{n.doc??Re();const t=[];let i=n._start;for(;i!==null;){if(i.countable&&!i.deleted){const r=i.content.getContent();for(let l=0;l{let i=0,r=n._start;for(n.doc??Re();r!==null;){if(r.countable&&!r.deleted){const l=r.content.getContent();for(let o=0;o{const i=[];return Sl(n,(r,l)=>{i.push(t(r,l,n))}),i},AM=n=>{let t=n._start,i=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(i===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};i=t.content.getContent(),r=0,t=t.right}const l=i[r++];return i.length<=r&&(i=null),{done:!1,value:l}}}},Cb=(n,t)=>{n.doc??Re();const i=ru(n,t);let r=n._start;for(i!==null&&(r=i.p,t-=i.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t{let l=i;const o=n.doc,u=o.clientID,d=o.store,p=i===null?t._start:i.right;let g=[];const m=()=>{g.length>0&&(l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new _i(g)),l.integrate(n,0),g=[])};r.forEach(y=>{if(y===null)g.push(y);else switch(y.constructor){case Number:case Object:case Boolean:case Array:case String:g.push(y);break;default:switch(m(),y.constructor){case Uint8Array:case ArrayBuffer:l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Tl(new Uint8Array(y))),l.integrate(n,0);break;case Fr:l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new Al(y)),l.integrate(n,0);break;default:if(y instanceof Te)l=new he(Dt(u,Se(d,u)),l,l&&l.lastId,p,p&&p.id,t,null,new ws(y)),l.integrate(n,0);else throw new Error(`Unexpected content type in insert operation`)}}}),m()},xb=()=>Vn(`Length exceeded!`),_b=(n,t,i,r)=>{if(i>t._length)throw xb();if(i===0)return t._searchMarker&&ml(t._searchMarker,i,r.length),Uc(n,t,null,r);const l=i,o=ru(t,i);let u=t._start;for(o!==null&&(u=o.p,i-=o.index,i===0&&(u=u.prev,i+=u&&u.countable&&!u.deleted?u.length:0));u!==null;u=u.right)if(!u.deleted&&u.countable){if(i<=u.length){i{let l=(t._searchMarker||[]).reduce((o,u)=>u.index>o.index?u:o,{index:0,p:t._start}).p;if(l)for(;l.right;)l=l.right;return Uc(n,t,l,i)},Tb=(n,t,i,r)=>{if(r===0)return;const l=i,o=r,u=ru(t,i);let d=t._start;for(u!==null&&(d=u.p,i-=u.index);d!==null&&i>0;d=d.right)!d.deleted&&d.countable&&(i0&&d!==null;)d.deleted||(r0)throw xb();t._searchMarker&&ml(t._searchMarker,l,-o+r)},zc=(n,t,i)=>{const r=t._map.get(i);r!==void 0&&r.delete(n)},Bp=(n,t,i,r)=>{const l=t._map.get(i)||null,o=n.doc,u=o.clientID;let d;if(r==null)d=new _i([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:d=new _i([r]);break;case Uint8Array:d=new Tl(r);break;case Fr:d=new Al(r);break;default:if(r instanceof Te)d=new ws(r);else throw new Error(`Unexpected content type`)}new he(Dt(u,Se(o.store,u)),l,l&&l.lastId,null,null,t,i,d).integrate(n,0)},Lp=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted?i.content.getContent()[i.length-1]:void 0},Ab=n=>{const t={};return n.doc??Re(),n._map.forEach((i,r)=>{i.deleted||(t[r]=i.content.getContent()[i.length-1])}),t},Ob=(n,t)=>{n.doc??Re();const i=n._map.get(t);return i!==void 0&&!i.deleted},RM=(n,t)=>{const i={};return n._map.forEach((r,l)=>{let o=r;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&Er(o,t)&&(i[l]=o.content.getContent()[o.length-1])}),i},tc=n=>(n.doc??Re(),JD(n._map.entries(),t=>!t[1].deleted));class DM extends iu{}class kr extends Te{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const i=new kr;return i.push(t),i}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new kr}clone(){const t=new kr;return t.insert(0,this.toArray().map(i=>i instanceof Te?i.clone():i)),t}get length(){return this.doc??Re(),this._length}_callObserver(t,i){super._callObserver(t,i),au(this,t,new DM(this,t))}insert(t,i){this.doc!==null?$t(this.doc,r=>{_b(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}push(t){this.doc!==null?$t(this.doc,i=>{OM(i,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tb(r,this,t,i)}):this._prelimContent.splice(t,i)}get(t){return Cb(this,t)}toArray(){return bb(this)}slice(t=0,i=this.length){return wb(this,t,i)}toJSON(){return this.map(t=>t instanceof Te?t.toJSON():t)}map(t){return Eb(this,t)}forEach(t){Sl(this,t)}[Symbol.iterator](){return AM(this)}_write(t){t.writeTypeRef(e2)}}const MM=n=>new kr;class kM extends iu{constructor(t,i,r){super(t,i),this.keysChanged=r}}class Kr extends Te{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,i){super._integrate(t,i),this._prelimContent.forEach((r,l)=>{this.set(l,r)}),this._prelimContent=null}_copy(){return new Kr}clone(){const t=new Kr;return this.forEach((i,r)=>{t.set(r,i instanceof Te?i.clone():i)}),t}_callObserver(t,i){au(this,t,new kM(this,t,i))}toJSON(){this.doc??Re();const t={};return this._map.forEach((i,r)=>{if(!i.deleted){const l=i.content.getContent()[i.length-1];t[r]=l instanceof Te?l.toJSON():l}}),t}get size(){return[...tc(this)].length}keys(){return sd(tc(this),t=>t[0])}values(){return sd(tc(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return sd(tc(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??Re(),this._map.forEach((i,r)=>{i.deleted||t(i.content.getContent()[i.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._prelimContent.delete(t)}set(t,i){return this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._prelimContent.set(t,i),i}get(t){return Lp(this,t)}has(t){return Ob(this,t)}clear(){this.doc!==null?$t(this.doc,t=>{this.forEach(function(i,r,l){zc(t,l,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(n2)}}const UM=n=>new Kr,Js=(n,t)=>n===t||typeof n==`object`&&typeof t==`object`&&n&&t&&JR(n,t);class Kd{constructor(t,i,r,l){this.left=t,this.right=i,this.index=r,this.currentAttributes=l}forward(){switch(this.right===null&&Sn(),this.right.content.constructor){case de:this.right.deleted||Qr(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const gv=(n,t,i)=>{for(;t.right!==null&&i>0;){switch(t.right.content.constructor){case de:t.right.deleted||Qr(t.currentAttributes,t.right.content);break;default:t.right.deleted||(i{const l=new Map,o=r?ru(t,i):null;if(o){const u=new Kd(o.p.left,o.p,o.index,l);return gv(n,u,i-o.index)}else{const u=new Kd(null,t._start,0,l);return gv(n,u,i)}},Rb=(n,t,i,r)=>{for(;i.right!==null&&(i.right.deleted===!0||i.right.content.constructor===de&&Js(r.get(i.right.content.key),i.right.content.value));)i.right.deleted||r.delete(i.right.content.key),i.forward();const l=n.doc,o=l.clientID;r.forEach((u,d)=>{const p=i.left,g=i.right,m=new he(Dt(o,Se(l.store,o)),p,p&&p.lastId,g,g&&g.id,t,null,new de(d,u));m.integrate(n,0),i.right=m,i.forward()})},Qr=(n,t)=>{const{key:i,value:r}=t;r===null?n.delete(i):n.set(i,r)},Db=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===de&&Js(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Mb=(n,t,i,r)=>{const l=n.doc,o=l.clientID,u=new Map;for(const d in r){const p=r[d],g=i.currentAttributes.get(d)??null;if(!Js(g,p)){u.set(d,g);const{left:m,right:y}=i;i.right=new he(Dt(o,Se(l.store,o)),m,m&&m.lastId,y,y&&y.id,t,null,new de(d,p)),i.right.integrate(n,0),i.forward()}}return u},rd=(n,t,i,r,l)=>{i.currentAttributes.forEach((v,b)=>{l[b]===void 0&&(l[b]=null)});const o=n.doc,u=o.clientID;Db(i,l);const d=Mb(n,t,i,l),p=r.constructor===String?new Gn(r):r instanceof Te?new ws(r):new ki(r);let{left:g,right:m,index:y}=i;t._searchMarker&&ml(t._searchMarker,i.index,p.getLength()),m=new he(Dt(u,Se(o.store,u)),g,g&&g.lastId,m,m&&m.id,t,null,p),m.integrate(n,0),i.right=m,i.index=y,i.forward(),Rb(n,t,i,d)},yv=(n,t,i,r,l)=>{const o=n.doc,u=o.clientID;Db(i,l);const d=Mb(n,t,i,l);t:for(;i.right!==null&&(r>0||d.size>0&&(i.right.deleted||i.right.content.constructor===de));){if(!i.right.deleted)switch(i.right.content.constructor){case de:{const{key:p,value:g}=i.right.content,m=l[p];if(m!==void 0){if(Js(m,g))d.delete(p);else{if(r===0)break t;d.set(p,g)}i.right.delete(n)}else i.currentAttributes.set(p,g);break}default:r0){let p=``;for(;r>0;r--)p+=` -`;i.right=new he(Dt(u,Se(o.store,u)),i.left,i.left&&i.left.lastId,i.right,i.right&&i.right.id,t,null,new Gn(p)),i.right.integrate(n,0),i.forward()}Rb(n,t,i,d)},kb=(n,t,i,r,l)=>{let o=t;const u=Tn();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===de){const g=o.content;u.set(g.key,g)}o=o.right}let d=0,p=!1;for(;t!==o;){if(i===t&&(p=!0),!t.deleted){const g=t.content;switch(g.constructor){case de:{const{key:m,value:y}=g,v=r.get(m)??null;(u.get(m)!==g||v===y)&&(t.delete(n),d++,!p&&(l.get(m)??null)===y&&v!==y&&(v===null?l.delete(m):l.set(m,v))),!p&&!t.deleted&&Qr(l,g);break}}}t=t.right}return d},zM=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const i=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===de){const r=t.content.key;i.has(r)?t.delete(n):i.add(r)}t=t.left}},jM=n=>{let t=0;return $t(n.doc,i=>{let r=n._start,l=n._start,o=Tn();const u=zd(o);for(;l;){if(l.deleted===!1)switch(l.content.constructor){case de:Qr(u,l.content);break;default:t+=kb(i,r,l,o,u),o=zd(u),r=l;break}l=l.right}}),t},NM=n=>{const t=new Set,i=n.doc;for(const[r,l]of n.afterState.entries()){const o=n.beforeState.get(r)||0;l!==o&&gb(n,i.store.clients.get(r),o,l,u=>{!u.deleted&&u.content.constructor===de&&u.constructor!==mn&&t.add(u.parent)})}$t(i,r=>{lb(n,n.deleteSet,l=>{if(l instanceof mn||!l.parent._hasFormatting||t.has(l.parent))return;const o=l.parent;l.content.constructor===de?t.add(o):zM(r,l)});for(const l of t)jM(l)})},mv=(n,t,i)=>{const r=i,l=zd(t.currentAttributes),o=t.right;for(;i>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case ws:case ki:case Gn:i{l===null?this.childListChanged=!0:this.keysChanged.add(l)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,i=[];$t(t,r=>{const l=new Map,o=new Map;let u=this.target._start,d=null;const p={};let g=``,m=0,y=0;const v=()=>{if(d!==null){let b=null;switch(d){case`delete`:y>0&&(b={delete:y}),y=0;break;case`insert`:(typeof g==`object`||g.length>0)&&(b={insert:g},l.size>0&&(b.attributes={},l.forEach((w,E)=>{w!==null&&(b.attributes[E]=w)}))),g=``;break;case`retain`:m>0&&(b={retain:m},XR(p)||(b.attributes=YR({},p))),m=0;break}b&&i.push(b),d=null}};for(;u!==null;){switch(u.content.constructor){case ws:case ki:this.adds(u)?this.deletes(u)||(v(),d=`insert`,g=u.content.getContent()[0],v()):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=1):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=1);break;case Gn:this.adds(u)?this.deletes(u)||(d!==`insert`&&(v(),d=`insert`),g+=u.content.str):this.deletes(u)?(d!==`delete`&&(v(),d=`delete`),y+=u.length):u.deleted||(d!==`retain`&&(v(),d=`retain`),m+=u.length);break;case de:{const{key:b,value:w}=u.content;if(this.adds(u)){if(!this.deletes(u)){const E=l.get(b)??null;Js(E,w)?w!==null&&u.delete(r):(d===`retain`&&v(),Js(w,o.get(b)??null)?delete p[b]:p[b]=w)}}else if(this.deletes(u)){o.set(b,w);const E=l.get(b)??null;Js(E,w)||(d===`retain`&&v(),p[b]=E)}else if(!u.deleted){o.set(b,w);const E=p[b];E!==void 0&&(Js(E,w)?E!==null&&u.delete(r):(d===`retain`&&v(),w===null?delete p[b]:p[b]=w))}u.deleted||(d===`insert`&&v(),Qr(l,u.content));break}}u=u.right}for(v();i.length>0;){const b=i[i.length-1];if(b.retain!==void 0&&b.attributes===void 0)i.pop();else break}}),this._delta=i}return this._delta}}class Vr extends Te{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Re(),this._length}_integrate(t,i){super._integrate(t,i);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Vr}clone(){const t=new Vr;return t.applyDelta(this.toDelta()),t}_callObserver(t,i){super._callObserver(t,i);const r=new BM(this,t,i);au(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??Re();let t=``,i=this._start;for(;i!==null;)!i.deleted&&i.countable&&i.content.constructor===Gn&&(t+=i.content.str),i=i.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:i=!0}={}){this.doc!==null?$t(this.doc,r=>{const l=new Kd(null,this._start,0,new Map);for(let o=0;o0)&&rd(r,this,l,d,u.attributes||{})}else u.retain!==void 0?yv(r,this,l,u.retain,u.attributes||{}):u.delete!==void 0&&mv(r,l,u.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,i,r){this.doc??Re();const l=[],o=new Map,u=this.doc;let d=``,p=this._start;function g(){if(d.length>0){const y={};let v=!1;o.forEach((w,E)=>{v=!0,y[E]=w});const b={insert:d};v&&(b.attributes=y),l.push(b),d=``}}const m=()=>{for(;p!==null;){if(Er(p,t)||i!==void 0&&Er(p,i))switch(p.content.constructor){case Gn:{const y=o.get(`ychange`);t!==void 0&&!Er(p,t)?(y===void 0||y.user!==p.id.client||y.type!==`removed`)&&(g(),o.set(`ychange`,r?r(`removed`,p.id):{type:`removed`})):i!==void 0&&!Er(p,i)?(y===void 0||y.user!==p.id.client||y.type!==`added`)&&(g(),o.set(`ychange`,r?r(`added`,p.id):{type:`added`})):y!==void 0&&(g(),o.delete(`ychange`)),d+=p.content.str;break}case ws:case ki:{g();const y={insert:p.content.getContent()[0]};if(o.size>0){const v={};y.attributes=v,o.forEach((b,w)=>{v[w]=b})}l.push(y);break}case de:Er(p,t)&&(g(),Qr(o,p.content));break}p=p.right}g()};return t||i?$t(u,y=>{t&&Hd(y,t),i&&Hd(y,i),m()},`cleanup`):m(),l}insert(t,i,r){if(i.length<=0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);r||(r={},u.currentAttributes.forEach((d,p)=>{r[p]=d})),rd(o,this,u,i,r)}):this._pending.push(()=>this.insert(t,i,r))}insertEmbed(t,i,r){const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!r);rd(o,this,u,i,r||{})}):this._pending.push(()=>this.insertEmbed(t,i,r||{}))}delete(t,i){if(i===0)return;const r=this.doc;r!==null?$t(r,l=>{mv(l,ec(l,this,t,!0),i)}):this._pending.push(()=>this.delete(t,i))}format(t,i,r){if(i===0)return;const l=this.doc;l!==null?$t(l,o=>{const u=ec(o,this,t,!1);u.right!==null&&yv(o,this,u,i,r)}):this._pending.push(()=>this.format(t,i,r))}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._pending.push(()=>this.setAttribute(t,i))}getAttribute(t){return Lp(this,t)}getAttributes(){return Ab(this)}_write(t){t.writeTypeRef(s2)}}const LM=n=>new Vr;class ad{constructor(t,i=()=>!0){this._filter=i,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??Re()}[Symbol.iterator](){return this}next(){let t=this._currentNode,i=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(i)))do if(i=t.content.type,!t.deleted&&(i.constructor===$r||i.constructor===xi)&&i._start!==null)t=i._start;else for(;t!==null;){const r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class xi extends Te{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,i){super._integrate(t,i),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new xi}clone(){const t=new xi;return t.insert(0,this.toArray().map(i=>i instanceof Te?i.clone():i)),t}get length(){return this.doc??Re(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new ad(this,t)}querySelector(t){t=t.toUpperCase();const r=new ad(this,l=>l.nodeName&&l.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),Ci(new ad(this,i=>i.nodeName&&i.nodeName.toUpperCase()===t))}_callObserver(t,i){au(this,t,new qM(this,i,t))}toString(){return Eb(this,t=>t.toString()).join(``)}toJSON(){return this.toString()}toDOM(t=document,i={},r){const l=t.createDocumentFragment();return r!==void 0&&r._createAssociation(l,this),Sl(this,o=>{l.insertBefore(o.toDOM(t,i,r),null)}),l}insert(t,i){this.doc!==null?$t(this.doc,r=>{_b(r,this,t,i)}):this._prelimContent.splice(t,0,...i)}insertAfter(t,i){if(this.doc!==null)$t(this.doc,r=>{const l=t&&t instanceof Te?t._item:t;Uc(r,this,l,i)});else{const r=this._prelimContent,l=t===null?0:r.findIndex(o=>o===t)+1;if(l===0&&t!==null)throw Vn(`Reference item not found`);r.splice(l,0,...i)}}delete(t,i=1){this.doc!==null?$t(this.doc,r=>{Tb(r,this,t,i)}):this._prelimContent.splice(t,i)}toArray(){return bb(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return Cb(this,t)}slice(t=0,i=this.length){return wb(this,t,i)}forEach(t){Sl(this,t)}_write(t){t.writeTypeRef(r2)}}const IM=n=>new xi;class $r extends xi{constructor(t=`UNDEFINED`){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,i){super._integrate(t,i),this._prelimAttrs.forEach((r,l)=>{this.setAttribute(l,r)}),this._prelimAttrs=null}_copy(){return new $r(this.nodeName)}clone(){const t=new $r(this.nodeName),i=this.getAttributes();return QR(i,(r,l)=>{t.setAttribute(l,r)}),t.insert(0,this.toArray().map(r=>r instanceof Te?r.clone():r)),t}toString(){const t=this.getAttributes(),i=[],r=[];for(const d in t)r.push(d);r.sort();const l=r.length;for(let d=0;d0?` `+i.join(` `):``;return`<${o}${u}>${super.toString()}`}removeAttribute(t){this.doc!==null?$t(this.doc,i=>{zc(i,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,i){this.doc!==null?$t(this.doc,r=>{Bp(r,this,t,i)}):this._prelimAttrs.set(t,i)}getAttribute(t){return Lp(this,t)}hasAttribute(t){return Ob(this,t)}getAttributes(t){return t?RM(this,t):Ab(this)}toDOM(t=document,i={},r){const l=t.createElement(this.nodeName),o=this.getAttributes();for(const u in o){const d=o[u];typeof d==`string`&&l.setAttribute(u,d)}return Sl(this,u=>{l.appendChild(u.toDOM(t,i,r))}),r!==void 0&&r._createAssociation(l,this),l}_write(t){t.writeTypeRef(i2),t.writeKey(this.nodeName)}}const HM=n=>new $r(n.readKey());class qM extends iu{constructor(t,i,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,i.forEach(l=>{l===null?this.childListChanged=!0:this.attributesChanged.add(l)})}}class jc extends Kr{constructor(t){super(),this.hookName=t}_copy(){return new jc(this.hookName)}clone(){const t=new jc(this.hookName);return this.forEach((i,r)=>{t.set(r,i)}),t}toDOM(t=document,i={},r){const l=i[this.hookName];let o;return l!==void 0?o=l.createDom(this):o=document.createElement(this.hookName),o.setAttribute(`data-yjs-hook`,this.hookName),r!==void 0&&r._createAssociation(o,this),o}_write(t){t.writeTypeRef(a2),t.writeKey(this.hookName)}}const KM=n=>new jc(n.readKey());class Nc extends Vr{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new Nc}clone(){const t=new Nc;return t.applyDelta(this.toDelta()),t}toDOM(t=document,i,r){const l=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(l,this),l}toString(){return this.toDelta().map(t=>{const i=[];for(const l in t.attributes){const o=[];for(const u in t.attributes[l])o.push({key:u,value:t.attributes[l][u]});o.sort((u,d)=>u.keyl.nodeName`}r+=t.insert;for(let l=i.length-1;l>=0;l--)r+=``;return r}).join(``)}toJSON(){return this.toString()}_write(t){t.writeTypeRef(l2)}}const VM=n=>new Nc;class Ip{constructor(t,i){this.id=t,this.length=i}get deleted(){throw An()}mergeWith(t){return!1}write(t,i,r){throw An()}integrate(t,i){throw An()}}const $M=0;class mn extends Ip{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){i>0&&(this.id.clock+=i,this.length-=i),pb(t.doc.store,this)}write(t,i){t.writeInfo($M),t.writeLen(this.length-i)}getMissing(t,i){return null}}class Tl{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Tl(this.content)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeBuf(this.content)}getRef(){return 3}}const GM=n=>new Tl(n.readBuf());class vl{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new vl(this.len)}splice(t){const i=new vl(this.len-t);return this.len=t,i}mergeWith(t){return this.len+=t.len,!0}integrate(t,i){Mc(t.deleteSet,i.id.client,i.id.clock,this.len),i.markDeleted()}delete(t){}gc(t){}write(t,i){t.writeLen(this.len-i)}getRef(){return 1}}const YM=n=>new vl(n.readLen()),Ub=(n,t)=>new Fr({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Al{constructor(t){t._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=t;const i={};this.opts=i,t.gc||(i.gc=!1),t.autoLoad&&(i.autoLoad=!0),t.meta!==null&&(i.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Al(Ub(this.doc.guid,this.opts))}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.doc._item=i,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,i){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const FM=n=>new Al(Ub(n.readString(),n.readAny()));class ki{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new ki(this.embed)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeJSON(this.embed)}getRef(){return 5}}const QM=n=>new ki(n.readJSON());class de{constructor(t,i){this.key=t,this.value=i}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new de(this.key,this.value)}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){const r=i.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,i){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const XM=n=>new de(n.readKey(),n.readJSON());class Bc{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Bc(this.arr)}splice(t){const i=new Bc(this.arr.slice(t));return this.arr=this.arr.slice(0,t),i}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){const r=this.arr.length;t.writeLen(r-i);for(let l=i;l{const t=n.readLen(),i=[];for(let r=0;r{const t=n.readLen(),i=[];for(let r=0;r=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,i.str=`�`+i.str.slice(1)),i}mergeWith(t){return this.str+=t.str,!0}integrate(t,i){}delete(t){}gc(t){}write(t,i){t.writeString(i===0?this.str:this.str.slice(i))}getRef(){return 4}}const PM=n=>new Gn(n.readString()),t2=[MM,UM,LM,HM,IM,KM,VM],e2=0,n2=1,s2=2,i2=3,r2=4,a2=5,l2=6;class ws{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new ws(this.type._copy())}splice(t){throw An()}mergeWith(t){return!1}integrate(t,i){this.type._integrate(t.doc,i)}delete(t){let i=this.type._start;for(;i!==null;)i.deleted?i.id.clock<(t.beforeState.get(i.id.client)||0)&&t._mergeStructs.push(i):i.delete(t),i=i.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let i=this.type._start;for(;i!==null;)i.gc(t,!0),i=i.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,i){this.type._write(t)}getRef(){return 7}}const o2=n=>new ws(t2[n.readTypeRef()](n)),Lc=(n,t,i)=>{const{client:r,clock:l}=t.id,o=new he(Dt(r,l+i),t,Dt(r,l+i-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(i));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=Dt(t.redone.client,t.redone.clock+i)),t.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=i,o};class he extends Ip{constructor(t,i,r,l,o,u,d,p){super(t,p.getLength()),this.origin=r,this.left=i,this.right=l,this.rightOrigin=o,this.parent=u,this.parentSub=d,this.redone=null,this.content=p,this.info=this.content.isCountable()?FS:0}set marker(t){(this.info&Wh)>0!==t&&(this.info^=Wh)}get marker(){return(this.info&Wh)>0}get keep(){return(this.info&YS)>0}set keep(t){this.keep!==t&&(this.info^=YS)}get countable(){return(this.info&FS)>0}get deleted(){return(this.info&Zh)>0}set deleted(t){this.deleted!==t&&(this.info^=Zh)}markDeleted(){this.info|=Zh}getMissing(t,i){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Se(i,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Se(i,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Mr&&this.id.client!==this.parent.client&&this.parent.clock>=Se(i,this.parent.client))return this.parent.client;if(this.origin&&(this.left=uv(t,i,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ps(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===mn||this.right&&this.right.constructor===mn)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===he?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===he&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Mr){const r=id(i,this.parent);r.constructor===mn?this.parent=null:this.parent=r.content.type}return null}integrate(t,i){if(i>0&&(this.id.clock+=i,this.left=uv(t,t.doc.store,Dt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(i),this.length-=i),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,l;if(r!==null)l=r.right;else if(this.parentSub!==null)for(l=this.parent._map.get(this.parentSub)||null;l!==null&&l.left!==null;)l=l.left;else l=this.parent._start;const o=new Set,u=new Set;for(;l!==null&&l!==this.right;){if(u.add(l),o.add(l),Po(this.origin,l.origin)){if(l.id.client{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const i=this.parent;this.countable&&this.parentSub===null&&(i._length-=this.length),this.markDeleted(),Mc(t.deleteSet,this.id.client,this.id.clock,this.length),hv(t,i,this.parentSub),this.content.delete(t)}}gc(t,i){if(!this.deleted)throw Sn();this.content.gc(t),i?pM(t,this,new mn(this.id,this.length)):this.content=new vl(this.length)}write(t,i){const r=i>0?Dt(this.id.client,this.id.clock+i-1):this.origin,l=this.rightOrigin,o=this.parentSub,u=this.content.getRef()&Yc|(r===null?0:sn)|(l===null?0:ms)|(o===null?0:ul);if(t.writeInfo(u),r!==null&&t.writeLeftID(r),l!==null&&t.writeRightID(l),r===null&&l===null){const d=this.parent;if(d._item!==void 0){const p=d._item;if(p===null){const g=hM(d);t.writeParentInfo(!0),t.writeString(g)}else t.writeParentInfo(!1),t.writeLeftID(p.id)}else d.constructor===String?(t.writeParentInfo(!0),t.writeString(d)):d.constructor===Mr?(t.writeParentInfo(!1),t.writeLeftID(d)):Sn();o!==null&&t.writeString(o)}this.content.write(t,i)}}const zb=(n,t)=>c2[t&Yc](n),c2=[()=>{Sn()},YM,JM,GM,PM,QM,XM,o2,WM,FM,()=>{Sn()}],u2=10;class xn extends Ip{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,i){Sn()}write(t,i){t.writeInfo(u2),Mt(t.restEncoder,this.length-i)}getMissing(t,i){return null}}const jb=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},Nb=`__ $YJS$ __`;jb[Nb]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`);jb[Nb]=!0;const Bb=Math.floor,f2=(n,t)=>nn>t?n:t,Lb=128,gc=127,d2=Number.MAX_SAFE_INTEGER,Ib=()=>new Set,Hb=Array.from,p2=n=>{const t=unescape(encodeURIComponent(n)),i=t.length,r=new Uint8Array(i);for(let l=0;lwl.encode(n),y2=wl?g2:p2;let nl=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});nl&&nl.decode(new Uint8Array).length===1&&(nl=null);class m2{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const qb=()=>new m2,S2=n=>{let t=n.cpos;for(let i=0;i{const t=new Uint8Array(S2(n));let i=0;for(let r=0;r{const i=n.cbuf.length;n.cpos===i&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(i*2),n.cpos=0),n.cbuf[n.cpos++]=t},Ur=(n,t)=>{for(;t>gc;)Ic(n,Lb|gc&t),t=Bb(t/128);Ic(n,gc&t)},Vd=new Uint8Array(3e4),v2=Vd.length/3,w2=(n,t)=>{if(t.length{const i=unescape(encodeURIComponent(t)),r=i.length;Ur(n,r);for(let l=0;l{const i=n.cbuf.length,r=n.cpos,l=f2(i-r,t.length),o=t.length-l;n.cbuf.set(t.subarray(0,l),r),n.cpos+=l,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(h2(i*2,o)),n.cbuf.set(t.subarray(l)),n.cpos=o)},Vb=(n,t)=>{Ur(n,t.byteLength),C2(n,t)},$b=n=>new Error(n),x2=$b(`Unexpected end of array`),_2=$b(`Integer out of Range`);class T2{constructor(t){this.arr=t,this.pos=0}}const $d=n=>new T2(n),Sv=n=>n.pos!==n.arr.length,A2=(n,t)=>{const i=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,i},Gd=n=>A2(n,sl(n)),vv=n=>n.arr[n.pos++],sl=n=>{let t=0,i=1;const r=n.arr.length;for(;n.posd2)throw _2}throw x2},O2=n=>{let t=sl(n);if(t===0)return``;{let i=String.fromCodePoint(vv(n));if(--t<100)for(;t--;)i+=String.fromCodePoint(vv(n));else for(;t>0;){const r=t<1e4?t:1e4,l=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,i+=String.fromCodePoint.apply(null,l),t-=r}return decodeURIComponent(escape(i))}},R2=n=>nl.decode(Gd(n)),D2=nl?R2:O2,Hc=Date.now,zr=()=>new Map,Gb=(n,t,i)=>{let r=n.get(t);return r===void 0&&n.set(t,r=i()),r};class M2{constructor(){this._observers=zr()}on(t,i){return Gb(this._observers,t,Ib).add(i),i}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hb((this._observers.get(t)||zr()).values()).forEach(r=>r(...i))}destroy(){this._observers=zr()}}class k2{constructor(){this._observers=zr()}on(t,i){Gb(this._observers,t,Ib).add(i)}once(t,i){const r=(...l)=>{this.off(t,r),i(...l)};this.on(t,r)}off(t,i){const r=this._observers.get(t);r!==void 0&&(r.delete(i),r.size===0&&this._observers.delete(t))}emit(t,i){return Hb((this._observers.get(t)||zr()).values()).forEach(r=>r(...i))}destroy(){this._observers=zr()}}const wv=Symbol(`Equality`),U2=Object.keys,bv=n=>U2(n).length,z2=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),il=(n,t)=>{if(n===t)return!0;if(n==null||t==null||n.constructor!==t.constructor&&(n.constructor||Object)!==(t.constructor||Object))return!1;if(n[wv]!=null)return n[wv](t);switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let i=0;i{const i=Hc();this.getLocalState()!==null&&ld/2<=i-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const r=[];this.meta.forEach((l,o)=>{o!==this.clientID&&ld<=i-l.lastUpdated&&this.states.has(o)&&r.push(o)}),r.length>0&&N2(this,r,`timeout`)},Bb(ld/10)),t.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const i=this.clientID,r=this.meta.get(i),l=r===void 0?0:r.clock+1,o=this.states.get(i);t===null?this.states.delete(i):this.states.set(i,t),this.meta.set(i,{clock:l,lastUpdated:Hc()});const u=[],d=[],p=[],g=[];t===null?g.push(i):o==null?t!=null&&u.push(i):(d.push(i),il(o,t)||p.push(i)),(u.length>0||p.length>0||g.length>0)&&this.emit(`change`,[{added:u,updated:p,removed:g},`local`]),this.emit(`update`,[{added:u,updated:d,removed:g},`local`])}setLocalStateField(t,i){const r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:i})}getStates(){return this.states}}const N2=(n,t,i)=>{const r=[];for(let l=0;l0&&(n.emit(`change`,[{added:[],updated:[],removed:r},i]),n.emit(`update`,[{added:[],updated:[],removed:r},i]))},Ev=(n,t,i=n.states)=>{const r=t.length,l=qb();Ur(l,r);for(let o=0;o{const r=$d(t),l=Hc(),o=[],u=[],d=[],p=[],g=sl(r);for(let m=0;m0||d.length>0||p.length>0)&&n.emit(`change`,[{added:o,updated:d,removed:p},i]),(o.length>0||u.length>0||p.length>0)&&n.emit(`update`,[{added:o,updated:u,removed:p},i])},L2={disconnected:[`connecting`],connecting:[`connected`,`disconnected`],connected:[`disconnected`]},I2=15e3;var H2=class yc extends M2{doc;awareness;baseUrl;docId;headers;liveMode;_state=`disconnected`;_connectionId=0;_ctx=null;_synced=!1;updatesStreamGeneration=0;updatesSubscription=null;sendingAwareness=!1;pendingAwareness=null;awarenessHeartbeat=null;constructor(t){super(),this.doc=t.doc,this.awareness=t.awareness,this.baseUrl=t.baseUrl.replace(/\/$/,``),this.docId=t.docId,this.headers=t.headers??{},this.liveMode=t.liveMode??`sse`,this.doc.on(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.on(`update`,this.handleAwarenessUpdate),t.connect!==!1&&this.connect()}get synced(){return this._synced}set synced(t){this._synced!==t&&(this._synced=t,this.emit(`synced`,[t]))}get connected(){return this._state===`connected`}get connecting(){return this._state===`connecting`}transition(t){return L2[this._state].includes(t)?(this._state=t,this.emit(`status`,[t]),!0):(console.warn(`[YjsProvider] Invalid transition: ${this._state} -> ${t}`),!1)}createConnectionContext(){this._connectionId+=1;const t={id:this._connectionId,controller:new AbortController,startOffset:`-1`,producer:null};return this._ctx=t,t}isStale(t){return this._ctx!==t||t.controller.signal.aborted}async connect(){if(this._state!==`disconnected`||!this.transition(`connecting`))return;const t=this.createConnectionContext();try{if(await this.ensureDocument(t),this.isStale(t)||(await this.discoverSnapshot(t),this.isStale(t))||(this.createUpdatesProducer(t),await this.startUpdatesStream(t,t.startOffset),this.isStale(t)))return;this.awareness&&this.startAwareness(t)}catch(i){!(i instanceof Error&&i.name===`AbortError`)&&!this.isStale(t)&&(this.emit(`error`,[i instanceof Error?i:new Error(String(i))]),this.disconnect())}}async disconnect(){const t=this._ctx;!t||this._state===`disconnected`||(this.transition(`disconnected`),this._ctx=null,this.synced=!1,this.awarenessHeartbeat&&(clearInterval(this.awarenessHeartbeat),this.awarenessHeartbeat=null),this.awareness&&this.broadcastAwarenessRemoval(),this.updatesStreamGeneration+=1,this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null),await this.closeUpdatesProducer(t),t.controller.abort(),this.pendingAwareness=null)}destroy(){this.disconnect().catch(()=>{}),this.doc.off(`update`,this.handleDocumentUpdate),this.awareness&&this.awareness.off(`update`,this.handleAwarenessUpdate),super.destroy()}async flush(){this._ctx?.producer&&await this._ctx.producer.flush()}docUrl(){return`${this.baseUrl}/docs/${this.docId}`}awarenessUrl(t=`default`){return`${this.docUrl()}?awareness=${encodeURIComponent(t)}`}async ensureDocument(t){const i=this.docUrl(),r=await fetch(i,{method:`PUT`,headers:{...this.headers,"content-type":`application/octet-stream`},signal:t.controller.signal});if(r.status===201||r.status===200){await r.arrayBuffer();return}if(r.status===409){await r.arrayBuffer();return}const l=await r.text().catch(()=>``);throw new Error(`Failed to create document: ${r.status} ${l}`)}async discoverSnapshot(t){const i=`${this.docUrl()}?offset=snapshot`,r=await fetch(i,{method:`GET`,headers:this.headers,redirect:`manual`,signal:t.controller.signal});if(r.status===307){const l=r.headers.get(`location`);if(l){const u=new URL(l,i).searchParams.get(`offset`);if(u){u.endsWith(`_snapshot`)?await this.loadSnapshot(t,u):t.startOffset=u;return}}}t.startOffset=`-1`}async loadSnapshot(t,i){const r=`${this.docUrl()}?offset=${encodeURIComponent(i)}`;try{const l=await fetch(r,{method:`GET`,headers:this.headers,signal:t.controller.signal});if(!l.ok){if(l.status===404){await this.discoverSnapshot(t);return}throw new Error(`Failed to load snapshot: ${l.status}`)}const o=new Uint8Array(await l.arrayBuffer());o.length>0&&av(this.doc,o,`server`);const u=l.headers.get(`stream-next-offset`);t.startOffset=u??`-1`}catch(l){if(this.isNotFoundError(l)){await this.discoverSnapshot(t);return}throw l}}createUpdatesProducer(t){const i=new Ln({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`}),r=`${this.docId}-${this.doc.clientID}`;t.producer=new Hv(i,r,{autoClaim:!0,signal:t.controller.signal,onError:l=>{l instanceof Error&&l.name===`AbortError`||(console.error(`[YjsProvider] Producer error:`,l),this.emit(`error`,[l]),this.isAuthError(l)||(this.disconnect(),this.connect()))}})}async closeUpdatesProducer(t){if(t.producer){try{await t.producer.close()}catch{}t.producer=null}}startUpdatesStream(t,i){if(t.controller.signal.aborted)return Promise.resolve();this.updatesStreamGeneration+=1;const r=this.updatesStreamGeneration;this.updatesSubscription?.(),this.updatesSubscription=null;let l=!1,o,u;const d=new Promise((p,g)=>{o=()=>{l||(l=!0,p())},u=m=>{l||(l=!0,g(m))}});return this.runUpdatesStream(t,i,r,o,u).catch(p=>{u(p instanceof Error?p:new Error(String(p)))}),d}async runUpdatesStream(t,i,r,l,o){let u=i,d=!0;const p=()=>{d&&(d=!1,this._state===`connecting`&&this.transition(`connected`),this.synced=!0,l())},g=()=>this.isStale(t)||this.updatesStreamGeneration!==r;for(;this.updatesStreamGeneration===r;){if(t.controller.signal.aborted){p();return}const m=new Ln({url:this.docUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const y=await m.stream({offset:u,live:this.liveMode,signal:t.controller.signal});this.updatesSubscription?.(),this.updatesSubscription=y.subscribeBytes(async v=>{g()||(u=v.offset,v.data.length>0&&this.applyUpdates(v.data),d&&v.upToDate?p():v.data.length>0&&(this.synced=!0))}),await y.closed,p();continue}catch(y){if(g()){p();return}if(this.isNotFoundError(y)){if(d){o(y instanceof Error?y:new Error(String(y)));return}this.emit(`error`,[y instanceof Error?y:new Error(String(y))]),this.disconnect();return}if(d){o(y instanceof Error?y:new Error(String(y)));return}await new Promise(v=>setTimeout(v,1e3))}finally{this.updatesSubscription&&(this.updatesSubscription(),this.updatesSubscription=null)}}}static frameUpdate(t){const i=qb();return Vb(i,t),Kb(i)}applyUpdates(t){if(t.length===0)return;const i=$d(t);for(;Sv(i);){const r=Gd(i);av(this.doc,r,`server`)}}applyAwarenessUpdates(t){if(!(t.length===0||!this.awareness))try{const i=$d(t);for(;Sv(i);){const r=Gd(i);try{B2(this.awareness,r,`server`)}catch{}}}catch{}}handleDocumentUpdate=(t,i)=>{if(i===`server`)return;const r=this._ctx?.producer;!r||!this.connected||(this.synced=!1,r.append(yc.frameUpdate(t)))};startAwareness(t){this.awareness&&(t.controller.signal.aborted||(this.broadcastAwareness(),this.awarenessHeartbeat=setInterval(()=>{this.broadcastAwareness()},I2),this.subscribeAwareness(t)))}handleAwarenessUpdate=(t,i)=>{if(!this.awareness||i===`server`||i===this)return;const{added:r,updated:l,removed:o}=t;r.concat(l).concat(o).includes(this.awareness.clientID)&&(this.pendingAwareness=t,this.sendAwareness())};broadcastAwareness(){this.awareness&&(this.pendingAwareness={added:[this.awareness.clientID],updated:[],removed:[]},this.sendAwareness())}broadcastAwarenessRemoval(){if(this.awareness)try{this.awareness.setLocalState(null);const t=Ev(this.awareness,[this.awareness.clientID]);new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(yc.frameUpdate(t),{contentType:`application/octet-stream`}).catch(()=>{})}catch{}}async sendAwareness(){if(!(!this.awareness||!this.connected&&!this.connecting||this.sendingAwareness)){this.sendingAwareness=!0;try{for(;this.pendingAwareness;){const t=this.pendingAwareness;this.pendingAwareness=null;const{added:i,updated:r,removed:l}=t,o=i.concat(r).concat(l),u=Ev(this.awareness,o);await new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`}).append(yc.frameUpdate(u),{contentType:`application/octet-stream`})}}catch(t){console.error(`[YjsProvider] Failed to send awareness:`,t)}finally{this.sendingAwareness=!1}}}async subscribeAwareness(t){if(!this.awareness)return;const i=t.controller.signal;if(i.aborted)return;const r=new Ln({url:this.awarenessUrl(),headers:this.headers,contentType:`application/octet-stream`});try{const l=await r.stream({offset:`now`,live:`sse`,signal:i});l.closed.catch(()=>{}),l.subscribeBytes(async o=>{i.aborted||o.data.length>0&&this.applyAwarenessUpdates(o.data)}),await l.closed,this.connected&&!i.aborted&&(await new Promise(o=>setTimeout(o,250)),this.subscribeAwareness(t))}catch(l){if(i.aborted||!this.connected&&!this.connecting)return;if(this.isNotFoundError(l)){console.error(`[YjsProvider] Awareness stream not found`);return}console.error(`[YjsProvider] Awareness stream error:`,l),await new Promise(o=>setTimeout(o,1e3)),this.connected&&this.subscribeAwareness(t)}}isNotFoundError(t){return t instanceof Pt&&t.code===`NOT_FOUND`||t instanceof Zs&&t.status===404}isAuthError(t){return t instanceof Pt&&(t.code===`UNAUTHORIZED`||t.code===`FORBIDDEN`)||t instanceof Zs&&(t.status===401||t.status===403)}};const q2=64,K2=64,Cv=120,V2=1500,mc=.3,xv=12e4,$2=`#d0bcff`,nc=[`#FF0055`,`#00FF88`,`#FFEE00`,`#00CCFF`,`#FF6600`,`#00FFCC`,`#FF2299`,`#33FF00`,`#FF00AA`,`#00AAFF`,`#FFAA00`,`#CC00FF`,`#00FF55`,`#FF4400`,`#0066FF`];function G2(n){const t=n.match(/__(\d+)x(\d+)(?:_(\d+)ms)?$/);return t?{cols:parseInt(t[1]),rows:parseInt(t[2])}:{cols:q2,rows:K2}}function rl(n){return n.getMap(`territoryCell`)}function Bn(n){return n.getMap(`players`)}function lu(n){return n.getMap(`gameState`)}function Yd(n,t){const i=Bn(n),r=new Map;return i.forEach((l,o)=>{o!==t&&r.set(o,l)}),r}function od(n){const t=rl(n),i=new Map;return t.forEach((r,l)=>{i.set(l,r)}),i}function Y2(n,t){let i=0;return n.forEach(r=>{r.owner===t&&i++}),i}function F2(n,t,i,r,l){const o=new Set;t.forEach((g,m)=>{g.owner===n&&o.add(m)});const u=new Set,d=[];for(let g=0;g0;){const{x:g,y:m}=d.pop();for(const[y,v]of[[0,-1],[0,1],[-1,0],[1,0]]){const b=g+y,w=m+v;if(b<0||b>=i||w<0||w>=r)continue;const E=`${b},${w}`;o.has(E)||u.has(E)||(u.add(E),d.push({x:b,y:w}))}}const p=[];for(let g=0;gA.x===y&&A.y===v);if(w){const[A,V]=w,I=p+V2,H=Bn(n);return H.set(A,{...V,stunnedUntil:I}),H.set(t,{x:r.x,y:r.y,name:i,stunnedUntil:I}),{moved:!1,stunned:!0,x:r.x,y:r.y,stunnedUntil:I}}Bn(n).set(t,{x:y,y:v,name:i});const T=rl(n),N=Date.now();n.transact(()=>{T.set(`${y},${v}`,{owner:t,claimedAt:N})});const M=new Set([t]);Yd(n,t).forEach((A,V)=>M.add(V));const R=F2(t,T,o,u);return R.length>0&&n.transact(()=>{for(const A of R)T.set(`${A.x},${A.y}`,{owner:t,claimedAt:N})}),{moved:!0,stunned:!1,x:y,y:v,stunnedUntil:0}}function _v(n){const t=lu(n);t.has(`gameStartedAt`)||n.transact(()=>{t.has(`gameStartedAt`)||t.set(`gameStartedAt`,Date.now())})}function J2(n){const i=lu(n).get(`gameStartedAt`);return i!==void 0?i:null}function cd(n){const i=lu(n).get(`gameEndedAt`);return i!==void 0?i:null}function Tv(n){const t=lu(n);(!t.has(`gameEndedAt`)||t.get(`gameEndedAt`)===null)&&n.transact(()=>{t.set(`gameEndedAt`,Date.now())})}function Hp(n){const t=new Map;return n.forEach(i=>{t.set(i.owner,(t.get(i.owner)||0)+1)}),t}function Av(n,t,i){const r=Hp(n),l=mc*t;for(const[o,u]of r)if(u>=l){const d=i.get(o);if(d)return{name:d.name,pct:Math.round(u/t*100)}}return null}function Ov(n,t,i){const r=Hp(n);let l=0,o=``;if(r.forEach((d,p)=>{d>l&&(l=d,o=p)}),!o||l===0)return null;const u=i.get(o);return u?{name:u.name,pct:Math.round(l/t*100)}:null}const Yb=J.createContext(null);function Z2(){const n=J.useContext(Yb);if(!n)throw new Error(`useGameRoom must be used within GameRoom`);return n}function W2(n,t){return _w({streamOptions:{url:n,headers:t,contentType:`application/json`},state:$S,actions:({db:i,stream:r})=>({submitScore:{onMutate:l=>{i.collections.scores.insert(l)},mutationFn:async l=>{const o=crypto.randomUUID();await r.append(JSON.stringify($S.scores.insert({value:l,headers:{txid:o}}))),await i.utils.awaitTxId(o)}}})})}const Rv=J.createContext(null);function P2({roomId:n,children:t}){const{dsEndpoint:i,dsHeaders:r}=Qd(),[l,o]=J.useState(null),[u,d]=J.useState(null);return J.useEffect(()=>{let p=null,g=!1;const m=()=>g;return(async()=>{try{const v=`${i}/__snake_scores_${encodeURIComponent(n)}`,w=await new Ln({url:v,headers:r,contentType:`application/json`}).head();if(m()||(w.exists||await Ln.create({url:v,headers:r,contentType:`application/json`}),p=await W2(v,r),await p.preload(),m()))return;o(p)}catch(v){if(m())return;console.error(`[Scores] Failed to initialize:`,v),d(v instanceof Error?v:new Error(String(v)))}})(),()=>{g=!0,p&&p.close()}},[n,i,r]),u&&console.warn(`[Scores] Error loading scores:`,u.message),l?F.jsx(Rv.Provider,{value:{scoresDB:l},children:t}):F.jsx(Rv.Provider,{value:null,children:t})}const tk=1,vr=8,Dv=14,Vt={bg:`#1b1b1f`,grid:`#202127`,gridLine:`#2e2e32`,border:`#2e2e32`,text:`rgba(235,235,245,0.68)`,accent:`#d0bcff`,dim:`rgba(235,235,245,0.38)`},wr={ArrowUp:{dx:0,dy:-1},ArrowDown:{dx:0,dy:1},ArrowLeft:{dx:-1,dy:0},ArrowRight:{dx:1,dy:0},w:{dx:0,dy:-1},s:{dx:0,dy:1},a:{dx:-1,dy:0},d:{dx:1,dy:0}};function ek(n,t){return n>256||t>256?2:n>64||t>64?4:14}function nk({onLeave:n}){const{doc:t,awareness:i,roomId:r,playerId:l,playerName:o,playerColor:u}=Z2(),{cols:d,rows:p}=J.useMemo(()=>G2(r),[r]),g=d*p,m=J.useMemo(()=>ek(d,p),[d,p]),y=d<=100&&p<=100,[v,b]=J.useState(new Map),[w,E]=J.useState(new Map),[T,N]=J.useState({x:0,y:0}),[M,R]=J.useState(1),[A,V]=J.useState(!1),[I,H]=J.useState(!1),[W,tt]=J.useState(null),[X,at]=J.useState(xv/1e3),nt=r.replace(/__\d+x\d+(?:_\d+ms)?$/,``),wt=J.useRef(void 0),Lt=J.useRef(null),dt=J.useRef({x:0,y:0,stunnedUntil:0}),k=J.useMemo(()=>Y2(v,l)*tk,[v,l]),q=J.useMemo(()=>Math.round(k/g*100),[k,g]),Z=J.useMemo(()=>Hp(v),[v]),st=J.useMemo(()=>{let et=0,P=``;if(Z.forEach((St,Xt)=>{St>et&&(et=St,P=Xt)}),!P||et===0)return null;const pt=Math.round(et/g*100);if(P===l)return{name:o,pct:pt};const ft=w.get(P);return ft?{name:ft.name,pct:pt}:null},[Z,g,l,o,w]);J.useEffect(()=>{const et=Math.floor(Math.random()*d),P=Math.floor(Math.random()*p);dt.current={x:et,y:P,stunnedUntil:0},N({x:et,y:P});const pt=Bn(t);pt.set(l,{x:et,y:P,name:o});const ft=rl(t);return t.transact(()=>{ft.set(`${et},${P}`,{owner:l,claimedAt:Date.now()})}),_v(t),()=>{pt.delete(l)}},[t,l,o,u,d,p]),J.useEffect(()=>{const et=rl(t),P=()=>{const pt=od(t);if(b(pt),cd(t)!==null)return;const ft=Av(pt,g,Bn(t));ft&&(tt(ft),Tv(t))};return et.observe(P),P(),()=>et.unobserve(P)},[t,g]),J.useEffect(()=>{const et=()=>{const pt=J2(t);if(!pt)return;const ft=Date.now()-pt,St=Math.max(0,xv-ft);at(Math.ceil(St/1e3));const Xt=cd(t)!==null;if(St<=0&&!Xt){const je=od(t),Ft=Ov(je,g,Bn(t));tt(Ft||{name:`Nobody`,pct:0}),Tv(t)}else Xt&&tt(je=>{if(je)return je;const Ft=od(t),Dn=Av(Ft,g,Bn(t));return Dn||(Ov(Ft,g,Bn(t))??{name:`Nobody`,pct:0})})},P=setInterval(et,1e3);return et(),()=>clearInterval(P)},[t,g]),J.useEffect(()=>{const et=Bn(t),P=()=>{E(Yd(t,l))};return et.observe(P),P(),()=>et.unobserve(P)},[t,l]),J.useEffect(()=>{const et=()=>{const P=new Set,pt=new Set([o]);i.getStates().forEach((St,Xt)=>{if(Xt!==i.clientID){St.playerId&&P.add(St.playerId);const je=St.user?.name;je&&pt.add(je)}}),R(St=>{const Xt=pt.size;return St===Xt?St:Xt});const ft=Bn(t);ft.forEach((St,Xt)=>{Xt!==l&&!P.has(Xt)&&ft.delete(Xt)})};return i.on(`change`,et),et(),()=>i.off(`change`,et)},[i,t,l,o]),J.useEffect(()=>{const et=new Set,P=ft=>{if(ft.key in wr){ft.preventDefault();const St=!Lt.current;et.add(ft.key),Lt.current=wr[ft.key],St&&xt.current?.(wr[ft.key])}},pt=ft=>{if(et.delete(ft.key),ft.key in wr){let St=!1;for(const Xt of et)if(Xt in wr){Lt.current=wr[Xt],St=!0;break}St||(Lt.current=null)}};return window.addEventListener(`keydown`,P),window.addEventListener(`keyup`,pt),()=>{window.removeEventListener(`keydown`,P),window.removeEventListener(`keyup`,pt)}},[]);const ut=J.useRef(null),_=J.useRef(null),L=J.useRef(0),Y=10,Q=J.useCallback((et,P)=>{const pt=Date.now();if(pt-L.currentMath.abs(bs)?xt.current?.({dx:Ui>0?1:-1,dy:0}):xt.current?.({dx:0,dy:bs>0?1:-1}),L.current=pt)},[m]),ot=J.useCallback(et=>{et.preventDefault();const P=et.touches[0];_.current={x:P.clientX,y:P.clientY},Q(P.clientX,P.clientY)},[Q]),it=J.useCallback(et=>{if(et.preventDefault(),!_.current)return;const P=et.touches[0],pt=P.clientX-_.current.x,ft=P.clientY-_.current.y;Math.abs(pt){_.current=null},[]),xt=J.useRef(void 0),bt=J.useCallback(et=>{const P=ut.current;if(!P)return;const pt=P.createSVGPoint();pt.x=et.clientX,pt.y=et.clientY;const ft=P.getScreenCTM();if(!ft)return;const St=pt.matrixTransform(ft.inverse()),Xt=St.x/m-.5,je=St.y/m-.5,Ft=dt.current,Dn=Xt-Ft.x,Mn=je-Ft.y;Dn===0&&Mn===0||(Math.abs(Dn)>Math.abs(Mn)?xt.current?.({dx:Dn>0?1:-1,dy:0}):xt.current?.({dx:0,dy:Mn>0?1:-1}))},[m]),$e=J.useCallback(()=>{n()},[n]);J.useEffect(()=>{const et=pt=>{if(cd(t)!==null)return;const ft=dt.current,St=X2(t,l,o,{x:ft.x,y:ft.y},pt,d,p,ft.stunnedUntil);ft.stunnedUntil=St.stunnedUntil,St.moved&&(ft.x=St.x,ft.y=St.y,N({x:St.x,y:St.y}),i.setLocalState({...i.getLocalState(),x:St.x,y:St.y}))};xt.current=et;const P=setInterval(()=>{const pt=Lt.current;pt&&et(pt)},Cv);return()=>clearInterval(P)},[t,l,o,u,d,p,i]);const Ge=d*m,Fn=p*m,Xr=J.useCallback(()=>{navigator.clipboard.writeText(nt).catch(()=>{}),V(!0),clearTimeout(wt.current),wt.current=setTimeout(()=>V(!1),1200)},[nt]);J.useEffect(()=>()=>clearTimeout(wt.current),[]);const wn=J.useMemo(()=>y?F.jsxs(F.Fragment,{children:[Array.from({length:d},(et,P)=>F.jsx(`line`,{x1:P*m,y1:0,x2:P*m,y2:Fn,stroke:Vt.gridLine,strokeWidth:.5},`v${P}`)),Array.from({length:p},(et,P)=>F.jsx(`line`,{x1:0,y1:P*m,x2:Ge,y2:P*m,stroke:Vt.gridLine,strokeWidth:.5},`h${P}`))]}):null,[d,p,Ge,Fn,m,y]),ei=J.useMemo(()=>{const et=new Map;et.set(l,u);const P=[...w.keys()].sort();for(let pt=0;pt{const P=Math.floor(et/60),pt=et%60;return`${P}:${pt.toString().padStart(2,`0`)}`};return F.jsxs(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,fontFamily:`'Press Start 2P', monospace`,background:Vt.bg,color:Vt.text,minHeight:`100dvh`,maxHeight:`100dvh`,padding:8,boxSizing:`border-box`,overflow:`hidden`,touchAction:`none`},children:[F.jsx(`style`,{children:` - @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); - @keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } } - .live-dot { animation: blink 1.5s ease-in-out infinite; } - @keyframes stun-pulse { 0%,100% { opacity:1 } 50% { opacity:0.2 } } - .stunned { animation: stun-pulse 0.3s ease-in-out infinite; } - `}),F.jsxs(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:vr},children:[F.jsx(`button`,{onClick:$e,style:{background:`none`,border:`none`,color:Vt.accent,fontFamily:`inherit`,fontSize:vr,padding:`4px 0`,cursor:`pointer`},children:`EXIT`}),F.jsxs(`div`,{style:{display:`flex`,gap:6,cursor:`pointer`},onClick:Xr,title:`Click to copy room name`,children:[F.jsx(`span`,{style:{color:Vt.accent},children:o}),F.jsx(`span`,{style:{color:Vt.dim},children:`@`}),F.jsx(`span`,{style:{color:A?Vt.accent:Vt.text,textDecoration:`underline`,textUnderlineOffset:3},children:A?`COPIED`:nt})]}),F.jsx(`span`,{style:{color:X<=30?`#FF3D71`:Vt.accent,fontVariantNumeric:`tabular-nums`},children:Jr(X)}),F.jsxs(`div`,{style:{color:Vt.accent,position:`relative`,cursor:`pointer`},onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onClick:()=>H(et=>!et),children:[M,` PLAYERS`,I&&F.jsx(`div`,{style:{position:`absolute`,top:`100%`,right:0,marginTop:6,background:Vt.bg,border:`1px solid ${Vt.border}`,padding:10,zIndex:5,minWidth:120},children:[{id:l,name:o},...Array.from(w.entries()).map(([et,P])=>({id:et,name:P.name}))].map(et=>{const P=ei.get(et.id)??nc[0],pt=Z.get(et.id)||0,ft=Math.round(pt/g*100);return F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,padding:`3px 0`},children:[F.jsxs(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[F.jsx(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:P,display:`inline-block`}}),et.name]}),F.jsxs(`span`,{style:{color:Vt.accent},children:[ft,`%`]})]},et.id)})})]})]}),F.jsxs(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,width:`100%`,maxWidth:Ge,marginBottom:8,fontSize:vr},children:[F.jsxs(`div`,{children:[F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[q,`%`]}),` `,F.jsx(`span`,{style:{color:Vt.dim},children:`TERRITORY`})]}),F.jsxs(`div`,{style:{textAlign:`right`},children:[F.jsxs(`div`,{style:{marginBottom:st?4:0,color:st&&st.pct>=Math.round(mc*100)-5?`#FF3D71`:Vt.dim},children:[`WIN AT `,Math.round(mc*100),`%`]}),st&&F.jsxs(`div`,{children:[F.jsx(`span`,{style:{color:Vt.dim},children:st.name}),` `,F.jsxs(`span`,{style:{fontSize:Dv,color:Vt.accent},children:[st.pct,`%`]})]})]})]}),F.jsxs(`svg`,{ref:ut,viewBox:`0 0 ${Ge} ${Fn}`,onTouchStart:ot,onTouchMove:it,onTouchEnd:vt,onClick:bt,style:{width:`min(100%, calc(100dvh - 140px))`,maxWidth:Ge,height:`auto`,aspectRatio:`${d} / ${p}`,background:Vt.grid,border:`1px solid ${Vt.border}`,flexShrink:0,userSelect:`none`,WebkitUserSelect:`none`},children:[wn,Array.from(v.entries()).map(([et,P])=>{const[pt,ft]=et.split(`,`).map(Number),St=ei.get(P.owner)||Vt.accent;return F.jsx(`rect`,{x:pt*m,y:ft*m,width:m,height:m,fill:St,opacity:.5},et)}),Array.from(w.entries()).map(([et,P])=>{const pt=P.stunnedUntil!=null&&Date.now(){const et=dt.current.stunnedUntil>0&&Date.now(){const et=rl(t),P=t.getMap(`gameState`);t.transact(()=>{Array.from(et.keys()).forEach(ft=>et.delete(ft)),P.delete(`gameStartedAt`),P.delete(`gameEndedAt`)}),tt(null),_v(t)},style:{fontFamily:`inherit`,fontSize:vr,padding:`10px 24px`,background:Vt.accent,color:`#000`,border:`none`,cursor:`pointer`,letterSpacing:2},children:`REMATCH`}),F.jsx(`button`,{onClick:$e,style:{fontFamily:`inherit`,fontSize:vr,padding:`10px 24px`,background:`transparent`,color:Vt.accent,border:`1px solid ${Vt.accent}`,cursor:`pointer`,letterSpacing:2},children:`EXIT`})]})]})]})}function sk({roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:l}){const{registryDB:o}=Aw(),[{playerId:u,doc:d,awareness:p}]=J.useState(()=>{const M=`player-${Math.random().toString(36).slice(2,10)}`,R=new Fr,A=new j2(R);return A.setLocalState({user:{name:r},playerId:M,type:`human`}),{playerId:M,doc:R,awareness:A}}),g=$2,[m,y]=J.useState(!0),[v,b]=J.useState(!1),[w,E]=J.useState(null),T=J.useRef(null);J.useEffect(()=>{const M=new H2({doc:d,baseUrl:t,docId:n,awareness:p,headers:i,connect:!1});return M.on(`synced`,R=>{b(R),R&&y(!1)}),M.on(`status`,R=>{R===`connected`&&y(!1)}),M.on(`error`,R=>{E(R),y(!1)}),p.getLocalState()===null&&p.setLocalState({user:{name:r},playerId:u,type:`human`}),T.current=M,M.connect(),()=>{M.destroy(),T.current=null}},[n,d,p,t,i,r,u]),J.useEffect(()=>{const R=setInterval(()=>{const A=new Set([u]);if(p.getStates().forEach(H=>{H.playerId&&A.add(H.playerId)}),[...A].sort()[0]!==u)return;const I=o.collections.rooms.toArray.find(H=>H.roomId===n);if(I)try{o.actions.addRoom({...I,expiresAt:Date.now()+mp*1e3})}catch{}},QO);return()=>clearInterval(R)},[p,o,n,u]),J.useEffect(()=>()=>{d.destroy()},[d]);const N=J.useMemo(()=>({doc:d,awareness:p,roomId:n,playerId:u,playerName:r,playerColor:g,isSynced:v,isLoading:m}),[d,p,n,u,r,g,v,m]);return w?F.jsxs(`div`,{style:ud.center,children:[F.jsxs(`div`,{style:{color:`#FF3D71`,fontSize:8},children:[`Connection error: `,w.message]}),F.jsx(`button`,{onClick:l,style:ud.btn,children:`BACK`})]}):m?F.jsxs(`div`,{style:ud.center,children:[F.jsx(`style`,{children:`@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');`}),F.jsx(`div`,{style:{color:`#d0bcff`,fontSize:8},children:`CONNECTING...`})]}):F.jsx(Yb.Provider,{value:N,children:F.jsx(P2,{roomId:n,children:F.jsx(nk,{onLeave:l})})})}const ud={center:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,gap:16,fontFamily:`'Press Start 2P', monospace`,background:`#1b1b1f`},btn:{fontFamily:`inherit`,fontSize:8,padding:`8px 24px`,background:`#d0bcff`,color:`#000`,border:`none`,cursor:`pointer`}},Mv=[`Swift`,`Bold`,`Sly`,`Keen`,`Cool`,`Neon`,`Rad`,`Zen`],kv=[`Fox`,`Wolf`,`Hawk`,`Bear`,`Lynx`,`Crow`,`Stag`,`Hare`];function ik(){const n=Mv[Math.floor(Math.random()*Mv.length)],t=kv[Math.floor(Math.random()*kv.length)];return`${n} ${t}`}function rk(){return localStorage.getItem(`territory-player-name`)||ik()}function ak(){const[n,t]=J.useState(()=>{const i=window.location.hash.match(/^#room\/(.+)$/);return i?decodeURIComponent(i[1]):null});return J.useEffect(()=>{const i=()=>{const r=window.location.hash.match(/^#room\/(.+)$/);t(r?decodeURIComponent(r[1]):null)};return window.addEventListener(`hashchange`,i),()=>window.removeEventListener(`hashchange`,i)},[]),n}function lk(){const n=ak(),{yjsEndpoint:t,yjsHeaders:i}=Qd(),[r,l]=J.useState(rk),o=u=>{l(u),localStorage.setItem(`territory-player-name`,u)};return n?F.jsx(sk,{roomId:n,yjsBaseUrl:t,yjsHeaders:i,playerName:r,onLeave:()=>{window.location.hash=``}}):F.jsx(nR,{playerName:r,onPlayerNameChange:o,onJoinRoom:u=>{window.location.hash=`room/${encodeURIComponent(u)}`}})}function ok(){return F.jsx(xC,{children:F.jsx(PO,{children:F.jsx(lk,{})})})}EC.createRoot(document.getElementById(`root`)).render(F.jsx(ok,{})); diff --git a/website/public/demos/territory-wars/index.html b/website/public/demos/territory-wars/index.html index 60204d4c17..9402e5c83c 100644 --- a/website/public/demos/territory-wars/index.html +++ b/website/public/demos/territory-wars/index.html @@ -16,7 +16,7 @@ overflow: hidden; } - +

gy5(ncx}uMg zn(f^g8<&#le42v`+fg?ODSy;F3oUb-L(wEGbRHK|Jr7B zp9VYW6JewHL7Ru){+rLQ-T`;P)~O6hge@x<;mZ>YJ-@u|DF5O~s!olY%Vi)m?sIo+ z$#>>o=t~_w)+^-S|C0zhA5o=!p%<7>5Z+rCy3Y&9Z`)X^Oi8`%9K&sh)CJ7(9rDh? zLt#9PoCs(LDSRC;RGKW;I)nXrS=L*ueI)kkrs;v`6|qk2LKW zJv!IH^ToXqJ(`zIC-)4XXHLn4u4Wudx}T?S0sjEKMsKHhHYqUFX{P^uRE6%JLGMQZ zQHF~tagFEwvRZa3vq))?v#Ju^V;XX$YfT-Cq^u%=Il63Dh=+@n&0enR3Q#TS!@IERUBg{OVf4kkf?!nAM=Xcdx zD|pBCUAGCoinPV(w(agqrBz$vR&^fxu%%;-YxJU7bKzH|E*wuv&jTWW8-MUUL6Piz zpl+Ol%1d)LKPHg8C>Muty~%xClRdBwS#=-zO^<%mE5jaMtpB6) zE#VGd!>cGA%7HX2+66!xw<2WM^x$ias#(W-F;@w8$qh+@?~WAT?i2mcP1GTyf_IYW z@5;gVMFAD~a$jWQBYHfQ(}JP>+XUkG<=~FQ)RVQ%>D@ja<<>t11#0zZGCT=SCm2$? z=a!l={Fx5ZSFW|#&2`ls7{b;8Qj7|>UWT7-6ro26ZaQxoh&#K?gh#N%Egx@fA6L1$TM2!95=E$8^(n_8m$R5pRk3^LX~bV?3cE zP&J+Lz~L3qe?=r%NBxcEHI&H)LLMlL3R^zeKQG{vk_EmhRL=TJu?r9HtNH?Ws^xg-@fcSnBEG^Nyg>=HQ!IM=O8}I?ZE^k%K2NMq{-pX ztRa)PkoJc4&E?IAl3dm^GU|NO_gEdn(_)Y~$}{vWSiW$BI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